Presentation is loading. Please wait.

Presentation is loading. Please wait.

ECE 4110– Sequential Logic Design

Similar presentations


Presentation on theme: "ECE 4110– Sequential Logic Design"— Presentation transcript:

1 ECE 4110– Sequential Logic Design
Lecture #21 Agenda MSI: Subtractors Announcements n/a Lecture #21 Page 1

2 Subtraction Half Subtractor - one bit subtraction can be accomplished using combinational logic (A-B) A B Bout D D = A  B Bout = A'·B Lecture #21 Page 2

3 Subtraction Full Subtractor - to create a full Subtractor, we need to include the “Borrow In” in the Difference (A-B-Bin) A B Bin Bout D D = A  B  Bin Bout = A'∙B + A'∙Bin + B∙Bin notice this is very similar to addition The Sum and Difference Logic are identical - The Carry and Borrow Logic are close Lecture #21 Page 3

4 Subtraction Subtraction - Can we manipulate the subtraction logic so that Full Adders can be used as Full Subtractors? Addition Subtraction S = A  B  Cin D = A  B  Bin Cout = A∙B + A∙Cin + B∙Cin Bout = A'∙B + A'∙Bin + B∙Bin - Let's manipulate Bout to try to get it into a form similar to Cout Bout = A'∙B + A'∙Bin + B∙Bin Bout' = (A+B') ∙ (A+Bin') ∙ (B'+Bin') Generalized DeMorgan's Theorem Now Multiply Out the Terms Bout' = (A∙A∙B')+(A∙B'∙Bin')+(A∙B'∙B')+(B'∙B'∙Bin')+(A∙A∙Bin')+(A∙Bin'∙Bin')+(A∙B'∙Bin')+(B'∙Bin'∙Bin') Now Remove Redundant Terms Bout' = (A∙B')+(A∙B'∙Bin')+(A∙Bin')+(B'∙Bin') Bout' = (A∙B')+(A∙Bin')+(B'∙Bin') Lecture #21 Page 4

5 Subtraction Subtraction - Now we have similar expressions for Cout and Bout where Addition Subtraction Cout = A∙B + A∙Cin + B∙Cin Bout' = A∙B' + A∙Bin' + B'∙Bin' - But this requires the Subtrahend and Bin be inverted, how does this effect the Sum/Difference Logic? Addition Subtraction S = A  B  Cin D = A  B  Bin - remember that both inputs of a 2-input XOR can be inverted without changing the logic function which gives us: S = A  B  Cin D = A  B'  Bin' Lecture #21 Page 5

6 Subtraction Subtraction - After all of this manipulation, we are left with Addition Subtraction S = A  B  Cin D = A  B'  Bin' Cout = A∙B + A∙Cin + B∙Cin Bout' = A∙B' + A∙Bin' + B'∙Bin' - This means we can use "Full Adders" for subtraction as long as: 1) The Subtrahend is inverted 2) Bin is inverted 3) Bout is inverted In a ripple carry subtractor, intermediate Bout's are fed into Bin's, which is a double inversion - We can now invert by the first Bin and the last Bout by inserting a '1' into the first Bin of the chain Lecture #21 Page 6

7 Subtraction Subtraction - this gives us the minimal logic for a "Ripple Carry Subtractor" using "Full Adders" X-Y Lecture #21 Page 7


Download ppt "ECE 4110– Sequential Logic Design"

Similar presentations


Ads by Google