Digital Lecture 11

# Digital Lecture 11 - 17-Feb-064:47 PM Add Subtract Compare...

This preview shows pages 1–4. Sign up to view the full content.

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

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

View Full Document
17-Feb-06—4:47 PM 2 2 University of Florida, EEL 3701 – File 11 © Drs. Schwartz & Arroyo Add, Subtract, Compare, ALU EEL 3701 3 University of Florida, EEL 3701 – File 11 © Drs. Schwartz & Arroyo EEL 3701 • 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 This circuit is called a Half-Adder 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 = # of bits. c 4 s 3 s 2 s 1 s 0 s i = sum • 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 Notation for Binary Addition EEL 3701 4 University of Florida, EEL 3701 – File 11 © Drs. Schwartz & Arroyo EEL 3701 Let us include a carry input (c in ) in the design: 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 c in =1 •c in + Sum c in =0 •/c 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 Adder with Carry Input xy c in 0 1 00 0 1 01 1 0 11 0 1 10 1 0 Sum xy c in 0 1 00 0 0 01 0 1 11 1 1 10 0 1 c out
17-Feb-06—4:47 PM 3 3 University of Florida, EEL 3701 – File 11 © Drs. Schwartz & Arroyo Add, Subtract, Compare, ALU EEL 3701 5 University of Florida, EEL 3701 – File 11 © Drs. Schwartz & Arroyo EEL 3701 Let’s do C out : xy c in 01 00 0 0 01 0 1 11 1 1 10 0 1 c out This circuit is called a Full-Adder XOR of all inputs Sum=x y c in Sum of all possible pairs c out = x y + x c in + y c in x y c in x y x c in y c in c out Sum Sum = s i c in = c i & c out = c i+1 Canonical.cct Q: Is the order important? Q: Why? Carry Out of Full Adder s i c i+1 FA x i y i c i s c o EEL 3701 6 University of Florida, EEL 3701 – File 11 © Drs. Schwartz & Arroyo EEL 3701 • Actually, we could replace FA 0 with a half-adder • 74’283 is a 4-bit look-ahead carry adder FA 3 FA 2 FA 1 FA 0 (C 0 =0) C 4 S 3 Y 3 X 3 C 3 C 3 C 2 C 1 C 1 C 0 =0 Y 2 Y 0 Y 1 X 0 X 1 X 2 S 0 S 2

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 12

Digital Lecture 11 - 17-Feb-064:47 PM Add Subtract Compare...

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

View Full Document
Ask a homework question - tutors are online