ScholarQuill logoScholarQuillUniversity Notes
  • Notes
  • Past Papers
  • Blogs
  • Todo
Login
ScholarQuill logoScholarQuillUniversity Notes
Login
NotesPast PapersBlogsTodo
More
SubjectsDiscussionCGPA CalculatorGPA CalculatorStudent PortalCourse Outline
About
About usPrivacy PolicyReportContact
Notes
Past Papers
Blogs
Todo
Analytics
    Current Subject
    🧩
    Digital Logic and Design
    PHYS4129
    Progress0 / 20 topics
    Topics
    1. Review of Number Systems: Binary, octal and hexadecimal number system their inter conversion2. Basic logic gates3. Different codes: BCD, ASCII, Gray etc.4. Parity in codes5. Boolean Algebra: Demorgan theorems6. Simplification of Boolean expression by Boolean postulates and theorem7. SOP and POS conversions8. K maps and their uses9. Don't care condition10. Combinational Logic Circuit: Logic circuits based on AND-OR, OR-AND, NAND, NOR Logic gates design11. Addition, subtraction, 2's compliments12. Half adder, full adder13. Half subtractor, full subtractor14. Encoder, decoder15. Multiplexer and demultiplexer16. Sequential Logic Circuit: Latches17. Flip-flops: S-R, J-K, T and D flip flops18. Master-slave flip-flops19. IC Logic Families: Basic characteristics (Propagation delay time, dissipation, noise margins etc.)20. Different logic based IC families: DTL, RTL, TTL, CMOS
    PHYS4129›Half subtractor, full subtractor
    Digital Logic and DesignTopic 13 of 20

    Half subtractor, full subtractor

    4 minread
    729words
    Beginnerlevel

    Half Subtractor and Full Subtractor

    In digital logic circuits, subtraction of binary numbers is performed using subtractor circuits. A half subtractor and a full subtractor are combinational circuits used for binary subtraction. Let's discuss each in detail.


    1. Half Subtractor

    A half subtractor is a basic circuit that subtracts two single-bit binary numbers. It has two inputs and two outputs:

    • Difference (D)
    • Borrow (B)

    Truth Table for Half Subtractor:

    Input A Input B Difference (D) Borrow (B)
    0 0 0 0
    0 1 1 1
    1 0 1 0
    1 1 0 0

    Explanation:

    • Difference (D) is the result of subtracting the second bit (B) from the first bit (A).
    • Borrow (B) is generated when the bit being subtracted is larger than the bit being subtracted from (i.e., A < B).

    Logic Equations:

    • Difference (D) = A ⊕ B (A XOR B)
    • Borrow (B) = A' · B (NOT A AND B)

    Where:

    • A' is the NOT of A (inverted A).

    Circuit Design for Half Subtractor:

    • The Difference is calculated using an XOR gate between inputs A and B.
    • The Borrow is calculated using an AND gate between the inverted A (A') and B.

    Diagram of Half Subtractor:

         A ───┐
               │
               │   XOR   ─── Difference
         B ───┘──────┐
                      │
                      │   AND    ─── Borrow
                      └──────────┘
    

    2. Full Subtractor

    A full subtractor is a more advanced circuit that subtracts three binary bits. It has three inputs:

    • A (Minuend)
    • B (Subtrahend)
    • Bin (Borrow input from the previous stage)

    It produces two outputs:

    • Difference (D)
    • Borrow (Bout) (Borrow output for the next stage)

    Truth Table for Full Subtractor:

    A B Bin Difference (D) Borrow (Bout)
    0 0 0 0 0
    0 0 1 1 1
    0 1 0 1 1
    0 1 1 0 1
    1 0 0 1 0
    1 0 1 0 0
    1 1 0 0 0
    1 1 1 1 1

    Explanation:

    • Difference (D) is the result of subtracting the two bits (A and B) and considering the borrow input (Bin).
    • Borrow (Bout) is generated when the bit being subtracted is larger than the bit being subtracted from, or when there is a carry from the previous subtraction.

    Logic Equations:

    • Difference (D) = A ⊕ B ⊕ Bin (A XOR B XOR Bin)
    • Borrow (Bout) = (A' · B) + (A' · Bin) + (B · Bin)

    Where:

    • A' is the NOT of A (inverted A).
    • Bin is the borrow input.

    Circuit Design for Full Subtractor:

    The full subtractor can be constructed using:

    1. XOR gates to calculate the difference.
    2. AND gates to calculate the borrow.
    3. OR gate to combine the borrow outputs.

    Diagram of Full Subtractor:

         A ───┐
               │
               │   XOR   ─── Difference
         B ───┘──────┐
                      │
               ┌──────┴──────┐
               │             │
               │             │
         Bin ───┘         AND ─── Borrow Out
                               │
                               OR
                               │
                               └─ Borrow out
    

    3. Difference Between Half Subtractor and Full Subtractor

    Feature Half Subtractor Full Subtractor
    Inputs 2 inputs (A and B) 3 inputs (A, B, and Borrow in)
    Outputs 2 outputs (Difference and Borrow) 2 outputs (Difference and Borrow out)
    Borrow Input No borrow input Has borrow input from the previous stage
    Used in Simple subtraction of two bits Multi-bit subtraction (used in chained subtractors)
    Complexity Simple design with basic gates More complex, requires XOR, AND, OR gates

    4. Use of Full Subtractor in Multi-Bit Subtraction

    Just as full adders are used in multi-bit addition, full subtractors can be used to subtract multi-bit binary numbers. A full subtractor can be cascaded to perform multi-bit subtraction, where the borrow output from one full subtractor becomes the borrow input to the next full subtractor.

    For example, to subtract two 4-bit binary numbers:

      A3 A2 A1 A0
    - B3 B2 B1 B0
    ---------------
      D3 D2 D1 D0  (Difference)
    Borrow Out
    
    • Full subtractor 1 will subtract A0 - B0 considering the borrow input (Bin) from the previous stage.
    • Full subtractor 2 will subtract A1 - B1 and the borrow output from the previous full subtractor, and so on.

    Conclusion

    • Half Subtractor is a simple circuit that performs binary subtraction of two bits (A and B) and generates the difference and borrow outputs.
    • Full Subtractor extends the half subtractor by adding a third input, the borrow input (from a previous stage), and provides the difference and borrow output, making it suitable for multi-bit subtraction.
    • Full subtractors are useful when subtracting larger binary numbers, as they can be cascaded to handle multi-bit binary subtraction.
    Previous topic 12
    Half adder, full adder
    Next topic 14
    Encoder, decoder

    Past Papers

    Open this section to load past papers

    Click on Show Past Papers to see past papers.
    On This Page
      Reading Stats
      Est. reading time4 min
      Word count729
      Code examples0
      DifficultyBeginner