ARITHMETIC COMBINATIONAL MODULES AND NETWORKS

Size: px
Start display at page:

Download "ARITHMETIC COMBINATIONAL MODULES AND NETWORKS"

Transcription

1 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 REPRESENTATION OF SIGNED INTEGERS: 1. sign-and-magnitude 2. two s-complement 3. ones -complement ADDITION AND SUBTRACTION IN TWO S COMPLEMENT ARITHMETIC-LOGIC UNITS (ALU) COMPARATOR MODULES AND NETWORKS MULTIPLICATION OF POSITIVE INTEGERS

2 ADDITION OF POSITIVE INTEGERS 2 CONVENTIONAL RADIX-2 NUMBER SYSTEM: RANGE: 0 to 2 n 1 x = (x n 1,..., x 0 ) x, x = n 1 x i 2 i i=0 integer

3 ADDER MODULES FOR POSITIVE INTEGERS 3 x y n n c out ADDER c in n z Figure 10.1: ADDER MODULE. x + y + c in = 2 n c out + z

4 A HIGH-LEVEL SPECIFICATION OF ADDER MODULE 4 INPUTS: x = (x n 1,..., x 0 ), x j {0, 1} y = (y n 1,..., y 0 ), y j {0, 1} c in {0, 1} OUTPUTS: z = (z n 1,..., z 0 ), z j {0, 1} c out {0, 1} FUNCTIONS: z = (x + y + c in ) mod 2 n c out = 1 if (x + y + c in ) 2 n 0 otherwise

5 EXAMPLE for n=5 5 x y c in z c out ( ) mod 32 = 27 0 because ( ) < ( ) mod 32 = 2 1 because ( ) > 32

6 CARRY-RIPPLE ADDER IMPLEMENTATION 6 y n-1 x n-1 y i x i y 0 x 0 c out =c n c i+1 c i c 1 Full Adder Full Adder Full Adder = c in c 0 z n-1 z i z 0 Figure 10.2: CARRY-RIPPLE ADDER MODULE. DELAY OF CARRY-RIPPLE ADDER t p (net) = (n 1)t c + max(t z, t c ) t c = Delay(c i c i+1 ) t z = Delay(c i z i )

7 HIGH-LEVEL SPECIFICATION OF FULL-ADDER 7 x i + y i + c i = 2c i+1 + z i INPUTS: x i, y i, c i {0, 1} OUTPUTS: z i, c i+1 {0, 1} FUNCTION: z i = (x i + y i + c i ) mod 2 c i+1 = 1 if (x i + y i + c i ) 2 0 otherwise

8 FULL-ADDER IMPLEMENTATION 8 x i y i c i c i+1 z i z i = x i y ic i x iy i c i x iy ic i x i y i c i c i+1 = x i y i x i c i y i c i

9 FULL ADDER TWO-LEVEL IMPLEMENTATION 9 x i y i x i y i x i x i y i c i y i x i y i c i c i z i x i y i x i c c i+1 i y i c i c i+1 x i y i c i (a) Figure 10.3: IMPLEMENTATIONS OF FULL-ADDER MODULE: a) TWO-LEVEL.

10 ALTERNATIVE IMPLEMENTATION 10 ADDITION mod 2 SUM IS 1 WHEN NUMBER OF 1 S IN INPUTS (including the carry-in) IS ODD: z i = x i y i c i CARRY-OUT IS 1 WHEN (x i + y i = 2) or (x i + y i = 1 and c i = 1): c i+1 = x i y i INTERMEDIATE VARIABLES PROPAGATE GENERATE (x i y i )c i p i = x i y i g i = x i y i HALF-ADDER x i y i g i p i

11 IMPLEMENTATION WITH HALF-ADDERS 11 FA EXPRESSIONS IN TERMS OF p is, g is and c is z i = p i c i c i+1 = g i p i c i x i y i Half Adder (HA) p i HA z i g i c i c i+1 (b) x i y i p i g i z i c i c i+1 (c) Figure 10.3: IMPLEMENTATIONS OF FULL-ADDER MODULE: b) MULTILEVEL GATE NETWORK WITH XORs, ANDs and OR; c) WITH XORs and NANDs.

12 WORST-CASE DELAY 12 y n-1 x n-1 y i x i y 0 x 0 c out =c n c i+1 c i c 1 Full Adder Full Adder Full Adder = c in c 0 z n-1 z i z 0 Figure 10.2: CARRY-RIPPLE ADDER MODULE. WORST-CASE DELAY t p = t xor + 2(n 1)t nand + max(2t nand, t xor )

13 CHARACTERISTICS OF FULL-ADDER IN cmos FAMILY 13 Input [standard loads] c i 1.3 x i 1.1 y i 1.3 Size: 7 [equivalent gates] From To Propagation delays t plh t phl [ns] [ns] c i z i L L x i z i L L y i z i L L c i c i L L x i c i L L y i c i L L L: load on the gate output

14 CARRY-LOOKAHEAD ADDER IMPLEMENTATION 14 FASTER IMPLEMENTATION ADDITION AS A TWO-STEP PROCESS: 1. DETERMINE THE VALUES OF ALL THE CARRIES 2. SIMULTANEOUSLY COMPUTE ALL THE RESULT BITS

15 CARRY-LOOKAHEAD ADDER MODULE 15 x n y n c out = c c n 0 = c in Carry Generator c n-1 x y c 1 n n Sum Generator z n Figure 10.4: CARRY-LOOKAHEAD ADDER MODULE.

16 SWITCHING EXPRESSIONS 16 INTERMEDIATE CARRIES: c i+1 = g i p i c i BY SUBSTITUTION, c 1 = g 0 p 0 c 0 c 2 = g 1 p 1 c 1 = g 1 p 1 g 0 p 1 p 0 c 0 c 3 = g 2 p 2 c 2 = g 2 p 2 g 1 p 2 p 1 g 0 p 2 p 1 p 0 c 0 c 4 = g 3 p 3 g 2 p 3 p 2 g 1 p 3 p 2 p 1 g 0 p 3 p 2 p 1 p 0 c 0

