Hardware Design I Chap. 4 Representative combinational logic

Size: px
Start display at page:

Download "Hardware Design I Chap. 4 Representative combinational logic"

Transcription

1 Hardware Design I Chap. 4 Representative combinational logic shimada@is.naist.jp Already optimized circuits There are many optimized circuits which are well used You can reduce your design workload You can use faster one than your design :-P Some of them has different optimization level Optimized for logic gates reduction Optimized for operating speed Hardware Design I (Chap. 4) 2

2 Outline Data path controlling circuits Multiplexer/demultiplexer Buffer/Three state buffer/bi-directional buffer Encoder/decoder Arithmetic circuits Adder Comparator/Majority vote Shifter Multiplier Divider Hardware Design I (Chap. 4) 3 Multiplexer (/2) A circuit which outputs one of the inputs Also called Selector e.g. 2- MUX (2-input -output multiplexer) Output the value of in0 if the input of sel =0 Output the value of in if the input of sel = x y x y in0 in sel out x 0 in0 in sel out y Relationship between inputs and output sel out 0 in0 in Hardware Design I (Chap. 4) 4 2

3 Multiplexer (2/2) Logical expression of 2- MUX: out = (sel)'(in0) + (sel)(in) Assume that sel signal controls open/close of AND gate You can easily to extend logical expression to much more inputs with above design sel in0 in out Truth table of 2- MUX sel in0 in out Hardware Design I (Chap. 4) 5 4- MUX (/2) The input of sel becomes 2-bit width I denote each bit of them as sel and sel 0 The truth table becomes 6-value x y in0 in in2 in3 sel out x z w 00 x y in0 in in2 in3 sel out w z w sel sel 0 out 0 0 i0 0 i 0 i2 i3 Hardware Design I (Chap. 4) 6 3

4 4- MUX (2/2) Assume that sel signal controls open/close of AND gate sel = (0,0) opens in0 gate sel = (0,) opens in gate sel = (,0) opens in2 gate sel = (,) opens in3 gate sel 0 sel in0 in in2 in3 Hardware Design I (Chap. 4) 7 Multiplexer with transmission gate (/2) Transmission gate The circuit which can control conductivity Input and output is conducted if sel = Warning: There s no current drive ability High impedance status (noted as Z) The node is not connected either Vdd or Gnd sel sel 0 0 No conduct Conduct in out in out 0 Operation sel out 0 Z in Truth table sel in out 0 0 Z 0 Z 0 0 Hardware Design I (Chap. 4) 8 4

5 Multiplexer with transmission gate (2/2) Much simpler than MUX with logic gates Warning: There s no current drive ability (= output drive ability) Current drive ability is depends on the logic gate before transmission gate You have to increase drive ability of prior gate depending on outputs of transmission gate in0 sel in sel out 0 in0 in out Hardware Design I (Chap. 4) 9 Three state buffer (tri-state buffer) in A buffer which can output disconnected status Buffer: a circuit which amplifies signal strength Assuming two not gates which drives output current before transmission gate Strictly speaking, the buffer and transmission gate is unified Also called tri-state buffer Circuit symbol sel out Truth table sel in out 0 0 Z 0 Z 0 0 Amplifies signal (source of current) Hardware Design I (Chap. 4) 0 5

6 Buffer A circuit which amplifies signal strength The current of amplified signal is comes from internal of the buffer Usually, we utilize larger (wide gate width) FET to drive much current Usage Emphasize signal to drive much gates in output side Emphasize signal to drive long signal line Variations Implement NOT gates separately Utilize negated output Larger Larger Current Hardware Design I (Chap. 4) Bi-directional buffer A buffer which can control signal flow The signal flows port 2 to port if sel=0 The signal flows port to port 2 if sel= Note that the port and port 2 is separated in electrical viewpoint Compare to transmission gate sel port sel port 2 Compare! port port 2 sel Hardware Design I (Chap. 4) 2 6

7 Demultiplexer The opposite operation to multiplexer The output which has not elected becomes high impedance status Constructed with transmission gate x in sel out out2 0 sel out out2 0 in Z Z in in sel out out2 x Z Hardware Design I (Chap. 4) 3 Decoder The circuit which output signal to corresponding output from input value Assume that a multiplexer with logic gate which has no input The output is also called - hot code in 0 in out0 out out2 out3 Hardware Design I (Chap. 4) 4 7

8 Encoder A circuit which outputs the number with binary notation which is corresponding to inputs Opposite function to decoder The output value under multiple input is undefined in0 in in2 in3 out out Hardware Design I (Chap. 4) 5 Priority encoder The encoder which gives priority to specified order It can tolerate multiple inputs e.g. The priority encoder which has priority to smaller inputs Priority encoder which has priority to smaller inputs in0 in in2 in3 out out Hardware Design I (Chap. 4) 6 8

9 Reading table with decoder and multiplexer (/2) We can read data in table organization by utilizing decoder and multiplexer As shown in Chap. 5, we can minimize storage by utilizing table organization Reading data in 6th (00) entry 00 Decoder MUX Hardware Design I (Chap. 4) 7 Reading table with decoder and multiplexer (2/2) Operation Select row by inputting higher side bits into decoder Select column by inputting lower side bits into 4- MUX Widely used in RAM, flash memory, and so on Reading data in 6th (00) entry 00 Decoder MUX Hardware Design I (Chap. 4) 8 9

10 Outline Data path controlling circuits Multiplexer/demultiplexer Buffer/Three state buffer/bi-directional buffer Encoder/decoder Arithmetic circuits Adder Comparator/Majority vote Shifter Multiplier Divider Hardware Design I (Chap. 4) 9 How to design arithmetic circuits? From -bit arithmetic to multi bit arithmetic Design and optimize -bit module Under considering expansion to multi bit Create multi bit circuit by utilizing -bit module Similar to create program with function call Special technique for optimizing arithmetic circuits Utilize characteristic of binary integer Optimize under usual algebra Hardware Design I (Chap. 4) 20 0

11 The notation of integer in binary We can represent 0 to 2 n - integer with n-bit binary notation (if we consider positive value) 2 n- 2 n Add weight to each digit 4... We use twos complement to represent signed integer (detail: subtraction circuit) We can represent it -2 n- to +2 n- - e.g. 8-bit signed integer with twos complement can represent from -28 to +27 Hardware Design I (Chap. 4) 2 Addition of binary integer Addition of -bit 0+0 = 0, 0+ =, +0 =, + = 0 Carry By considering carry, an addition of one digit becomes addition of three -bit Addition of augend (a), addend (b), and carry (c) Carry +) c_in c_out a sum b 0 c_in c_out a sum b 0 st bit 0 0th bit 0 Hardware Design I (Chap. 4) 22

12 Addition of binary integer Generalized notation of n-bit binary integer The result becomes (n+)-bit binary integer c 0 = 0 c n = s n +) c n c n- c n-2... c c 0 a n- a n-2... a a 0 b n- b n-2... b b 0 s n s n- s n-2... s s 0 Hardware Design I (Chap. 4) 23 -bit full adder Definition of the circuit Inputs: two -bit binary and -bit carry input from lower digit Operation: sum all of inputs Outputs: sum and carry output Half adder An adder which has no carry input a b c_in c_out sum a b c_out c_in sum Hardware Design I (Chap. 4) 24 2

13 Implementation of half adder Usually implemented with XOR gate Much smaller gate number than AND- OR organization a b c s a s a s b c b c Hardware Design I (Chap. 4) 25 Implementation of full adder We can create full adder with half adder Usually, the path of carry generation becomes critical path Critical path: the path has longest route half adder a a c b b s c_in half adder a c b s c_out Path of carry generation sum Hardware Design I (Chap. 4) 26 3

