11 - 22-Sep-103:16 PM Add, Subtract, Compare, ALU EEL 3701...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
22-Sep-10—3:16 PM Add, Subtract, Compare, ALU 1 University of Florida, EEL 3701 – File 11 © Drs. Schwartz & Arroyo EEL 3701 EEL 3701 Menu • Other MSI Circuit: • Adders >Binary, Half & Full • Canonical forms • Binary Subtraction • Full-Subtractor •Magnitude Comparators Look into my . .. 1 University of Florida, EEL 3701 – File 11 © Drs. Schwartz & Arroyo >See Lam: Fig 4.8 •ALU EEL 3701 EEL 3701 • Suppose we want to add two 2-bit 1 Carry Binary Adder XY S u m C a r r y 000 0 011 0 Suppose we want to add two 2 bit numbers Y 01 Sum Y Carry 0 1 1 +0 1 0 1 0 1 2 University of Florida, EEL 3701 – File 11 © Drs. Schwartz & Arroyo 101 0 110 1 X 00 1 0 X 0 10 1 Sum = /X Y + X /Y = X Y Carry = X Y
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
22-Sep-10—3:16 PM Add, Subtract, Compare, ALU 2 University of Florida, EEL 3701 – File 11 © Drs. Schwartz & Arroyo EEL 3701 EEL 3701 Notation : A 4-bit number is represented by b 3 b 2 b 1 b 0 . Thus, we get bits b 0 ~b N 1 where N =#o fb i ts . Notation for Binary Addition • If we add two 4-bit numbers, what must we do bit by bit? __ c 3 c 2 c 1 c 0 = 0 c i = carry bit x 3 x 2 x 1 x 0 x i = 1 st number y 3 y 2 y 1 y 0 y i = 2 nd number b N-1 where N # of bits. c 4 s 3 s 2 s 1 s 0 s = sum 3 University of Florida, EEL 3701 – File 11 © Drs. Schwartz & Arroyo This circuit is called a Half-Adder 3 2 1 i • For the circuit with no carry in, we implement as follows: s i = x i y i c i+1 = x i y i x i y i s i c i+1 EEL 3701 EEL 3701 Let us include a carry input (c in ) in the design: Adder with Carry Input xy c in 0 1 00 0 1 Sum = /x*/y* c in + /x* y*/c in + x*/y*/c in + x* y* c in •When c in = 0, Sum c in =0 = x y in = 1, Sum c in =1 = /(x y) Sum = Sum + Sum •/c 01 1 0 11 0 1 10 1 0 Sum xy c in 0 1 4 University of Florida, EEL 3701 – File 11 © Drs. Schwartz & Arroyo •Sum = Sum c in =1 •c in c in =0 in •Sum = /(x y)•c in + (x y)•/c in •Let W= x y •Then Sum = /W•c in + W•/c in = W c in Sum = x y c in 00 0 0 01 0 1 11 1 1 10 0 1 c out
Background image of page 2
22-Sep-10—3:16 PM Add, Subtract, Compare, ALU 3 University of Florida, EEL 3701 – File 11 © Drs. Schwartz & Arroyo EEL 3701 EEL 3701 Let’s do C out : c in 01 XOR of all inputs Sum=x y Sum of all possible pairs Carry Out of Full Adder xy 00 0 0 01 0 1 11 1 1 10 0 1 c ou This circuit is called c in c out = x y + x c in + y c in x y c in x y Sum Canonical.cct 5 University of Florida, EEL 3701 – File 11 © Drs. Schwartz & Arroyo out a Full-Adder x c in y c in c out Sum = s i c in = c i & c out = c i+1 Q: Is the order important? Q: Why? s i c i+1 FA x i y i c i s c o EEL 3701 EEL 3701 Y X C C C C =0 Y Y Y X X X • Thus, to add two 4-bit numbers we need 4 Full- Adders as follows: Ripple-Carry Adders 3 2 1 0 (C 0 =0) 3 3 3 2 1 C 0 =0 2 0 1 0 1 2 OR HA (no C 0 ) 6 University of Florida, EEL 3701 – File 11 © Drs. Schwartz & Arroyo • Actually, we could replace FA 0 with a half-adder • 74’283 is a 4-bit look-ahead carry adder C 4 S 3 C 3 C 1 S 0 S 2 C 2 S 1
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
22-Sep-10—3:16 PM Add, Subtract, Compare, ALU 4
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 13

11 - 22-Sep-103:16 PM Add, Subtract, Compare, ALU EEL 3701...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online