17 17 g 3 g 2 CLG-4 p 3 p 2 g 1 p 1 g 0 p 0 c 0 G P p 3 p2 p 1 p 0 c 4 c 3 c 2 c 1 (a) Figure 10.5: CARRY-LOOKAHEAD ADDER: a) 4-BIT CARRY-LOOKAHEAD GENERATOR WITH P and G OUTPUTS (clg-4).

18 18 y 3 x 3 y 2 x 2 y 1 x 1 y 0 x 0 g p g p g p g p c 4 G P CARRY LOOKAHEAD GENERATOR (CLG-4) c 0 c c c p 3 p 2 p 1 p y i x i z 3 z 2 z 1 z 0 (b) Figure 10.5: CARRY-LOOKAHEAD ADDER: b) 4-BIT MODULE (cla-4); (clg-4). t p (x 0 c 4 ) = t pg + t CLG 4 t p (c 0 c 4 ) = t CLG 4 t p (x 0 P, G) = t pg + t CLG 4 t p (x 0 z 3 ) = t pg + t CLG 4 + t XOR

19 MODULE PROPAGATE AND GENERATE SIGNALS 19 P = 1: c in PROPAGATED BY THE MODULE G = 1: c out = 1 GENERATED BY THE MODULE, IRRESPECTIVE OF c in P = G = 1 if x + y = otherwise 1 if x + y otherwise c out = G P c in P = p 3 p 2 p 1 p 0 G = g 3 p 3 g 2 p 3 p 2 g 1 p 3 p 2 p 1 g 0

20 NETWORKS OF ADDER MODULES 20 ITERATIVE (CARRY-RIPPLE) ADDER NETWORK x = (x (3), x (2), x (1), x (0) ) x (3) = (x 15, x 14, x 13, x 12 ) x (2) = (x 11, x 10, x 9, x 8 ) x (1) = (x 7, x 6, x 5, x 4 ) x (0) = (x 3, x 2, x 1, x 0 ) where x = 2 12 x (3) x (2) x (1) + x (0)

21 16-BIT CARRY-RIPPLE ADDER 21 x (3) y (3) x (2) y (2) x (1) y (1) x (0) y (0) c out= c16 4-bit adder c 12 4-bit adder c 8 4-bit adder c 4 4-bit adder c in = c z (3) z (2) z (1) z (0) Figure 10.6: 16-BIT CARRY-RIPPLE ADDER NETWORK USING 4-BIT ADDER MODULES.

22 CARRY-LOOKAHEAD ADDER NETWORK 22 carries from CLG-4 modules c 28 c 24 c 20 c 16 c 12 c 8 c 4 x 7 4 y 7 4 x 6 4 y 6 4 x 5 4 y 5 4 x 4 4 y 4 4 x 3 4 y 3 4 x 2 4 y 2 4 x 1 4 y 1 4 x 0 4 y 0 4 CLA-4 CLA-4 CLA-4 CLA-4 CLA-4 CLA-4 CLA-4 CLA-4 c z 7 z 6 z 5 z 4 z 3 z 2 z 1 z 0 G 7 P 7 G 6 P 6 G 5 P 5 G 4 P 4 G 3 P 3 G 2 P 2 G 1 P 1 G 0 P 0 c 32 CLG-4 CLG-4 c 28 c 24 c 20 c 16 c 12 c 8 c 4 critical path carries to CLA-4 modules Figure 10.7: 32-BIT CARRY-LOOKAHEAD ADDER USING cla-4 AND clg-4 MODULES. PROPAGATION DELAY: t p (net) = t P G + 2t clg 4 + t add

23 CLA ADDER (cont.) 23 c 4 = G 0 P 0 c 0 c 8 = G 1 P 1 G 0 P 1 P 0 c 0 c 12 = G 2 P 2 G 1 P 2 P 1 G 0 P 2 P 1 P 0 c 0 c 16 = G 3 P 3 G 2 P 3 P 2 G 1 P 3 P 2 P 1 G 0 P 3 P 2 P 1 P 0 c 0 P 0 = p 3 p 2 p 1 p 0 G 0 = g 3 g 2 p 3 g 1 p 3 p 2 g 0 p 3 p 2 p 1

24 REPRESENTATION OF SIGNED INTEGERS AND BASIC OPERATIONS 24 TWO COMMON REPRESENTATIONS: - SIGN-AND-MAGNITUDE (SM) - TRUE-AND-COMPLEMENT (TC)

25 SIGN-AND-MAGNITUDE (SM) SYSTEM 25 x REPRESENTED BY PAIR (x s, x m ) sign: magnitude: x s = RANGE OF SIGNED INTEGERS 0 if x 0 1 if x 0 x m total number of bits: n sign: 1 magnitude: n 1 (2 n 1 1) x 2 n 1 1 TWO REPRESENTATIONS OF ZERO: x s = 0, x m = 0 (positive zero) x s = 1, x m = 0 (negative zero)

26 TWO S-COMPLEMENT SYSTEM 26 NO SEPARATION BETWEEN THE REPRESENTATION OF SIGN AND REPRESENTATION OF MAGNITUDE SIGNED INTEGER x REPRESENTED BY POSITIVE INTEGER x R MAP 2: BINARY REPRESENTATION OF x R x R = n 1 x i2 i, 0 x R 2 n 1 i=0 MAP 1: TWO S COMPLEMENT x R = x mod 2 n BY DEFINITION OF mod, FOR x < 2 n : equivalent to x R = x if x 0 2 n x if x < 0 FOR UNAMBIGUOUS SYMMETRICAL REPRESENTATION x max 2 n 1 1 x x R