14 n-bit ripple carry adder An adder which layouts n of -bit full adder Called ripple carry adder (RCA) The calculation time is in proportion to n a a 2 b 2 a b a 0 b 0 n- b 0 n- a b c_out c_in sum c n... c 3 a b c_out c_in sum c 2 a b c_out c_in sum c a b c_out c_in sum c 0 s n- s 2 s (a n- a n-2... a 0 ) + (b n- b n-2... b 0 ) s 0 Hardware Design I (Chap. 4) 27 The RCA is slow Why RCA is slow? c 5 will be defined after c 4 has defined c 4 will be defined after c 3 has defined... ->c 5 is defined under sequential definition n-bit addition requires O(n) time Definition of O(n): 0 0 +) Assuming function f(n) and G(n) f(n) = O[g(n)] if constant c and n0 which satisfy f(n) c g(n), n n0 Note that f(n) > 0, g(n) > 0 Hardware Design I (Chap. 4) 28 4

15 Carry look-ahead adder The critical point is carry Are there any way to speeding up carry generation? Idea: separate carry to two category Generation of carry: g i = a i b i The carry must occur in this digit Propagation of carry: p i = a i + b i The carry will occur if carry from (i-) has arrived Note that the generation of g i and p i are easy Assuming (a n- a n-2... a 0 ) + (b n- b n-2... b 0 ) Hardware Design I (Chap. 4) 29 Extracting carry with g i, p i, and c 0 Cn becomes n+ sum of term of n+ literal c = g 0 +p 0 c 0 c 2 = g +p c -> c 2 = g +p g 0 +p p 0 c 0 Calculated without c c 3 = g 2 +p 2 c 2 -> c 3 = g 2 +p 2 g +p 2 p g 0 +p 2 p p 0 c > c 4 = g 3 +p 3 g 2 +p 3 p 2 g +p 3 p 2 p g 0 +p 3 p 2 p p 0 c 0 c n = g n- +p n- c n- -> c n = g n- +p n- g n-2 +p n- p n-2 g n-3 + +p n- p k g k- + + p n- p 0 c 0 Hardware Design I (Chap. 4) 30 5

16 The condition which C n becomes Sum of later itemize g n- = g n-2 was propagated after n- digit (=p n- ) g n-3 was propagated after n-2 digit (=p n- p n-2 ) g k- was propagated after k digit. c 0 was propagated through all digits c n = g n- +p n- g n-2 +p n- p n-2 g n-3 + +p n- p k g k- + + p n- p 0 c 0 Hardware Design I (Chap. 4) 3 4-bit CLA p 3 g 3 g 2 g p 2 p p 0 g 0 c 0 c 4 c 3 c c 2 Hardware Design I (Chap. 4) 32 6

17 The characteristic of CLA It can calculate c i in parallel Much complicated than RCA Calculation time becomes O(log n) c n becomes sum of n+ term Each term is consist of n+ literals -> If we implement it with balance tree, the height becomes log n Hardware Design I (Chap. 4) 33 Quiz How long does CLA requires to calculate 64-bit value with NAND2 gate delay?. Around 8 NAND2 gate delay 2. Around 2 NAND2 gate delay 3. Around 6 NAND2 gate delay 4. Around 20 NAND2 gate delay 64-bit RCA requires around 29 NAND2 gate delay Hardware Design I (Chap. 4) 34 7

18 Answer 2. Around 2 NAND2 gate delay NAND2 delay for prepare pi and gi About 8 NAND2 delay for prepare ci from pi and gi 3 NAND2 delay for calculate si Result of practical implementation Alpha 2264 processor utilizes 2 FO4 delay for each pipeline stage pipeline stage ->Chap. It execute 64-bit arithmetic in pipeline stage Hardware Design I (Chap. 4) 35 Explore of faster adder Adder is one of the important circuit so that there s many implementations Examples Carry select adder Conditional sum adder Carry skip adder Carry bypass adder Carry complete adder Domino logic adder for Pentium 4 Hardware Design I (Chap. 4) 36 8

19 Outline of domino logic Operate with precharge and evaluation (=discharge) If input satisfies condition, output is discharged e.g. Domino logic XOR gate (a,b) = (,0) (a,b) = (0,) Otherwise, the output is Precharge not discharged 0 0-> ->0 ->0 a b a b a 0 b a b a b a 0 b 0 0 Discharge Discharge Hardware Design I (Chap. 4) 37 Twos complement (/2) A method which gives negative weight for most significant bit -2 n- 2 n e.g. Twos complement with 8-bit width = -2 7 = = = -27 = =65 = = 27 Hardware Design I (Chap. 4) 38 9

20 Twos complement (2/2) We can represent -2 n- to +2 n- - Example of 8-bit width e.g. Twos complement with 8-bit width Why we do not use independent sign bit? - It creates positive 0 and negative > redundant!!! Independent sign bit positive negative 0 Hardware Design I (Chap. 4) 39 How to create twos complement? You can gain inverse sign of twos complement by negating all bits and add to it 0 = 27 Add 00 Negation Add Negation = -27 Why it becomes twos complement? A negation of m becomes -2 n- + (2 n- -) - m By adding to above one, we can gain -m Note that -m = -2 n- +(2 n- -m) = -2 n- +{(2 n- -)-m+} Hardware Design I (Chap. 4) 40 20

21 Subtraction with twos complement Create twos complement of subtrahend and add it with adder Organization of the circuit Negate all bits before adder + is done by adding carry to c 0 a a 2 b 2 a b a 0 b 0 n- b n- a b c_out c_in sum c n... c 3 a b c_out c_in sum c 2 a b c_out c_in sum c a b c_out c_in sum c 0 s n- s 2 s (a n- a n-2... a 0 ) - (b n- b n-2... b 0 ) s 0 Hardware Design I (Chap. 4) 4 The sign bit after adding positive and negative values Assume signed 8-bit world If carry in and carry out of the sign bit are same, you only have to add them 0 Equal - Equal 0 +) ) Equal - Equal ) 0 +) Hardware Design I (Chap. 4) 42 2

22 The sign bit after adding positive and negative values Sign bit: equals to most left bit (MSB: most significant bit) If carry in and carry out of the sign bit are different, you have to treat it overflow The result exceeds range which can be represented with signed 8-bit From -28 to +27 Different Wrong result Different 0 Wrong result ) ) True result is +30 True result is -90 Hardware Design I (Chap. 4) 43 Short exercise Show arithmetic result under signed 8-bit world Show both binary and decimal notation Notate overflow if it occurs +) ) Hardware Design I (Chap. 4) 44 22

23 Answer ) ) Overflow! True result is Hardware Design I (Chap. 4) 45 Unify adder and subtracter We can unify adder and subtracter Control signal provide carry for least bit which is required to create twos complement Notation method of n-bit width signal a n b n Control signal 0: adding Negation of each bit n : subtracting MUX n Adder Carry for least bit n Hardware Design I (Chap. 4) 46 23

24 ALU (Arithmetic Logic Unit) Usually, we implement multiple arithmetic function to one circuit We can share logic gates between arithmetics e.g. AND/XOR operation of a and b are partial result of half adder We can save number of logic gates a b 8 8 ALU... Control (add, sub, compare, and, or, xor,...) 8 Hardware Design I (Chap. 4) 47 -bit right shift Movie digit to right Least significant bit (LSB) is banished MSB differs between shift method Logical shift: insert 0 Arithmetic shift: insert prior MSB The result becomes divided by e.g (+7) -> (+3) e.g. 00(-6) -> 0(-3) 0 Achieved with only wire connection Insert Copy Logical shift: Arithmetic shift: 000 Hardware Design I (Chap. 4) 48 24

25 -bit left shift Movie digit to right 000 MSB is banished 0 is inserted into LSB 0 The result becomes multiplied by 2 e.g (+7) -> 00000(+4) Insert e.g. 00(-6) -> 000(-2) 0000 Also achieved with only wire connection You have to consider overflow if you execute arithmetic shift e.g (-28) -> (0) Overflow! Hardware Design I (Chap. 4) 49 -bit rotate left (or right) -bit rotate left Move digit to left MSB is moved to LSB -bit rotate right Move digit to right LSB is moved to MSB Rotate left Rotate right Hardware Design I (Chap. 4) 50 25

