Docsity

Subtraction in Sequential Logic Design: From Half Subtractors to Ripple Carry Subtractors, Slides of Digital Logic Design and Programming

Partial preview of the text

Download Subtraction in Sequential Logic Design: From Half Subtractors to Ripple Carry Subtractors and more Slides Digital Logic Design and Programming in PDF only on Docsity!

Sequential Logic Design

Lecture

  • Agenda
    1. MSI: Subtractors
  • Announcements
    1. n/a
  • Half Subtractor
    • one bit subtraction can be accomplished using combinational logic

(A-B) A B Bout D 0 0 0 0 0 1 1 1 D = A ⊕ B 1 0 0 1 Bout = A'·B 1 1 0 0

  • 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 ')

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

  • Subtraction
    • this gives us the minimal logic for a "Ripple Carry Subtractor" using "Full Adders"

X-Y