27 27 Signed integer x Two s-complement system Map 1 Positive integer x R Conventional binary code Map 2 Bit-vector x Figure 10.8: SIGNED INTEGER REPRESENTED BY POSITIVE INTEGER.

28 28-1 x x R Complement forms True forms Figure 10.9: TWO S COMPLEMENT REPRESENTATION FOR n = 4.

29 MAPPING IN TWO S-COMPLEMENT SYSTEM 29 x x R x True forms (positive) x R = x 2 n n n 1 2 n (2 n 1 1) 2 n Complement forms (negative) 2 2 n x R = 2 n x 1 2 n

30 EXAMPLE 10.2: MAPPINGS FOR 4 x 3 30 x x R x

31 CONVERSE MAPPING 31 x = x R if x R 2 n 1 1 (x 0) x R 2 n if x R 2 n 1 (x < 0) IN TERMS OF BIT VECTOR (x n 1, x n 2,..., x 1, x 0 ) i) For x R < 2 n 1, bit x n 1 is 0 and x 0. x = x R = 0 2 n 1 + n 2 x i2 i i=0 ii) For x R 2 n 1 bit x n 1 is 1 and x < 0. x = x R 2 n = (1 2 n 1 + n 2 x i2 i ) 2 n = 1 2 n 1 + n 2 x i2 i i=0 i=0 COMBINING BOTH CASES x = x n 1 2 n 1 + n 2 x i2 i i=0

32 32 8-BIT EXAMPLES: x = x n 1 2 n 1 + n 2 x i2 i i=0 x x = = 58 SIGN DETECTION: x 0 if x n 1 = 0 x < 0 if x n 1 = 1

33 ONES -COMPLEMENT SYSTEM 33 x R = x mod C ONES -COMPLEMENT SYSTEM: C = 2 n 1 the ones -complement system symmetrical, with the range (2 n 1) x 2 n 1; two representations for zero, namely x R = 0 and x R = 2 n 1; the sign also detected by the most-significant bit x 0 if (x n 1 = 0) or (x R = 2 n 1)

34 MAPPING IN ONES -COMPLEMENT SYSTEM 34 x x R x True forms (positive) x R = x 2 n n (2 n 1 1) 2 n Complement forms 2 2 n (negative) 1 2 n x R = 2 n 1 x 0 2 n

35 ADDITION IN TWO S COMPLEMENT SYSTEM 35 TO GET COMPUTE z = x + y z R = (x R + y R ) mod 2 n CORRECT IF 2 n 1 (x + y) 2 n 1 1 PROOF: CONSIDER (x R + y R ) mod 2 n AND SHOW THAT IT CORRESPONDS TO z R BY DEFINITION OF THE REPRESENTATION, THEREFORE, x R = x mod 2 n and y R = y mod 2 n (x R + y R ) mod 2 n = (x mod 2 n + y mod 2 n ) mod 2 n BY DEFINITION OF REPRESENTATION = (x + y) mod 2 n = z mod 2 n z mod 2 n = z R

36 2 s COMPLEMENT ADDITION: A SUMMARY ADD x R AND y R (use adder for positive operands) 2. PERFORM THE mod OPERATION DOES NOT DEPEND ON THE RELATIVE MAGNITUDES OF THE OPERANDS AND ON THEIR SIGNS (simpler than in S+M) EXAMPLES OF ADDITION FOR C=64 and 32 x, y, z 31 Signed Representation Two s-complement Signed operands addition result x y x R y R (x R + y R ) mod 64 = z R z mod 64 = mod 64 = mod 64 = mod 64 = 42-22

37 THE mod OPERATION 37 Let w R = x R + y R. Then z R = w R mod 2 n = x R, y R < 2 n w R < 2 2 n w R if w R < 2 n w R 2 n if 2 n w R < 2 2 n Since w R < 2 2 n w = (w n, w n 1,..., w 0 ) w R = < 2 n if w n = 0 2 n if w n = 1 Case 1. w R < 2 n. Then w R mod 2 n = w R (w n 1,..., w 0 ). Case 2. w R 2 n w R mod 2 n = w R 2 n (1, w n 1,..., w 0 ) (1, 0,..., 0) = (w n 1,..., w 0 ) CONCLUSION: w R mod 2 n = (w n 1,..., w 0 )

38 38 mod OPERATION PERFORMED BY DISCARDING MOST-SIGNIFICANT BIT OF w 2 S COMPLEMENT ADDITION: RESULT CORRESPONDS TO OUTPUT OF ADDER, DISCARDING THE CARRY-OUT z = ADD(x, y, 0) x y n n c out discard ADDER 0 n z Figure 10.10: TWO S-COMPLEMENT ADDER MODULE.

39 EXAMPLES OF 2 S COMPLEMENT ADDITION 39 Bit-level Positive Signed computation representation values n = 4 x = 1011 x R = 11 x = 5 y = 0101 y R = 5 y = 5 w = w R = 16 z = 0000 z R = 0 z = 0 n = 8 x = x R = 218 x = 38 y = y R = 241 y = 15 w = w R = 459 z = z R = 203 z = 53

40 CHANGE OF SIGN IN TWO S COMPLEMENT SYSTEM 40 z = x z R = (2 n x R ) mod 2 n x = 0: since z = x = 0 we have z R = x R = 0. Moreover, x > 0: since z = x is negative, Moreover, x is positive so that Substitute: z R = 2 n x R. x < 0: since z = x is positive, Moreover, x is negative so that Substitute: z R = 2 n x R. z R = (2 n 0) mod 2 n = 0 z R = 2 n z = 2 n x x R = x z R = z = x x R = 2 n x = 2 n + x

41 CHANGE OF SIGN (cont.) 41 DIRECT SUBTRACTION 2 n x R COMPLEX EXAMPLE: x R INSTEAD, USE 2 n = (2 n 1) + 1 z R = (2 n 1 x R ) + 1 THE COMPLEMENT WITH RESPECT TO 2 n 1: COMPLEMENT EACH BIT OF x x R = x R