26 Barrel shifter A circuit which can achieve arbitrary shift Usually, it permits several shift related operations n-bit shift gives result of multiplied by 2 n or divided by 2 n Shift amount c 2 c c 0 i 7 i 6 i 5 i 4 i 3 i 2 i i 0 Barrel shifter right/left arithmetic/logical o 7 o 6 o 5 o 4 o 3 o 2 o o 0 Hardware Design I (Chap. 4) 5 One implementation of barrel shifter Creating logical expression of each outputs and construct two level logic e.g. o 3 = r_l (i 0 c c 0 +i c +i 2 c 0 ) + c 2 c c 0 + r_l (i 4 c 0 +i 5 c +i 6 c c 0 +i 7 c 2 ) Assuming r_l = under right shift Shift amount c 2 c c 0 i 7 i 6 i 5 i 4 i 3 i 2 i i 0 Barrel shifter right/left (r_l) o 7 o 6 o 5 o 4 o 3 o 2 o o 0 Hardware Design I (Chap. 4) 52 26

27 The other implementation of barrel shifter Cascaded MUX which selects 2 n bits right shift, 2 n bits left shift, or no shift The length of critical path becomes long 0 i 7 i 6 i 5 i 4 i 3 i 2 i i 0 0 c 0 right/left MUX c right/left c 2 right/left MUX MUX o 7 o 6 o 5 o 4 o 3 o 2 o o 0 Hardware Design I (Chap. 4) 53 Example of operation 3-bit right shift 0 i 7 i 6 i 5 i 4 i 3 i 2 i i 0 0 c 0 right/left c right/left c 2 0 right/left MUX MUX MUX o 7 o 6 o 5 o 4 o 3 o 2 o o 0 Hardware Design I (Chap. 4) 54 27

28 Equivalent comparator -bit equivalent comparator becomes XNOR n-bit equivalent comparator AND of all digits Equivalent if all digits are equivalent Place AND gate with balanced tree a b out a n-... a 2 a a 0 b n- b2 b b0... Hardware Design I (Chap. 4) 55 Comparator for grater than, less than, grater equal, and less equal (/2) -bit comparison a>b (GT: grater than) -> f = a b a>=b (GE: grater equal) -> f = a+b Abbreviation of compare or comparator: cmp Similarly, less than and less equal function will be implemented Also, we can exchange inputs and evaluate with GT and GE Prepare MUX at input side of comparator a b GT GE a MUX cmp b MUX grater /less Hardware Design I (Chap. 4) 56 28

29 Comparator for grater than, less than, grater equal, and less equal (2/2) In multi-bit implementation, the result of higher digit is selected Prepare a logic which conduct Propagate lower result if a i =b i Propagate 0 if inputs a i <b i Propagate if inputs a i >b i a b a b a b R out 0 0 R in R in R out a n- b n- -bit cmp R in R out a i b i a 0 b 0 -bit cmp R in R -bit cmp 0 out Hardware Design I (Chap. 4) 57 Comparison with subtraction circuit If the result of a-b is positive, a>b is approved Check MSB under twos complement arithmetic If the n-bit value is unsigned value, you have to check with (n+)bit value arithmetic If the result of a-b is zero, a=b is approved If you implement cmp into ALU, you can use this method Dedicated cmp is used in dedicate purpose hardware Hardware Design I (Chap. 4) 58 29

30 Multiply -bit multiply is the same to AND 0 x 0 = 0, 0 x = 0, x 0 = 0, x = n-bit multiply becomes n of n-bit addition Iteration of -bit shift and addition The output becomes (2xn)-bit binary ) +) ) A = a n- a n-2... a a 0 B = b n- b n-2... b b 0 A x b 0 A x b x 2 A x b 2 x 4 -bit left shift 2-bit left shift Hardware Design I (Chap. 4) 59 Example of 4-bit multiply (a 3 a 2 a a 0 ) x (b 3 b 2 b b 0 ) x) The result of -bit multiply (AND) a 3 a 2 a a 0 b 3 b 2 b b 0 a 3 b 0 a 2 b 0 a b 0 a 0 b 0 a 3 b a 2 b a b a 0 b +) a 3 b 2 a 2 b 2 a b 2 a 0 b 2 a 3 b 3 a 2 b 3 a b 3 a 0 b 3 z 7 z 6 z 5 z 4 z 3 z 2 z z 0 Hardware Design I (Chap. 4) 60 30

31 Array multiplier Align adder to array The operation time becomes O(n) a 3 a 2 a a 0 x) Note that represents adder (3-input 2-output) +) b 3 b 2 b b 0 a 3 b 0 a 2 b 0 a b 0 a 0 b 0 a 3 b a 2 b a b a 0 b a 3 b 2 a 2 b 2 a b 2 a 0 b 2 a 3 b 3 a 2 b 3 a b 3 a 0 b 3 Carry z 7 z 6 z 5 z 4 z 3 z 2 z z 0 Hardware Design I (Chap. 4) 6 Outline of Wallace tree multiplier One digit of n-bit multiply becomes summation of n binaries If we utilize carry save adder, we can construct 3-2 arithmetic tree. Group 3 binaries from summation of n and apply carry save addition 2. The result becomes summation of (2/3 x n) 3. Back to. until the summation becomes summation of 2 (usual addition) It can operate multiply with O(log n) Hardware Design I (Chap. 4) 62 3

32 Carry save adder (CSA) +) An array of n full adders Output sum of 3 binary inputs (2 binary outputs) There s no carry propagation Operation time is constant (independent to number of inputs) It can quickly translate sum of 3 binaries to sum of 2 binaries No relationships a a n- a n-2... a a n- b n- c n- a b c a 0 b 0 0 b n- b n-2... b b 0 c n- c n-2... c c 0 d n d n- d n-2... d d 0 e n e n- e n-2... e e 0 e n a b c_out c_in sum d n- e n- e 2... a b c_out c_in sum d e a b c_out c_in sum Hardware Design I (Chap. 4) 63 d 0 c Wallace tree multiplier CSA CSA2 CLA a 3 a 2 a a 0 ) b 3 b 2 b b 0 a 3 b 0 a 2 b 0 a b 0 a 0 b 0 CSA a 3 b a 2 b a b a 0 b CSA2 +) a 3 b 2 a 2 b 2 a b 2 a 0 b 2 a 3 b 3 a 2 b 3 a b 3 a 0 b 3 CLA z 7 z 6 z 5 z 4 z 3 z 2 z z 0 Hardware Design I (Chap. 4) 64 32

33 Example of 8-bit multiply Number of summation becomes 2/3 under one CSA After O(log n) of CSAs, it becomes sum of 2 binaries x ) A = a 7 a 6... a a 0 B = b 7 b 6... b b 0 Apply CLA at final A x b 0 A x b x 2 A x b 2 x 4 A x b 3 x 8 A x b 4 x 6 A x b 5 x 32 A x b 6 x 64 A x b 7 x 28 CSA CSA CSA CSA CSA CSA Hardware Design I (Chap. 4) 65 Division Implement computation on paper frankly e.g. 07 divided by 3 Cannot subtract Cannot subtract ) ) ) bit left shift x ) (7-bit left shift) 5-bit left shift Can subtract Hardware Design I (Chap. 4) 66 33

34 How to represent it to circuit? Implement computation on paper frankly Usually, it becomes sequential circuit (Chap. 6) If we achieve it with combinational logic, it requires much adders How to implement subtractable or not Firstly subtract and evaluate whether the result is negative value or not Constructed with subtracter and checking MSB If the value underruns 0, how do we treat it? Restoring method: add divisor to dividend Non-restoring method: detail is shown in later slide Hardware Design I (Chap. 4) 67 Restoring method If MSB of dividend after subtraction is, it adds divisor to restore In worst case, it requires twice adder per each digit Operation time becomes O(2n) e.g. 07 divided by 3 3 is denoted as and -3 is denoted as ) Add to 000 +) restore ) Add to +) restore ) Hardware Design I (Chap. 4) 68 34

35 Non-restoring method If temporal dividend becomes negative, this method adds following shifted dividend If temporal dividend is positive Subtract shifted dividend Quotient becomes if result is positive, otherwise 0 If temporal dividend is negative Add shifted dividend Quotient becomes if result is positive, otherwise 0 In some case, we have to compensate reminder Operation time becomes O(n) Hardware Design I (Chap. 4) 69 Example of non-restoring method Let s assume 37 divided by 6 Quotients 0 6 (00) 6 is denoted as 00 and -6 is denoted as x x x x If reminder becomes negative, correct remainder by adding Remainder (=) Hardware Design I (Chap. 4) 70 35

