Presentation is loading. Please wait.

Presentation is loading. Please wait.

Cs 121 Ch 4-2 Combinational Logic. Subtractors Half Subtractor Full Subtractor.

Similar presentations


Presentation on theme: "Cs 121 Ch 4-2 Combinational Logic. Subtractors Half Subtractor Full Subtractor."— Presentation transcript:

1 Cs 121 Ch 4-2 Combinational Logic

2 Subtractors Half Subtractor Full Subtractor

3 Subtract binary number 11 from 1010 QUIZ

4 Half Subtractor BABD 00 0 o A 0 B 0 D 0 B o Block diagram Circuit diagram °Subtract two binary numbers A 0, B 0 -> single bit inputs D 0 -> single bit difference Bo -> Borrow out (borrow out) (difference) Half-Subtractor (HS), a 2-input bit-wise Subtractor functional block.

5 Logic Simplification: Half Subtractor °The K-Map for Do, Bo is: B A Do B A Bo BABABDoDo B ABoBo A 0 B 0 D 0 B o A (borrow out) (difference)

6 QUIZ ? ? Q#1- What is the difference and borrow outputs from This half-subtractor circuit? (A – B) A = 0 B = 0 ANS: Di= 0, Bo= 0 Q#2- What is the difference and borrow outputs from this half-subtractor circuit? (A – B) A = 1 B = 0 ANS: Di= 1, Bo= 0 Q#3- What is the difference and borrow outputs from this half-subtractor circuit? (A – B) A = 1 B = 1 ANS: Di= 0, Bo= 0 Q#4- What is the difference and borrow outputs from this half-subtractor circuit? (A – B) A = 0 B = 1 ANS: Di= 1, Bo= 1

7 Full Subtractor B in A i B i D i Bo B in AiBiAiBi DiDi D i = C i (A i B i ) Same as S i in full adder We going to use C i as B in C i+1 as B o Note: 3 inputs Full-Subtractor (FS), a 3-input bit- wise Subtractor functional block

8 Full Subtractor C i A i B i D i C i+1 CiCi AiBiAiBi C i+1 C i+1 = !A i B i + !A i !B i + C i A i B i Note: 3 inputs °Now consider implementation of Borrow out C i+1 °Remember Two outputs per full Subtractor bit (C i+1, S i ) Note: 2 out- puts

9 Full Subtractor C i+1 = !A i B i +C i !A i !B i +C i A i B i C i+1 = !A i B i + C i (!A i !B i + A i B i ) C i+1 = !A i B i + C i !(A i B i ) Recall: D i = C i (A i B i ) C i+1 = !A i B i +C i !(A i B i )

10 Full Subtractor D i = C i (A i B i ) C i+1 = !A i B i + C i !(A i B i ) half subtractor

11 QUIZ ? ? Q#1- What are the Difference and Borrow out output from this full-subtractor circuit? (A – B - Bin) Bin = 0 A = 0 B = 0 ANSWER: Di = 0, Bo = 0 Q#2- What are the Difference and Borrow out output from this full-subtractor circuit? (A – B - Bin) Bin = 1 A = 0 B = 0 ANSWER: Di = 1, Bo = 1 Q#3- What are the Difference and Borrow out output from this full-subtractor circuit? (A – B - Bin) Bin = 1 A = 1 B = 1 ANSWER: Di = 1, Bo = 1 Q#4- What are the Difference and Borrow out output from this full-subtractor circuit? (A – B - Bin) Bin = 1 A = 0 B = 1 ANSWER: Di = 0, Bo = 1 Q#5- What are the Difference and Borrow out output from this full-subtractor circuit? (A – B - Bin) Bin = 0 A = 1 B = 0 ANSWER: Di = 1, Bo = 0 Q#6- What are the Difference and Borrow out output from this full-subtractor circuit? (A – B - Bin) Bin = 0 A = 1 B = 1 ANSWER: Di = 0, Bo = 0


Download ppt "Cs 121 Ch 4-2 Combinational Logic. Subtractors Half Subtractor Full Subtractor."

Similar presentations


Ads by Google