42 CHANGE-OF-SIGN OPERATION 42 TWO-STEP OPERATION: 1. COMPLEMENT EACH BIT OF x denoted x. 2. ADD 1 (set carry-in c 0 = 1) DESCRIPTION: EXAMPLE FOR n = 4, x = 3: z = ADD(x, 0, 1) x 1101 x = 3 x c 0 1 z 0011 z = 3

43 SUBTRACTION IN TWO S COMPLEMENT SYSTEM 43 z = x y = x + ( y) z R = (x R + (2 n 1 y R ) + 1) mod 2 n THE CORRESPONDING DESCRIPTION z = ADD R (x, y, 1) EXAMPLE: x y y z SUMMARY OF 2 S COMPLEMENT OPERATIONS OPERATION 2 s COMPLEMENT SYSTEM z = x + y z = ADD(x, y, 0) z = x z = ADD(x, 0, 1) z = x y z = ADD(x, y, 1)

44 OVERFLOW DETECTION IN ADDITION 44 OVERFLOW result exceeds most positive or negative representable integer 2 n 1 z 2 n BOTH OPERANDS SAME SIGN, RESULT OPPOSITE SIGN v = x n 1y n 1z n 1 x n 1 y n 1 z n 1 x>0 y>0 z>0 x>0 y>0 z<0 Overflow x<0 y<0 z<0 x<0 y<0 z>0 Overflow 0 2 n 2 n-1 Figure 10.11: OVERFLOW IN TWO S-COMPLEMENT SYSTEM.

45 TWO S COMPLEMENT ARITHMETIC UNIT 45 INPUTS: x = (x n 1,..., x 0 ), x j {0, 1} y = (y n 1,..., y 0 ), y j {0, 1} c in {0, 1} F = (f 2, f 1, f 0 ) OUTPUTS: z = (z n 1,..., z 0 ), z j {0, 1} c out, sgn, zero, ovf {0, 1} FUNCTIONS: F Operation 001 add add z = x + y 011 sub subtract z = x y 101 addc add with carry z = x + y + c in 110 cs change sign z = x 010 inc increment z = x + 1 sgn = 1 zero = 1 ovf = 1 if z < 0, 0 otherwise (the sign) if z = 0, 0 otherwise if z overflows, 0 otherwise

46 46 x n-1 x 0 K x x y n n K x COMPL X K y COMPL Y f 2 f 1 f 0 n (0...0) n n Combinational network c in 0 1 MUX K MX n K x K y K MX c 0 c n ADDER c 0 c n-1 n n z n-1 n c out ovf zero sgn z Figure 10.12: IMPLEMENTATION OF TWO S-COMPLEMENT ARITHMETIC UNIT.

47 CONTROL OF TWO S-COMPLEMENT ARITHMETIC OPERATIONS 47 OPERATION IDENTIFIED BY BIT-VECTOR F = (f 2, f 1, f 0 ) COMPLEMENT OPERATION a = compl(b, K): CONTROL SIGNALS: a i = b i if K = 0 b i if K = 1 Operation Op-code Control Signals f 2 f 1 f 0 z K x K y K MX add 001 add(x, y, 0) sub 011 add(x, y, 1) addc 101 add(x, y, c in ) cs 110 add(x, 0, 1) 1 d.c. 0 inc 010 add(x, 0, 1) 0 d.c. 0 K x = f 2 f 1 K y = f 1 K MX = f 0 c 0 = f 1 f 2 f 0 c in

48 ALU MODULES AND NETWORKS 48 ARITHMETIC-LOGIC UNIT module realizing set of arithmetic and logic functions Why build ALUs? 1. Use in many different applications 2. alu modules used in processors: function selected by control unit

49 TYPICAL EXAMPLE OF ALU 49 Control (S) Function zero z = 0 add z = (x + y + c in ) mod 16 sub z = (x + y + c in ) mod 16 exsub z = (x + y + c in ) mod 16 and z = x y or z = x y xor z = x y one z = 1111 a denotes the integer represented by vector a,, and are applied to the corresponding bits

50 4-bit ALU 50 x y 4 4 P 4 - BIT ALU 3 S G c in 4 z Figure 10.13: 4-bit ALU.

51 NETWORKS OF ALU MODULES 51 MODULE HAS NO CARRY-OUT SIGNAL cannot be used directly in an iterative (carry-ripple) network carry-out signal implemented as c out = G P c in carry-skip network

52 16-bit ALU 52 x 3 y 3 x 2 y 2 x 1 y 1 x 0 y P 3 G BIT ALU P 2 G BIT ALU 3 P 1 G BIT ALU 3 P 0 G BIT ALU 3 S c c z 3 z 2 z 1 z 0 G 3 P 3 G 2 P 2 G 1 P 1 G 0 P 0 c 16 P G CLG-4 c 12 c 8 c 4 Figure 10.14: 16-bit alu.

53 COMPARATOR MODULES 53 HIGH-LEVEL DESCRIPTION OF AN n-bit COMPARATOR: INPUTS: x = (x n 1,..., x 0 ), x j {0, 1} y = (y n 1,..., y 0 ), y j {0, 1} c in {G,E,S} OUTPUT: z {G,E,S} FUNCTION: z = x and y the integers represented x and y G if (x > y) or (x = y and c in = G) E if (x = y) and (c in = E) S if (x < y) or (x = y and c in = S) IMPLEMENTATION OF 4-bit COMPARATOR MODULE c in = (c G in, c E in, c S in), c G in, c E in, c S in {0, 1} z = (z G, z E, z S ), z G, z E, z S {0, 1}