36 Utilizing higher radix under division We can speedup division by utilizing higher radix Prior division is radix-2 division Only prepare n left shifted divisor e.g. radix-4 division Prepare following divisor. n left shifted 2. n+ left shifted 3. (n left shifted) + (n+ left shifted) Subtract above three from dividend Get 2-digit of quotient simultaneously Quotient becomes 00 if all of them are not subtractable Quotient becomes 0 if only. is subtractable Quotient becomes 0 if. and 2. are subtractable Quotient becomes if all of them are subtractable Hardware Design I (Chap. 4) 7 Hardware Design I (Chap. 4) 72 36

37 Quiz What is the correct organization of 8- MUX? Hardware Design I (Chap. 4) 73 Answer Both and 4 are correct answer is based on AND-OR logic gate based organization 4 is based on transmission gate based organization Hardware Design I (Chap. 4) 74 37

38 Hardware Design I (Chap. 4) 75 Hardware Design I (Chap. 4) 76 38

CSE140: Components and Design Techniques for Digital Systems. Decoders, adders, comparators, multipliers and other ALU elements. Tajana Simunic Rosing

CSE140: Components and Design Techniques for Digital Systems. Decoders, adders, comparators, multipliers and other ALU elements. Tajana Simunic Rosing CSE4: Components and Design Techniques for Digital Systems Decoders, adders, comparators, multipliers and other ALU elements Tajana Simunic Rosing Mux, Demux Encoder, Decoder 2 Transmission Gate: Mux/Tristate

More information

Logic and Computer Design Fundamentals. Chapter 5 Arithmetic Functions and Circuits

Logic and Computer Design Fundamentals. Chapter 5 Arithmetic Functions and Circuits Logic and Computer Design Fundamentals Chapter 5 Arithmetic Functions and Circuits Arithmetic functions Operate on binary vectors Use the same subfunction in each bit position Can design functional block

More information

Adders, subtractors comparators, multipliers and other ALU elements

Adders, subtractors comparators, multipliers and other ALU elements CSE4: Components and Design Techniques for Digital Systems Adders, subtractors comparators, multipliers and other ALU elements Instructor: Mohsen Imani UC San Diego Slides from: Prof.Tajana Simunic Rosing

More information

ECE 545 Digital System Design with VHDL Lecture 1. Digital Logic Refresher Part A Combinational Logic Building Blocks

ECE 545 Digital System Design with VHDL Lecture 1. Digital Logic Refresher Part A Combinational Logic Building Blocks ECE 545 Digital System Design with VHDL Lecture Digital Logic Refresher Part A Combinational Logic Building Blocks Lecture Roadmap Combinational Logic Basic Logic Review Basic Gates De Morgan s Law Combinational

More information

ARITHMETIC COMBINATIONAL MODULES AND NETWORKS

ARITHMETIC COMBINATIONAL MODULES AND NETWORKS ARITHMETIC COMBINATIONAL MODULES AND NETWORKS 1 SPECIFICATION OF ADDER MODULES FOR POSITIVE INTEGERS HALF-ADDER AND FULL-ADDER MODULES CARRY-RIPPLE AND CARRY-LOOKAHEAD ADDER MODULES NETWORKS OF ADDER MODULES

More information

Adders, subtractors comparators, multipliers and other ALU elements

Adders, subtractors comparators, multipliers and other ALU elements CSE4: Components and Design Techniques for Digital Systems Adders, subtractors comparators, multipliers and other ALU elements Adders 2 Circuit Delay Transistors have instrinsic resistance and capacitance

More information

CS 140 Lecture 14 Standard Combinational Modules

CS 140 Lecture 14 Standard Combinational Modules CS 14 Lecture 14 Standard Combinational Modules Professor CK Cheng CSE Dept. UC San Diego Some slides from Harris and Harris 1 Part III. Standard Modules A. Interconnect B. Operators. Adders Multiplier

More information

DIGITAL TECHNICS. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute

DIGITAL TECHNICS. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute DIGITAL TECHNICS Dr. Bálint Pődör Óbuda University, Microelectronics and Technology Institute 4. LECTURE: COMBINATIONAL LOGIC DESIGN: ARITHMETICS (THROUGH EXAMPLES) 2016/2017 COMBINATIONAL LOGIC DESIGN:

More information

Binary addition by hand. Adding two bits

Binary addition by hand. Adding two bits Chapter 3 Arithmetic is the most basic thing you can do with a computer We focus on addition, subtraction, multiplication and arithmetic-logic units, or ALUs, which are the heart of CPUs. ALU design Bit

More information

Class Website:

Class Website: ECE 20B, Winter 2003 Introduction to Electrical Engineering, II LECTURE NOTES #5 Instructor: Andrew B. Kahng (lecture) Email: abk@ece.ucsd.edu Telephone: 858-822-4884 office, 858-353-0550 cell Office:

More information

Systems I: Computer Organization and Architecture

Systems I: Computer Organization and Architecture Systems I: Computer Organization and Architecture Lecture 6 - Combinational Logic Introduction A combinational circuit consists of input variables, logic gates, and output variables. The logic gates accept

More information

Chapter 4. Combinational: Circuits with logic gates whose outputs depend on the present combination of the inputs. elements. Dr.

Chapter 4. Combinational: Circuits with logic gates whose outputs depend on the present combination of the inputs. elements. Dr. Chapter 4 Dr. Panos Nasiopoulos Combinational: Circuits with logic gates whose outputs depend on the present combination of the inputs. Sequential: In addition, they include storage elements Combinational

More information

Chapter 5 Arithmetic Circuits

Chapter 5 Arithmetic Circuits Chapter 5 Arithmetic Circuits SKEE2263 Digital Systems Mun im/ismahani/izam {munim@utm.my,e-izam@utm.my,ismahani@fke.utm.my} February 11, 2016 Table of Contents 1 Iterative Designs 2 Adders 3 High-Speed

More information

Logic. Combinational. inputs. outputs. the result. system can

Logic. Combinational. inputs. outputs. the result. system can Digital Electronics Combinational Logic Functions Digital logic circuits can be classified as either combinational or sequential circuits. A combinational circuit is one where the output at any time depends

More information

Design of Sequential Circuits

Design of Sequential Circuits Design of Sequential Circuits Seven Steps: Construct a state diagram (showing contents of flip flop and inputs with next state) Assign letter variables to each flip flop and each input and output variable

More information

Lecture 2 Review on Digital Logic (Part 1)

Lecture 2 Review on Digital Logic (Part 1) Lecture 2 Review on Digital Logic (Part 1) Xuan Silvia Zhang Washington University in St. Louis http://classes.engineering.wustl.edu/ese461/ Grading Engagement 5% Review Quiz 10% Homework 10% Labs 40%

More information

9. Datapath Design. Jacob Abraham. Department of Electrical and Computer Engineering The University of Texas at Austin VLSI Design Fall 2017

9. Datapath Design. Jacob Abraham. Department of Electrical and Computer Engineering The University of Texas at Austin VLSI Design Fall 2017 9. Datapath Design Jacob Abraham Department of Electrical and Computer Engineering The University of Texas at Austin VLSI Design Fall 2017 October 2, 2017 ECE Department, University of Texas at Austin

More information

Combinational Logic. Lan-Da Van ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C.

Combinational Logic. Lan-Da Van ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C. Combinational Logic ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C. Fall, 2017 ldvan@cs.nctu.edu.tw http://www.cs.nctu.edu.tw/~ldvan/ Combinational Circuits

More information

Digital Integrated Circuits A Design Perspective. Arithmetic Circuits. Jan M. Rabaey Anantha Chandrakasan Borivoje Nikolic.