54 54 S 3 x 3 E 3 y 3 G 3 E 3 S 2 x y c G in c E in c S in 4 4 COMPARATOR MODULE zg ze zs x 2 y 2 x 1 y 1 E 2 E 1 E 3 G 2 E 3 E 2 S 1 E 3 E 2 G 1 zg ze (a) zs x 0 E 0 E 3 E 2 E 1 S 0 y 0 E 3 E 2 E 1 G 0 (b) c G in c E in c S in E 3 E 2 E 1 E 0 cg in E 3 E 2 E 1 E 0 c E in E 3 E 2 E 1 E 0 c S in Figure 10.15: 4-BIT COMPARATOR MODULE: a) block diagram; b) gate-network implementation.

55 BINARY-LEVEL DESCRIPTION 55 S i = x iy i E i = (x i y i ), i = 0,..., 3 G i = x i y i z G = G 3 + E 3 G 2 + E 3 E 2 G 1 + E 3 E 2 E 1 G 0 + E 3 E 2 E 1 E 0 c G in z E = E 3 E 2 E 1 E 0 c E in z S = S 3 + E 3 S 2 + E 3 E 2 S 1 + E 3 E 2 E 1 S 0 + E 3 E 2 E 1 E 0 c S in

56 ITERATIVE COMPARATOR NETWORK 56 x 3 y 3 x 2 y 2 x 1 y 1 x 0 y 0 z G z E z S COMPARATOR MODULE COMPARATOR MODULE COMPARATOR MODULE 4 4 COMPARATOR MODULE G c in = 0 E c in = 1 S c = 0 in Figure 10.16: 16-BIT ITERATIVE COMPARATOR NETWORK.

57 TREE COMPARATOR NETWORK 57 x 3 y 3 x 2 y 2 x 1 y 1 x 0 y0 4 4 COMPARATOR MODULE COMPARATOR MODULE COMPARATOR MODULE COMPARATOR MODULE z G z E z S z G z E z S z G z E z S z G z E z S g 3 s 3 g 2 s 2 g 1 s 1 g 0 s COMPARATOR MODULE z G z E z S Figure 10.17: 16-BIT TREE COMPARATOR NETWORK.

58 TREE COMPARATOR (cont.) 58 z G = z E = z S = 1 if g > s 0 otherwise 1 if g = s 0 otherwise 1 if g < s 0 otherwise g and s are the integers represented by the vectors g and s, respectively.

59 MULTIPLIERS 59 n m bits multiplier: 0 x 2 n 1 (the multiplicand) 0 y 2 m 1 (the multiplier), 0 z (2 n 1)(2 m 1) (the product). The high-level function: Since y i is either 0 or 1, we get z = x y z = x( m 1 y i2 i ) = m 1 xy i2 i i=0 i=0 xy i = 0 if y i = 0 x if y i = 1

60 MULTIPLICATION BIT MATRIX 60 x 7 y 0 x 6 y 0 x 5 y 0 x 4 y 0 x 3 y 0 x 2 y 0 x 1 y 0 x 0 y 0 x 7 y 1 x 6 y 1 x 5 y 1 x 4 y 1 x 3 y 1 x 2 y 1 x 1 y 1 x 0 y 1 x 7 y 2 x 6 y 2 x 5 y 2 x 4 y 2 x 3 y 2 x 2 y 2 x 1 y 2 x 0 y 2 x 7 y 3 x 6 y 3 x 5 y 3 x 4 y 3 x 3 y 3 x 2 y 3 x 1 y 3 x 0 y 3 x 7 y 4 x 6 y 4 x 5 y 4 x 4 y 4 x 3 y 4 x 2 y 4 x 1 y 4 x 0 y 4 x 7 y 5 x 6 y 5 x 5 y 5 x 4 y 5 x 3 y 5 x 2 y 5 x 1 y 5 x 0 y 5 Multiplier implementation: m arrays of n and gates m 1 n-bit adders

61 61 sum_in x_bit y_bit x_bit y_bit x 7 x 6 x 5 x 4 x 3 x 2 x 1 x 0 y0 c_out sum_in Half Adder sum_out x_bit y_bit c_out OR Module MH Half Adder sum_out c_in MH MF MF MF MF MF MF MH y 2 y 1 MF MF MF MF MF MF MF MH c_out Full Adder c_in MF MF MF MF MF MF MF MH y 3 sum_out Module MF y 4 (a) MF MF MF MF MF MF MF MH y 5 MF MF MF MF MF MF MF MH p 13 p 12 p 11 p 10 p 9 p 8 p 7 p 6 p 5 p 4 p 3 p 2 p 1 p 0 (b) Figure 10.18: IMPLEMENTATION OF AN 8 6 MULTIPLIER: a) PRIMITIVE MODULES; b) NETWORK.

62 MULTIPLIER DELAY 62 delay of the buffer which connects signal y 0 to the n and gates delay of the and gate delay of the adders t adders = t c (n 1) + t s + (t c + t s )(m 2) If t s = t c, we get t adders = (n + 2(m 2))t s = (n + 2m 4)t s FOR THE 8 6 CASE: t adders = ( )t s = 16t s

63 EXAMPLE OF NETWORKS WITH STANDARD ARITHMETIC MODULES 63 Inputs: a[3], a[2], a[1], a[0], b[3], b[2], b[1], b[0] {0,..., } e = (e 3, e 2, e 1, e 0 ), e i {0, 1} Outputs: c[3], c[2], c[1], c[0] {0,..., } d {0, 1, 2, 3} f {0, 1} Function: f = d = c[i] = 1 if at least one e j = 1 0 otherwise, j = 0, 1, 2, 3 i if e i is the highest priority event 0 if no event occurred a[i] + b[i] if e i is the highest priority event 0 otherwise

64 MODULAR IMPLEMENTATION 64 CONSISTS OF a priority encoder to determine the highest-priority event; an adder; two selectors (multiplexers) to select the corresponding inputs to the adder; a distributor (demultiplexer) to send the output of the adder to the corresponding system output; and an or gate to determine whether at least one event has occurred.

65 65 e 3 e 2 e 1 e 0 a[3] a[2] a[1] a[0] b[3] b[2] b[1] b[0] PRIORITY ENCODER 2 SELECTOR SELECTOR ADDER DISTRIBUTOR 2 f d c[3] c[2] c[1] c[0] Figure 10.19: NETWORK IN EXAMPLE 10.5

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

Hardware Design I Chap. 4 Representative combinational logic

Hardware Design I Chap. 4 Representative combinational logic Hardware Design I Chap. 4 Representative combinational logic E-mail: shimada@is.naist.jp Already optimized circuits There are many optimized circuits which are well used You can reduce your design workload

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

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

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

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

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

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

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

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

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

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

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

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

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

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 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

CprE 281: Digital Logic

CprE 281: Digital Logic CprE 281: Digital Logic Instructor: Alexander Stoytchev http://www.ece.iastate.edu/~alexs/classes/ Multiplication CprE 281: Digital Logic Iowa State University, Ames, IA Copyright Alexander Stoytchev HW

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

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

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

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

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

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

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

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

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

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

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

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

Chapter 1: Solutions to Exercises

Chapter 1: Solutions to Exercises 1 DIGITAL ARITHMETIC Miloš D. Ercegovac and Tomás Lang Morgan Kaufmann Publishers, an imprint of Elsevier, c 2004 Exercise 1.1 (a) 1. 9 bits since 2 8 297 2 9 2. 3 radix-8 digits since 8 2 297 8 3 3. 3

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

Computer Architecture. ESE 345 Computer Architecture. Design Process. CA: Design process

Computer Architecture. ESE 345 Computer Architecture. Design Process. CA: Design process Computer Architecture ESE 345 Computer Architecture Design Process 1 The Design Process "To Design Is To Represent" Design activity yields description/representation of an object -- Traditional craftsman

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

EECS150 - Digital Design Lecture 10 - Combinational Logic Circuits Part 1

EECS150 - Digital Design Lecture 10 - Combinational Logic Circuits Part 1 EECS5 - Digital Design Lecture - Combinational Logic Circuits Part Feburary 26, 22 John Wawrzynek Spring 22 EECS5 - Lec-cl Page Combinational Logic (CL) Defined y i = f i (x,...., xn-), where x, y are

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

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

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

Chapter 03: Computer Arithmetic. Lesson 03: Arithmetic Operations Adder and Subtractor circuits Design

Chapter 03: Computer Arithmetic. Lesson 03: Arithmetic Operations Adder and Subtractor circuits Design Chapter 03: Computer Arithmetic Lesson 03: Arithmetic Operations Adder and Subtractor circuits Design Objective To understand adder circuit Subtractor circuit Fast adder circuit 2 Adder Circuit 3 Full

More information

Lecture 5: Arithmetic

Lecture 5: Arithmetic Lecture 5: Arithmetic COS / ELE 375 Computer Architecture and Organization Princeton University Fall 2015 Prof. David August 1 5 Binary Representation of Integers Two physical states: call these 1 and

More information

Chapter 4: Designing Combinational Systems Uchechukwu Ofoegbu

Chapter 4: Designing Combinational Systems Uchechukwu Ofoegbu Chapter 4: Designing Combinational Systems Uchechukwu Ofoegbu Temple University Gate Delay ((1.1).1) ((1.0).0) ((0.1).1) ((0.1).0) ((1.1) = 1 0 s = sum c out carry-out a, b = added bits C = carry in a

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

Part II Addition / Subtraction

Part II Addition / Subtraction Part II Addition / Subtraction Parts Chapters I. Number Representation 1. 2. 3. 4. Numbers and Arithmetic Representing Signed Numbers Redundant Number Systems Residue Number Systems Elementary Operations

More information

Computer Architecture 10. Fast Adders

Computer Architecture 10. Fast Adders Computer Architecture 10 Fast s Ma d e wi t h Op e n Of f i c e. o r g 1 Carry Problem Addition is primary mechanism in implementing arithmetic operations Slow addition directly affects the total performance

More information

Hw 6 due Thursday, Nov 3, 5pm No lab this week

Hw 6 due Thursday, Nov 3, 5pm No lab this week EE141 Fall 2005 Lecture 18 dders nnouncements Hw 6 due Thursday, Nov 3, 5pm No lab this week Midterm 2 Review: Tue Nov 8, North Gate Hall, Room 105, 6:30-8:30pm Exam: Thu Nov 10, Morgan, Room 101, 6:30-8:00pm

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

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

Arithmetic and Logic Unit First Part

Arithmetic and Logic Unit First Part Arithmetic and Logic Unit First Part Arquitectura de Computadoras Arturo Díaz D PérezP Centro de Investigación n y de Estudios Avanzados del IPN adiaz@cinvestav.mx Arquitectura de Computadoras ALU1-1 Typical

More information

ALUs and Data Paths. Subtitle: How to design the data path of a processor. 1/8/ L3 Data Path Design Copyright Joanne DeGroat, ECE, OSU 1

ALUs and Data Paths. Subtitle: How to design the data path of a processor. 1/8/ L3 Data Path Design Copyright Joanne DeGroat, ECE, OSU 1 ALUs and Data Paths Subtitle: How to design the data path of a processor. Copyright 2006 - Joanne DeGroat, ECE, OSU 1 Lecture overview General Data Path of a multifunction ALU Copyright 2006 - Joanne DeGroat,

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

ECE 2300 Digital Logic & Computer Organization

ECE 2300 Digital Logic & Computer Organization ECE 2300 Digital Logic & Computer Organization pring 201 More inary rithmetic LU 1 nnouncements Lab 4 prelab () due tomorrow Lab 5 to be released tonight 2 Example: Fixed ize 2 C ddition White stone =

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

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

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

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

Part II Addition / Subtraction

Part II Addition / Subtraction Part II Addition / Subtraction Parts Chapters I. Number Representation 1. 2. 3. 4. Numbers and Arithmetic Representing Signed Numbers Redundant Number Systems Residue Number Systems Elementary Operations

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

Section 3: Combinational Logic Design. Department of Electrical Engineering, University of Waterloo. Combinational Logic

Section 3: Combinational Logic Design. Department of Electrical Engineering, University of Waterloo. Combinational Logic Section 3: Combinational Logic Design Major Topics Design Procedure Multilevel circuits Design with XOR gates Adders and Subtractors Binary parallel adder Decoders Encoders Multiplexers Programmed Logic

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

Sample Test Paper - I

Sample Test Paper - I Scheme G Sample Test Paper - I Course Name : Computer Engineering Group Marks : 25 Hours: 1 Hrs. Q.1) Attempt any THREE: 09 Marks a) Define i) Propagation delay ii) Fan-in iii) Fan-out b) Convert the following:

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