Digital Integrated Circuits A Design Perspective. Arithmetic Circuits. Jan M. Rabaey Anantha Chandrakasan Borivoje Nikolic. Digital Integrated Circuits A Design Perspective Jan M. Rabaey Anantha Chandrakasan Borivoje Nikolic Arithmetic Circuits January, 2003 1 A Generic Digital Processor MEMORY INPUT-OUTPUT CONTROL DATAPATH

More information

What s the Deal? MULTIPLICATION. Time to multiply

What s the Deal? MULTIPLICATION. Time to multiply What s the Deal? MULTIPLICATION Time to multiply Multiplying two numbers requires a multiply Luckily, in binary that s just an AND gate! 0*0=0, 0*1=0, 1*0=0, 1*1=1 Generate a bunch of partial products

More information

CSE140: Components and Design Techniques for Digital Systems. Logic minimization algorithm summary. Instructor: Mohsen Imani UC San Diego

CSE140: Components and Design Techniques for Digital Systems. Logic minimization algorithm summary. Instructor: Mohsen Imani UC San Diego CSE4: Components and Design Techniques for Digital Systems Logic minimization algorithm summary Instructor: Mohsen Imani UC San Diego Slides from: Prof.Tajana Simunic Rosing & Dr.Pietro Mercati Definition

More information

CSEE 3827: Fundamentals of Computer Systems. Combinational Circuits

CSEE 3827: Fundamentals of Computer Systems. Combinational Circuits CSEE 3827: Fundamentals of Computer Systems Combinational Circuits Outline (M&K 3., 3.3, 3.6-3.9, 4.-4.2, 4.5, 9.4) Combinational Circuit Design Standard combinational circuits enabler decoder encoder

More information

Carry Look Ahead Adders

Carry Look Ahead Adders Carry Look Ahead Adders Lesson Objectives: The objectives of this lesson are to learn about: 1. Carry Look Ahead Adder circuit. 2. Binary Parallel Adder/Subtractor circuit. 3. BCD adder circuit. 4. Binary

More information

14:332:231 DIGITAL LOGIC DESIGN. 2 s-complement Representation

14:332:231 DIGITAL LOGIC DESIGN. 2 s-complement Representation 4:332:23 DIGITAL LOGIC DESIGN Ivan Marsic, Rutgers University Electrical & Computer Engineering Fall 203 Lecture #3: Addition, Subtraction, Multiplication, and Division 2 s-complement Representation RECALL

More information

Fundamentals of Digital Design

Fundamentals of Digital Design Fundamentals of Digital Design Digital Radiation Measurement and Spectroscopy NE/RHP 537 1 Binary Number System The binary numeral system, or base-2 number system, is a numeral system that represents numeric

More information

14:332:231 DIGITAL LOGIC DESIGN

14:332:231 DIGITAL LOGIC DESIGN 4:332:23 DIGITAL LOGIC DEIGN Ivan Marsic, Rutgers University Electrical & Computer Engineering Fall 23 Lecture #4: Adders, ubtracters, and ALUs Vector Binary Adder [Wakerly 4 th Ed., ec. 6., p. 474] ingle

More information

Combinational Logic. Mantıksal Tasarım BBM231. section instructor: Ufuk Çelikcan

Combinational Logic. Mantıksal Tasarım BBM231. section instructor: Ufuk Çelikcan Combinational Logic Mantıksal Tasarım BBM23 section instructor: Ufuk Çelikcan Classification. Combinational no memory outputs depends on only the present inputs expressed by Boolean functions 2. Sequential

More information

Numbers and Arithmetic

Numbers and Arithmetic Numbers and Arithmetic See: P&H Chapter 2.4 2.6, 3.2, C.5 C.6 Hakim Weatherspoon CS 3410, Spring 2013 Computer Science Cornell University Big Picture: Building a Processor memory inst register file alu

More information

3. Combinational Circuit Design

3. Combinational Circuit Design CSEE 3827: Fundamentals of Computer Systems, Spring 2 3. Combinational Circuit Design Prof. Martha Kim (martha@cs.columbia.edu) Web: http://www.cs.columbia.edu/~martha/courses/3827/sp/ Outline (H&H 2.8,

More information

Digital System Design Combinational Logic. Assoc. Prof. Pradondet Nilagupta

Digital System Design Combinational Logic. Assoc. Prof. Pradondet Nilagupta Digital System Design Combinational Logic Assoc. Prof. Pradondet Nilagupta pom@ku.ac.th Acknowledgement This lecture note is modified from Engin112: Digital Design by Prof. Maciej Ciesielski, Prof. Tilman

More information

We are here. Assembly Language. Processors Arithmetic Logic Units. Finite State Machines. Circuits Gates. Transistors

We are here. Assembly Language. Processors Arithmetic Logic Units. Finite State Machines. Circuits Gates. Transistors CSC258 Week 3 1 Logistics If you cannot login to MarkUs, email me your UTORID and name. Check lab marks on MarkUs, if it s recorded wrong, contact Larry within a week after the lab. Quiz 1 average: 86%

More information

UNIT II COMBINATIONAL CIRCUITS:

UNIT II COMBINATIONAL CIRCUITS: UNIT II COMBINATIONAL CIRCUITS: INTRODUCTION: The digital system consists of two types of circuits, namely (i) (ii) Combinational circuits Sequential circuits Combinational circuit consists of logic gates

More information

Midterm Exam Two is scheduled on April 8 in class. On March 27 I will help you prepare Midterm Exam Two.

Midterm Exam Two is scheduled on April 8 in class. On March 27 I will help you prepare Midterm Exam Two. Announcements Midterm Exam Two is scheduled on April 8 in class. On March 27 I will help you prepare Midterm Exam Two. Chapter 5 1 Chapter 3: Part 3 Arithmetic Functions Iterative combinational circuits

More information

Arithmetic Circuits-2

Arithmetic Circuits-2 Arithmetic Circuits-2 Multipliers Array multipliers Shifters Barrel shifter Logarithmic shifter ECE 261 Krish Chakrabarty 1 Binary Multiplication M-1 X = X i 2 i i=0 Multiplicand N-1 Y = Y i 2 i i=0 Multiplier

More information

Digital Integrated Circuits A Design Perspective. Arithmetic Circuits. Jan M. Rabaey Anantha Chandrakasan Borivoje Nikolic.

Digital Integrated Circuits A Design Perspective. Arithmetic Circuits. Jan M. Rabaey Anantha Chandrakasan Borivoje Nikolic. Digital Integrated Circuits A Design Perspective Jan M. Rabaey Anantha Chandrakasan Borivoje Nikolic Arithmetic Circuits January, 2003 1 A Generic Digital Processor MEM ORY INPUT-OUTPUT CONTROL DATAPATH

More information

UNSIGNED BINARY NUMBERS DIGITAL ELECTRONICS SYSTEM DESIGN WHAT ABOUT NEGATIVE NUMBERS? BINARY ADDITION 11/9/2018

UNSIGNED BINARY NUMBERS DIGITAL ELECTRONICS SYSTEM DESIGN WHAT ABOUT NEGATIVE NUMBERS? BINARY ADDITION 11/9/2018 DIGITAL ELECTRONICS SYSTEM DESIGN LL 2018 PROFS. IRIS BAHAR & ROD BERESFORD NOVEMBER 9, 2018 LECTURE 19: BINARY ADDITION, UNSIGNED BINARY NUMBERS For the binary number b n-1 b n-2 b 1 b 0. b -1 b -2 b

More information

Combinational Logic. By : Ali Mustafa

Combinational Logic. By : Ali Mustafa Combinational Logic By : Ali Mustafa Contents Adder Subtractor Multiplier Comparator Decoder Encoder Multiplexer How to Analyze any combinational circuit like this? Analysis Procedure To obtain the output

More information

Binary addition example worked out

Binary addition example worked out Binary addition example worked out Some terms are given here Exercise: what are these numbers equivalent to in decimal? The initial carry in is implicitly 0 1 1 1 0 (Carries) 1 0 1 1 (Augend) + 1 1 1 0

More information

Numbers and Arithmetic

Numbers and Arithmetic Numbers and Arithmetic See: P&H Chapter 2.4 2.6, 3.2, C.5 C.6 Hakim Weatherspoon CS 3410, Spring 2013 Computer Science Cornell University Big Picture: Building a Processor memory inst register file alu