Floating Point Representation and Digital Logic. Lecture 11 CS301

Floating Point Representation and Digital Logic. Lecture 11 CS301 Floating Point Representation and Digital Logic Lecture 11 CS301 Administrative Daily Review of today s lecture w Due tomorrow (10/4) at 8am Lab #3 due Friday (9/7) 1:29pm HW #5 assigned w Due Monday 10/8

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

BOOLEAN ALGEBRA. Introduction. 1854: Logical algebra was published by George Boole known today as Boolean Algebra

BOOLEAN ALGEBRA. Introduction. 1854: Logical algebra was published by George Boole known today as Boolean Algebra BOOLEAN ALGEBRA Introduction 1854: Logical algebra was published by George Boole known today as Boolean Algebra It s a convenient way and systematic way of expressing and analyzing the operation of logic

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

Bit-Sliced Design. EECS 141 F01 Arithmetic Circuits. A Generic Digital Processor. Full-Adder. The Binary Adder

Bit-Sliced Design. EECS 141 F01 Arithmetic Circuits. A Generic Digital Processor. Full-Adder. The Binary Adder it-liced Design Control EEC 141 F01 rithmetic Circuits Data-In Register dder hifter it 3 it 2 it 1 it 0 Data-Out Tile identical processing elements Generic Digital Processor Full-dder MEMORY Cin Full adder

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

Dual-Field Arithmetic Unit for GF(p) and GF(2 m ) *

Dual-Field Arithmetic Unit for GF(p) and GF(2 m ) * Institute for Applied Information Processing and Communications Graz University of Technology Dual-Field Arithmetic Unit for GF(p) and GF(2 m ) * CHES 2002 Workshop on Cryptographic Hardware and Embedded

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

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

COMPUTERS ORGANIZATION 2ND YEAR COMPUTE SCIENCE MANAGEMENT ENGINEERING UNIT 3 - ARITMETHIC-LOGIC UNIT JOSÉ GARCÍA RODRÍGUEZ JOSÉ ANTONIO SERRA PÉREZ

COMPUTERS ORGANIZATION 2ND YEAR COMPUTE SCIENCE MANAGEMENT ENGINEERING UNIT 3 - ARITMETHIC-LOGIC UNIT JOSÉ GARCÍA RODRÍGUEZ JOSÉ ANTONIO SERRA PÉREZ OMUTERS ORGANIZATION 2ND YEAR OMUTE SIENE MANAGEMENT ENGINEERING UNIT 3 - ARITMETHI-LOGI UNIT JOSÉ GARÍA RODRÍGUEZ JOSÉ ANTONIO SERRA ÉREZ Tema 3. La Unidad entral de roceso. A.L.U. Arithmetic Logic Unit

More information

EECS150 - Digital Design Lecture 22 - Arithmetic Blocks, Part 1

EECS150 - Digital Design Lecture 22 - Arithmetic Blocks, Part 1 EECS150 - igital esign Lecture 22 - Arithmetic Blocks, Part 1 April 10, 2011 John Wawrzynek Spring 2011 EECS150 - Lec23-arith1 Page 1 Each cell: r i = a i XOR b i XOR c in Carry-ripple Adder Revisited

More information

VLSI Arithmetic. Lecture 9: Carry-Save and Multi-Operand Addition. Prof. Vojin G. Oklobdzija University of California

VLSI Arithmetic. Lecture 9: Carry-Save and Multi-Operand Addition. Prof. Vojin G. Oklobdzija University of California VLSI Arithmetic Lecture 9: Carry-Save and Multi-Operand Addition Prof. Vojin G. Oklobdzija University of California http://www.ece.ucdavis.edu/acsel Carry-Save Addition* *from Parhami 2 June 18, 2003 Carry-Save

More information

How fast can we calculate?

How fast can we calculate? November 30, 2013 A touch of History The Colossus Computers developed at Bletchley Park in England during WW2 were probably the first programmable computers. Information about these machines has only been

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

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

Solutions for Appendix C Exercises

Solutions for Appendix C Exercises C Solutions for Appix C Exercises 1 Solutions for Appix C Exercises C.1 A B A B A + B A B A B A + B 0 0 1 1 1 1 1 1 0 1 1 0 0 0 1 1 1 0 0 1 0 0 1 1 1 1 0 0 0 0 0 0 C.2 Here is the first equation: E = ((

More information

SIR C.R.REDDY COLLEGE OF ENGINEERING ELURU DIGITAL INTEGRATED CIRCUITS (DIC) LABORATORY MANUAL III / IV B.E. (ECE) : I - SEMESTER

SIR C.R.REDDY COLLEGE OF ENGINEERING ELURU DIGITAL INTEGRATED CIRCUITS (DIC) LABORATORY MANUAL III / IV B.E. (ECE) : I - SEMESTER SIR C.R.REDDY COLLEGE OF ENGINEERING ELURU 534 007 DIGITAL INTEGRATED CIRCUITS (DIC) LABORATORY MANUAL III / IV B.E. (ECE) : I - SEMESTER DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING DIGITAL

More information

VLSI Arithmetic Lecture 10: Multipliers

VLSI Arithmetic Lecture 10: Multipliers VLSI Arithmetic Lecture 10: Multipliers Prof. Vojin G. Oklobdzija University of California http://www.ece.ucdavis.edu/acsel A Method for Generation of Fast Parallel Multipliers by Vojin G. Oklobdzija David

More information

Arithmetic Building Blocks

Arithmetic Building Blocks rithmetic uilding locks Datapath elements dder design Static adder Dynamic adder Multiplier design rray multipliers Shifters, Parity circuits ECE 261 Krish Chakrabarty 1 Generic Digital Processor Input-Output

More information

Complement Arithmetic

Complement Arithmetic Complement Arithmetic Objectives In this lesson, you will learn: How additions and subtractions are performed using the complement representation, What is the Overflow condition, and How to perform arithmetic

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

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

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

CMSC 313 Lecture 17. Focus Groups. Announcement: in-class lab Thu 10/30 Homework 3 Questions Circuits for Addition Midterm Exam returned

CMSC 313 Lecture 17. Focus Groups. Announcement: in-class lab Thu 10/30 Homework 3 Questions Circuits for Addition Midterm Exam returned Focus Groups CMSC 33 Lecture 7 Need good sample of all types of CS students Mon /7 & Thu /2, 2:3p-2:p & 6:p-7:3p Announcement: in-class lab Thu /3 Homework 3 Questions Circuits for Addition Midterm Exam

More information

CprE 281: Digital Logic

CprE 281: Digital Logic CprE 281: Digital Logic Instructor: Alexander Stoytchev http://www.ece.iastate.edu/~alexs/classes/ Fast Adders CprE 281: Digital Logic Iowa State University, Ames, IA Copyright Alexander Stoytchev HW5

More information

L8/9: Arithmetic Structures

L8/9: Arithmetic Structures L8/9: Arithmetic Structures Acknowledgements: Materials in this lecture are courtesy of the following sources and are used with permission. Rex Min Kevin Atkinson Prof. Randy Katz (Unified Microelectronics

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

Computer Architecture. ECE 361 Lecture 5: The Design Process & ALU Design. 361 design.1

Computer Architecture. ECE 361 Lecture 5: The Design Process & ALU Design. 361 design.1 Computer Architecture ECE 361 Lecture 5: The Design Process & Design 361 design.1 Quick Review of Last Lecture 361 design.2 MIPS ISA Design Objectives and Implications Support general OS and C- style language

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

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 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

Full Adder Ripple Carry Adder Carry-Look-Ahead Adder Manchester Adders Carry Select Adder

Full Adder Ripple Carry Adder Carry-Look-Ahead Adder Manchester Adders Carry Select Adder Outline E 66 U Resources: dders & Multipliers Full dder Ripple arry dder arry-look-head dder Manchester dders arry Select dder arry Skip dder onditional Sum dder Hybrid Designs leksandar Milenkovic E-mail:

More information

Arithmetic Circuits How to add and subtract using combinational logic Setting flags Adding faster

Arithmetic Circuits How to add and subtract using combinational logic Setting flags Adding faster rithmetic Circuits Didn t I learn how to do addition in second grade? UNC courses aren t what they used to be... 01011 +00101 10000 Finally; time to build some serious functional blocks We ll need a lot

More information

PG - TRB UNIT-X- DIGITAL ELECTRONICS. POLYTECHNIC-TRB MATERIALS

PG - TRB UNIT-X- DIGITAL ELECTRONICS.   POLYTECHNIC-TRB MATERIALS SRIMAAN COACHING CENTRE-PG-TRB-PHYSICS- DIGITAL ELECTRONICS-STUDY MATERIAL-CONTACT: 8072230063 SRIMAAN PG - TRB PHYSICS UNIT-X- DIGITAL ELECTRONICS POLYTECHNIC-TRB MATERIALS MATHS/COMPUTER SCIENCE/IT/ECE/EEE

More information

Arithmetic Circuits Didn t I learn how to do addition in the second grade? UNC courses aren t what they used to be...

Arithmetic Circuits Didn t I learn how to do addition in the second grade? UNC courses aren t what they used to be... rithmetic Circuits Didn t I learn how to do addition in the second grade? UNC courses aren t what they used to be... + Finally; time to build some serious functional blocks We ll need a lot of boxes The

More information

Digital Electronics Circuits 2017

Digital Electronics Circuits 2017 JSS SCIENCE AND TECHNOLOGY UNIVERSITY Digital Electronics Circuits (EC37L) Lab in-charge: Dr. Shankraiah Course outcomes: After the completion of laboratory the student will be able to, 1. Simplify, design

More information

A COMBINED 16-BIT BINARY AND DUAL GALOIS FIELD MULTIPLIER. Jesus Garcia and Michael J. Schulte

A COMBINED 16-BIT BINARY AND DUAL GALOIS FIELD MULTIPLIER. Jesus Garcia and Michael J. Schulte A COMBINED 16-BIT BINARY AND DUAL GALOIS FIELD MULTIPLIER Jesus Garcia and Michael J. Schulte Lehigh University Department of Computer Science and Engineering Bethlehem, PA 15 ABSTRACT Galois field arithmetic

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

CHAPTER VI COMBINATIONAL LOGIC BUILDING BLOCKS

CHAPTER VI COMBINATIONAL LOGIC BUILDING BLOCKS CHAPTR VI- CHAPTR VI CHAPTR VI BUILDING BLOCKS R.M. Dansereau; v.. CHAPTR VI- COMBINAT. LOGIC INTRODUCTION -INTRODUCTION Combinational logic Output at any time is determined completely by the current input.

More information