More information

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: Digital Logic

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: Digital Logic Computer Science 324 Computer Architecture Mount Holyoke College Fall 2007 Topic Notes: Digital Logic Our goal for the next few weeks is to paint a a reasonably complete picture of how we can go from transistor

More information

MODULAR CIRCUITS CHAPTER 7

MODULAR CIRCUITS CHAPTER 7 CHAPTER 7 MODULAR CIRCUITS A modular circuit is a digital circuit that performs a specific function or has certain usage. The modular circuits to be introduced in this chapter are decoders, encoders, multiplexers,

More information

EECS150. Arithmetic Circuits

EECS150. Arithmetic Circuits EE5 ection 8 Arithmetic ircuits Fall 2 Arithmetic ircuits Excellent Examples of ombinational Logic Design Time vs. pace Trade-offs Doing things fast may require more logic and thus more space Example:

More information

COMBINATIONAL LOGIC FUNCTIONS

COMBINATIONAL LOGIC FUNCTIONS COMBINATIONAL LOGIC FUNCTIONS Digital logic circuits can be classified as either combinational or sequential circuits. A combinational circuit is one where the output at any time depends only on the present

More information

14:332:231 DIGITAL LOGIC DESIGN. Why Binary Number System?

14:332:231 DIGITAL LOGIC DESIGN. Why Binary Number System? :33:3 DIGITAL LOGIC DESIGN Ivan Marsic, Rutgers University Electrical & Computer Engineering Fall 3 Lecture #: Binary Number System Complement Number Representation X Y Why Binary Number System? Because

More information

1 Short adders. t total_ripple8 = t first + 6*t middle + t last = 4t p + 6*2t p + 2t p = 18t p

1 Short adders. t total_ripple8 = t first + 6*t middle + t last = 4t p + 6*2t p + 2t p = 18t p UNIVERSITY OF CALIFORNIA College of Engineering Department of Electrical Engineering and Computer Sciences Study Homework: Arithmetic NTU IC54CA (Fall 2004) SOLUTIONS Short adders A The delay of the ripple

More information

Number System. Decimal to binary Binary to Decimal Binary to octal Binary to hexadecimal Hexadecimal to binary Octal to binary

Number System. Decimal to binary Binary to Decimal Binary to octal Binary to hexadecimal Hexadecimal to binary Octal to binary Number System Decimal to binary Binary to Decimal Binary to octal Binary to hexadecimal Hexadecimal to binary Octal to binary BOOLEAN ALGEBRA BOOLEAN LOGIC OPERATIONS Logical AND Logical OR Logical COMPLEMENTATION

More information

Hakim Weatherspoon CS 3410 Computer Science Cornell University

Hakim Weatherspoon CS 3410 Computer Science Cornell University Hakim Weatherspoon CS 3410 Computer Science Cornell University The slides are the product of many rounds of teaching CS 3410 by Professors Weatherspoon, Bala, Bracy, and Sirer. memory inst 32 register

More information

Overview. Arithmetic circuits. Binary half adder. Binary full adder. Last lecture PLDs ROMs Tristates Design examples

Overview. Arithmetic circuits. Binary half adder. Binary full adder. Last lecture PLDs ROMs Tristates Design examples Overview rithmetic circuits Last lecture PLDs ROMs Tristates Design examples Today dders Ripple-carry Carry-lookahead Carry-select The conclusion of combinational logic!!! General-purpose building blocks

More information

Combinational Logic. Lan-Da Van ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C.

Combinational Logic. Lan-Da Van ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C. Combinational Logic ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C. Fall, 2010 ldvan@cs.nctu.edu.tw http://www.cs.nctu.edu.tw/~ldvan/ Combinational Circuits

More information

Combinational Logic Design Arithmetic Functions and Circuits

Combinational Logic Design Arithmetic Functions and Circuits Combinational Logic Design Arithmetic Functions and Circuits Overview Binary Addition Half Adder Full Adder Ripple Carry Adder Carry Look-ahead Adder Binary Subtraction Binary Subtractor Binary Adder-Subtractor

More information

ISSN (PRINT): , (ONLINE): , VOLUME-4, ISSUE-10,

ISSN (PRINT): , (ONLINE): , VOLUME-4, ISSUE-10, A NOVEL DOMINO LOGIC DESIGN FOR EMBEDDED APPLICATION Dr.K.Sujatha Associate Professor, Department of Computer science and Engineering, Sri Krishna College of Engineering and Technology, Coimbatore, Tamilnadu,

More information

ECE 545 Digital System Design with VHDL Lecture 1A. Digital Logic Refresher Part A Combinational Logic Building Blocks

ECE 545 Digital System Design with VHDL Lecture 1A. Digital Logic Refresher Part A Combinational Logic Building Blocks ECE 545 Digital System Design with VHDL Lecture A Digital Logic Refresher Part A Combinational Logic Building Blocks Lecture Roadmap Combinational Logic Basic Logic Review Basic Gates De Morgan s Laws

More information

ELEN Electronique numérique

ELEN Electronique numérique ELEN0040 - Electronique numérique Patricia ROUSSEAUX Année académique 2014-2015 CHAPITRE 3 Combinational Logic Circuits ELEN0040 3-4 1 Combinational Functional Blocks 1.1 Rudimentary Functions 1.2 Functions

More information

CMPUT 329. Circuits for binary addition

CMPUT 329. Circuits for binary addition CMPUT 329 Parallel Adder with Carry Lookahead and ALU Ioanis Nikolaidis (Katz & Borriello) rcuits for binary addition Full adder (carry-in to cascade for multi-bit adders) Sum = xor A xor B Cout = B +

More information

Number representation

Number representation Number representation A number can be represented in binary in many ways. The most common number types to be represented are: Integers, positive integers one-complement, two-complement, sign-magnitude

More information

ELCT201: DIGITAL LOGIC DESIGN

ELCT201: DIGITAL LOGIC DESIGN ELCT201: DIGITAL LOGIC DESIGN Dr. Eng. Haitham Omran, haitham.omran@guc.edu.eg Dr. Eng. Wassim Alexan, wassim.joseph@guc.edu.eg Lecture 5 Following the slides of Dr. Ahmed H. Madian ذو الحجة 1438 ه Winter

More information

ECE380 Digital Logic. Positional representation

ECE380 Digital Logic. Positional representation ECE380 Digital Logic Number Representation and Arithmetic Circuits: Number Representation and Unsigned Addition Dr. D. J. Jackson Lecture 16-1 Positional representation First consider integers Begin with

More information

Lecture 18: Datapath Functional Units

Lecture 18: Datapath Functional Units Lecture 8: Datapath Functional Unit Outline Comparator Shifter Multi-input Adder Multiplier 8: Datapath Functional Unit CMOS VLSI Deign 4th Ed. 2 Comparator 0 detector: A = 00 000 detector: A = Equality

More information

Introduction to Digital Logic Missouri S&T University CPE 2210 Subtractors

Introduction to Digital Logic Missouri S&T University CPE 2210 Subtractors Introduction to Digital Logic Missouri S&T University CPE 2210 Egemen K. Çetinkaya Egemen K. Çetinkaya Department of Electrical & Computer Engineering Missouri University of Science and Technology cetinkayae@mst.edu

More information

CMP 334: Seventh Class

CMP 334: Seventh Class CMP 334: Seventh Class Performance HW 5 solution Averages and weighted averages (review) Amdahl's law Ripple-carry adder circuits Binary addition Half-adder circuits Full-adder circuits Subtraction, negative

More information

Numbers & Arithmetic. Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University. See: P&H Chapter , 3.2, C.5 C.

Numbers & Arithmetic. Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University. See: P&H Chapter , 3.2, C.5 C. Numbers & Arithmetic Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University See: P&H Chapter 2.4-2.6, 3.2, C.5 C.6 Example: Big Picture Computer System Organization and Programming

More information

Lecture 12: Datapath Functional Units

Lecture 12: Datapath Functional Units Lecture 2: Datapath Functional Unit Slide courtey of Deming Chen Slide baed on the initial et from David Harri CMOS VLSI Deign Outline Comparator Shifter Multi-input Adder Multiplier Reading:.3-4;.8-9

More information

ECE/CS 250 Computer Architecture

ECE/CS 250 Computer Architecture ECE/CS 250 Computer Architecture Basics of Logic Design: Boolean Algebra, Logic Gates (Combinational Logic) Tyler Bletsch Duke University Slides are derived from work by Daniel J. Sorin (Duke), Alvy Lebeck

More information

ECE 250 / CPS 250 Computer Architecture. Basics of Logic Design Boolean Algebra, Logic Gates

ECE 250 / CPS 250 Computer Architecture. Basics of Logic Design Boolean Algebra, Logic Gates ECE 250 / CPS 250 Computer Architecture Basics of Logic Design Boolean Algebra, Logic Gates Benjamin Lee Slides based on those from Andrew Hilton (Duke), Alvy Lebeck (Duke) Benjamin Lee (Duke), and Amir

More information

EECS150 - Digital Design Lecture 24 - Arithmetic Blocks, Part 2 + Shifters

EECS150 - Digital Design Lecture 24 - Arithmetic Blocks, Part 2 + Shifters EECS150 - Digital Design Lecture 24 - Arithmetic Blocks, Part 2 + Shifters April 15, 2010 John Wawrzynek 1 Multiplication a 3 a 2 a 1 a 0 Multiplicand b 3 b 2 b 1 b 0 Multiplier X a 3 b 0 a 2 b 0 a 1 b

More information

Boolean Algebra and Digital Logic 2009, University of Colombo School of Computing

Boolean Algebra and Digital Logic 2009, University of Colombo School of Computing IT 204 Section 3.0 Boolean Algebra and Digital Logic Boolean Algebra 2 Logic Equations to Truth Tables X = A. B + A. B + AB A B X 0 0 0 0 3 Sum of Products The OR operation performed on the products of

More information

IT T35 Digital system desigm y - ii /s - iii

IT T35 Digital system desigm y - ii /s - iii UNIT - II Combinational Logic Adders subtractors code converters binary parallel adder decimal adder magnitude comparator encoders decoders multiplexers demultiplexers-binarymultiplier Parity generator

More information

Unit II Chapter 4:- Digital Logic Contents 4.1 Introduction... 4

Unit II Chapter 4:- Digital Logic Contents 4.1 Introduction... 4 Unit II Chapter 4:- Digital Logic Contents 4.1 Introduction... 4 4.1.1 Signal... 4 4.1.2 Comparison of Analog and Digital Signal... 7 4.2 Number Systems... 7 4.2.1 Decimal Number System... 7 4.2.2 Binary

More information

Graduate Institute of Electronics Engineering, NTU Basic Division Scheme

Graduate Institute of Electronics Engineering, NTU Basic Division Scheme Basic Division Scheme 台灣大學電子所吳安宇博士 2002 ACCESS IC LAB Outline Shift/subtract division algorithm. Programmed division. Restoring hardware dividers. Nonstoring and signed division. Radix-2 SRT divisioin.

More information

Tree and Array Multipliers Ivor Page 1

Tree and Array Multipliers Ivor Page 1 Tree and Array Multipliers 1 Tree and Array Multipliers Ivor Page 1 11.1 Tree Multipliers In Figure 1 seven input operands are combined by a tree of CSAs. The final level of the tree is a carry-completion

More information

Arithmetic Circuits-2

Arithmetic Circuits-2 Arithmetic Circuits-2 Multipliers Array multipliers Shifters Barrel shifter Logarithmic shifter ECE 261 Krish Chakrabarty 1 Binary Multiplication M-1 X = X i 2 i i=0 Multiplicand N-1 Y = Y i 2 i i=0 Multiplier

More information

Digital Logic Design ENEE x. Lecture 14

Digital Logic Design ENEE x. Lecture 14 Digital Logic Design ENEE 244-010x Lecture 14 Announcements Homework 6 due today Agenda Last time: Binary Adders and Subtracters (5.1, 5.1.1) Carry Lookahead Adders (5.1.2, 5.1.3) This time: Decimal Adders

More information

CMPEN 411 VLSI Digital Circuits Spring Lecture 19: Adder Design

CMPEN 411 VLSI Digital Circuits Spring Lecture 19: Adder Design CMPEN 411 VLSI Digital Circuits Spring 2011 Lecture 19: Adder Design [Adapted from Rabaey s Digital Integrated Circuits, Second Edition, 2003 J. Rabaey, A. Chandrakasan, B. Nikolic] Sp11 CMPEN 411 L19

More information

VLSI Design. [Adapted from Rabaey s Digital Integrated Circuits, 2002, J. Rabaey et al.] ECE 4121 VLSI DEsign.1

VLSI Design. [Adapted from Rabaey s Digital Integrated Circuits, 2002, J. Rabaey et al.] ECE 4121 VLSI DEsign.1 VLSI Design Adder Design [Adapted from Rabaey s Digital Integrated Circuits, 2002, J. Rabaey et al.] ECE 4121 VLSI DEsign.1 Major Components of a Computer Processor Devices Control Memory Input Datapath

More information

CSE 140 Lecture 11 Standard Combinational Modules. CK Cheng and Diba Mirza CSE Dept. UC San Diego

CSE 140 Lecture 11 Standard Combinational Modules. CK Cheng and Diba Mirza CSE Dept. UC San Diego CSE 4 Lecture Standard Combinational Modules CK Cheng and Diba Mirza CSE Dept. UC San Diego Part III - Standard Combinational Modules (Harris: 2.8, 5) Signal Transport Decoder: Decode address Encoder:

More information

CHAPTER1: Digital Logic Circuits Combination Circuits

CHAPTER1: Digital Logic Circuits Combination Circuits CS224: Computer Organization S.KHABET CHAPTER1: Digital Logic Circuits Combination Circuits 1 PRIMITIVE LOGIC GATES Each of our basic operations can be implemented in hardware using a primitive logic gate.

More information

Lecture 8: Sequential Multipliers

Lecture 8: Sequential Multipliers Lecture 8: Sequential Multipliers ECE 645 Computer Arithmetic 3/25/08 ECE 645 Computer Arithmetic Lecture Roadmap Sequential Multipliers Unsigned Signed Radix-2 Booth Recoding High-Radix Multiplication

More information

Module 2. Basic Digital Building Blocks. Binary Arithmetic & Arithmetic Circuits Comparators, Decoders, Encoders, Multiplexors Flip-Flops

Module 2. Basic Digital Building Blocks. Binary Arithmetic & Arithmetic Circuits Comparators, Decoders, Encoders, Multiplexors Flip-Flops Module 2 asic Digital uilding locks Lecturer: Dr. Yongsheng Gao Office: Tech 3.25 Email: Web: Structure: Textbook: yongsheng.gao@griffith.edu.au maxwell.me.gu.edu.au 6 lecturers 1 tutorial 1 laboratory

More information

CHAPTER 2 NUMBER SYSTEMS

CHAPTER 2 NUMBER SYSTEMS CHAPTER 2 NUMBER SYSTEMS The Decimal Number System : We begin our study of the number systems with the familiar decimal number system. The decimal system contains ten unique symbol 0, 1, 2, 3, 4, 5, 6,

More information

Digital Logic. CS211 Computer Architecture. l Topics. l Transistors (Design & Types) l Logic Gates. l Combinational Circuits.

Digital Logic. CS211 Computer Architecture. l Topics. l Transistors (Design & Types) l Logic Gates. l Combinational Circuits. CS211 Computer Architecture Digital Logic l Topics l Transistors (Design & Types) l Logic Gates l Combinational Circuits l K-Maps Figures & Tables borrowed from:! http://www.allaboutcircuits.com/vol_4/index.html!

More information

This Unit: Arithmetic. CIS 371 Computer Organization and Design. Pre-Class Exercise. Readings

This Unit: Arithmetic. CIS 371 Computer Organization and Design. Pre-Class Exercise. Readings This Unit: Arithmetic CI 371 Computer Organization and Design Unit 3: Arithmetic Based on slides by Prof. Amir Roth & Prof. Milo Martin App App App ystem software Mem CPU I/O A little review Binary + 2s

More information

COE 202: Digital Logic Design Combinational Circuits Part 2. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:

COE 202: Digital Logic Design Combinational Circuits Part 2. Dr. Ahmad Almulhem   ahmadsm AT kfupm Phone: Office: COE 202: Digital Logic Design Combinational Circuits Part 2 Dr. Ahmad Almulhem Email: ahmadsm AT kfupm Phone: 860-7554 Office: 22-324 Objectives Arithmetic Circuits Adder Subtractor Carry Look Ahead Adder

More information

EFFICIENT MULTIOUTPUT CARRY LOOK-AHEAD ADDERS

EFFICIENT MULTIOUTPUT CARRY LOOK-AHEAD ADDERS INTERNATIONAL JOURNAL OF RESEARCH IN COMPUTER APPLICATIONS AND ROBOTICS ISSN 2320-7345 EFFICIENT MULTIOUTPUT CARRY LOOK-AHEAD ADDERS B. Venkata Sreecharan 1, C. Venkata Sudhakar 2 1 M.TECH (VLSI DESIGN)

More information

Proposal to Improve Data Format Conversions for a Hybrid Number System Processor

Proposal to Improve Data Format Conversions for a Hybrid Number System Processor Proceedings of the 11th WSEAS International Conference on COMPUTERS, Agios Nikolaos, Crete Island, Greece, July 6-8, 007 653 Proposal to Improve Data Format Conversions for a Hybrid Number System Processor

More information

EE260: Digital Design, Spring n Digital Computers. n Number Systems. n Representations. n Conversions. n Arithmetic Operations.

EE260: Digital Design, Spring n Digital Computers. n Number Systems. n Representations. n Conversions. n Arithmetic Operations. EE 260: Introduction to Digital Design Number Systems Yao Zheng Department of Electrical Engineering University of Hawaiʻi at Mānoa Overview n Digital Computers n Number Systems n Representations n Conversions

More information

Combinational Logic Design Combinational Functions and Circuits

Combinational Logic Design Combinational Functions and Circuits Combinational Logic Design Combinational Functions and Circuits Overview Combinational Circuits Design Procedure Generic Example Example with don t cares: BCD-to-SevenSegment converter Binary Decoders

More information

Proposal to Improve Data Format Conversions for a Hybrid Number System Processor

Proposal to Improve Data Format Conversions for a Hybrid Number System Processor Proposal to Improve Data Format Conversions for a Hybrid Number System Processor LUCIAN JURCA, DANIEL-IOAN CURIAC, AUREL GONTEAN, FLORIN ALEXA Department of Applied Electronics, Department of Automation

More information

INF2270 Spring Philipp Häfliger. Lecture 8: Superscalar CPUs, Course Summary/Repetition (1/2)

INF2270 Spring Philipp Häfliger. Lecture 8: Superscalar CPUs, Course Summary/Repetition (1/2) INF2270 Spring 2010 Philipp Häfliger Summary/Repetition (1/2) content From Scalar to Superscalar Lecture Summary and Brief Repetition Binary numbers Boolean Algebra Combinational Logic Circuits Encoder/Decoder

More information

Chapter 5. Digital Design and Computer Architecture, 2 nd Edition. David Money Harris and Sarah L. Harris. Chapter 5 <1>

Chapter 5. Digital Design and Computer Architecture, 2 nd Edition. David Money Harris and Sarah L. Harris. Chapter 5 <1> Chapter 5 Digital Design and Computer Architecture, 2 nd Edition David Money Harris and Sarah L. Harris Chapter 5 Chapter 5 :: Topics Introduction Arithmetic Circuits umber Systems Sequential Building

More information

Lecture 12: Datapath Functional Units

Lecture 12: Datapath Functional Units Introduction to CMOS VLSI Deign Lecture 2: Datapath Functional Unit David Harri Harvey Mudd College Spring 2004 Outline Comparator Shifter Multi-input Adder Multiplier 2: Datapath Functional Unit CMOS

More information

Binary Multipliers. Reading: Study Chapter 3. The key trick of multiplication is memorizing a digit-to-digit table Everything else was just adding

Binary Multipliers. Reading: Study Chapter 3. The key trick of multiplication is memorizing a digit-to-digit table Everything else was just adding Binary Multipliers The key trick of multiplication is memorizing a digit-to-digit table Everything else was just adding 2 3 4 5 6 7 8 9 2 3 4 5 6 7 8 9 2 2 4 6 8 2 4 6 8 3 3 6 9 2 5 8 2 24 27 4 4 8 2 6

More information

Digital Logic: Boolean Algebra and Gates. Textbook Chapter 3

Digital Logic: Boolean Algebra and Gates. Textbook Chapter 3 Digital Logic: Boolean Algebra and Gates Textbook Chapter 3 Basic Logic Gates XOR CMPE12 Summer 2009 02-2 Truth Table The most basic representation of a logic function Lists the output for all possible

More information

Adders - Subtractors

Adders - Subtractors Adders - Subtractors Lesson Objectives: The objectives of this lesson are to learn about: 1. Half adder circuit. 2. Full adder circuit. 3. Binary parallel adder circuit. 4. Half subtractor circuit. 5.

More information

Combina-onal Logic Chapter 4. Topics. Combina-on Circuit 10/13/10. EECE 256 Dr. Sidney Fels Steven Oldridge

Combina-onal Logic Chapter 4. Topics. Combina-on Circuit 10/13/10. EECE 256 Dr. Sidney Fels Steven Oldridge Combina-onal Logic Chapter 4 EECE 256 Dr. Sidney Fels Steven Oldridge Topics Combina-onal circuits Combina-onal analysis Design procedure simple combined to make complex adders, subtractors, converters

More information

Residue Number Systems Ivor Page 1

Residue Number Systems Ivor Page 1 Residue Number Systems 1 Residue Number Systems Ivor Page 1 7.1 Arithmetic in a modulus system The great speed of arithmetic in Residue Number Systems (RNS) comes from a simple theorem from number theory:

More information

DIVISION BY DIGIT RECURRENCE

DIVISION BY DIGIT RECURRENCE DIVISION BY DIGIT RECURRENCE 1 SEVERAL DIVISION METHODS: DIGIT-RECURRENCE METHOD studied in this chapter MULTIPLICATIVE METHOD (Chapter 7) VARIOUS APPROXIMATION METHODS (power series expansion), SPECIAL

More information

Arithmetic in Integer Rings and Prime Fields

Arithmetic in Integer Rings and Prime Fields Arithmetic in Integer Rings and Prime Fields A 3 B 3 A 2 B 2 A 1 B 1 A 0 B 0 FA C 3 FA C 2 FA C 1 FA C 0 C 4 S 3 S 2 S 1 S 0 http://koclab.org Çetin Kaya Koç Spring 2018 1 / 71 Contents Arithmetic in Integer

More information

The goal differs from prime factorization. Prime factorization would initialize all divisors to be prime numbers instead of integers*

The goal differs from prime factorization. Prime factorization would initialize all divisors to be prime numbers instead of integers* Quantum Algorithm Processor For Finding Exact Divisors Professor J R Burger Summary Wiring diagrams are given for a quantum algorithm processor in CMOS to compute, in parallel, all divisors of an n-bit

More information

Computer Science. 19. Combinational Circuits. Computer Science COMPUTER SCIENCE. Section 6.1.

Computer Science. 19. Combinational Circuits. Computer Science COMPUTER SCIENCE. Section 6.1. COMPUTER SCIENCE S E D G E W I C K / W A Y N E PA R T I I : A L G O R I T H M S, M A C H I N E S, a n d T H E O R Y Computer Science Computer Science An Interdisciplinary Approach Section 6.1 ROBERT SEDGEWICK

More information

Design of Combinational Logic

Design of Combinational Logic Pune Vidyarthi Griha s COLLEGE OF ENGINEERING, NASHIK 3. Design of Combinational Logic By Prof. Anand N. Gharu (Assistant Professor) PVGCOE Computer Dept.. 30 th June 2017 CONTENTS :- 1. Code Converter

More information