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 Design
    CSI-306
    Progress0 / 47 topics
    Topics
    1. Overview of Binary Numbers2. Boolean Algebra3. Switching Algebra4. Logic Gates5. Karnaugh Map6. Quin-McCluskey Methods7. Simplification of Boolean Functions8. Combinational Design: Two-Level NAND/NOR Implementation9. Tabular Minimization10. Combinational Logic Design: Adders11. Combinational Logic Design: Subtracters12. Combinational Logic Design: Code Converters13. Combinational Logic Design: Parity Checkers14. Multilevel NAND/NOR/XOR Circuits15. MSI Components16. Design and Use of Encoders17. Design and Use of Decoders18. Design and Use of Multiplexers19. BCD Adders20. Comparators21. Latches and Flip-Flops22. Synchronous Sequential Circuit Design and Analysis23. Registers24. Synchronous and Asynchronous Counters25. Memories26. Control Logic Design27. Wired Logic and Characteristics of Logic Gate Families28. ROMs29. PLDs30. PLAs31. State Reduction and Good State Variable Assignments32. Algorithmic State Machine (ASM) Charts33. Asynchronous Circuits34. Memory Systems35. Functional Organization36. Multiprocessor and Alternative Architectures37. Introduction to SIMD38. Introduction to MIMD39. Introduction to VLIW40. Introduction to EPIC41. Systolic Architecture42. Interconnection Networks43. Shared Memory Systems44. Cache Coherence45. Memory Models and Memory Consistency46. Performance Enhancements47. Contemporary Architectures
    CSI-306›Combinational Logic Design: Subtracters
    Digital Logic DesignTopic 11 of 47

    Combinational Logic Design: Subtracters

    8 minread
    1,277words
    Intermediatelevel

    Combinational Logic Design: Subtracters

    Subtracters are combinational circuits used to perform binary subtraction. Similar to adders, subtracters are designed to compute the difference between two binary numbers. Subtracters are fundamental in digital systems for arithmetic operations, especially in processors, arithmetic logic units (ALUs), and other computing devices.

    There are two primary types of subtracters:

    • Half Subtractor (HS)
    • Full Subtractor (FS)

    Both can be used in various configurations to create multi-bit subtracters.

    1. Half Subtractor (HS)

    A half subtractor is the simplest subtracter circuit that performs subtraction of two single-bit binary numbers. It takes two inputs and produces two outputs: the difference and the borrow.

    Truth Table for Half Subtractor:

    A (Input) B (Input) Difference (D) Borrow (B)
    0 0 0 0
    0 1 1 1
    1 0 1 0
    1 1 0 0
    • Difference (D): The result of the binary subtraction. The difference can be calculated using the XOR operation.
    • Borrow (B): The borrow output indicates whether a "borrow" occurred during subtraction (similar to a carry in addition). This is calculated using the AND operation and NOT operation.

    Boolean Expressions:

    • Difference (D) = A ⊕ B (XOR operation)
    • Borrow (B) = ¬A ⋅ B (NOT A AND B)

    Circuit Diagram for Half Subtractor:

      A ----|       |--- Difference (D)
            |  XOR  |
      B ----|       |
                    |
                    |
            |--- Borrow (B)
            |  AND  |
      A ----|       |
      B ----|       |
    

    The half subtractor uses one XOR gate and one AND gate to compute the difference and borrow.

    2. Full Subtractor (FS)

    A full subtractor is a more complex subtracter that can subtract three bits: two significant bits and a borrow bit from the previous lower significant subtraction (i.e., a borrow-in). The full subtractor also produces a difference and a borrow-out, which can be passed to the next lower bit of subtraction.

    Truth Table for Full Subtractor:

    A (Input) B (Input) Bin (Borrow-In) Difference (D) Borrow-Out (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 0
    • Difference (D): The result of the binary subtraction. It can be calculated using XOR on the inputs and borrow-in.
    • Borrow-Out (Bout): The borrow-out indicates whether a borrow occurred in the subtraction process. It can be calculated using combinations of AND, OR, and NOT operations.

    Boolean Expressions:

    • Difference (D) = A ⊕ B ⊕ Bin (XOR operation)
    • Borrow-Out (Bout) = (¬A ⋅ B) + (¬A ⋅ Bin) + (B ⋅ Bin) (OR and AND operations)

    Circuit Diagram for Full Subtractor:

         A ----|       |--- XOR ---- Difference (D)
               |  XOR  |
         B ----|       |
                      |
                Bin --|
                      |      
             |--- AND |--- OR ---- Borrow-Out (Bout)
             |  AND  |   
         A ----|       |
         B ----|       
       Bin ----|       
    

    A full subtractor uses two XOR gates, two AND gates, and one OR gate to compute the difference and borrow-out.

    3. Multi-Bit Subtracters

    To subtract multi-bit binary numbers, we can chain multiple full subtractors together, just like we do in ripple carry adders.

    Ripple Borrow Adder (RBA):

    A ripple borrow adder (RBA) works similarly to the ripple carry adder but for subtraction. It consists of a chain of full subtractors where each full subtractor receives the borrow-out of the previous subtractor as its borrow-in input. The first subtractor’s borrow-in is usually set to 0.

    For example, to subtract two 4-bit numbers A=A3A2A1A0A = A_3A_2A_1A_0A=A3​A2​A1​A0​ and B=B3B2B1B0B = B_3B_2B_1B_0B=B3​B2​B1​B0​, the RBA would consist of four full subtractors connected as:

    • Full Subtractor 1: Subtracts A0A_0A0​, B0B_0B0​, and borrow-in (0) to produce D0D_0D0​ and borrow-out B1B_1B1​.
    • Full Subtractor 2: Subtracts A1A_1A1​, B1B_1B1​, and borrow-in B1B_1B1​ to produce D1D_1D1​ and borrow-out B2B_2B2​.
    • Full Subtractor 3: Subtracts A2A_2A2​, B2B_2B2​, and borrow-in B2B_2B2​ to produce D2D_2D2​ and borrow-out B3B_3B3​.
    • Full Subtractor 4: Subtracts A3A_3A3​, B3B_3B3​, and borrow-in B3B_3B3​ to produce D3D_3D3​ and borrow-out B4B_4B4​.

    The result is the difference D3D2D1D0D_3D_2D_1D_0D3​D2​D1​D0​, and the final borrow-out B4B_4B4​.

    Example of 4-bit Ripple Borrow Adder:

    For subtracting the numbers:

       A = 1011 (11 in decimal)
       B = 1101 (13 in decimal)
    

    Step-by-step, the full subtractors compute:

    1. Subtract bit 0: 1−1−0=01 - 1 - 0 = 01−1−0=0 → Difference = 0, Borrow-out = 0
    2. Subtract bit 1: 1−0−0=11 - 0 - 0 = 11−0−0=1 → Difference = 1, Borrow-out = 0
    3. Subtract bit 2: 0−1−0=10 - 1 - 0 = 10−1−0=1 → Difference = 1, Borrow-out = 1
    4. Subtract bit 3: 1−1−1=11 - 1 - 1 = 11−1−1=1 → Difference = 1, Borrow-out = 1

    The result is the difference 1110 (which is -2 in decimal), and the final borrow-out is 1, indicating the operation resulted in a negative number.

    4. Applications of Subtracters

    Subtracters are used in a variety of applications in digital systems, including:

    • Arithmetic Logic Units (ALU): Subtracters are used in ALUs for performing arithmetic operations like subtraction and signed number calculations (e.g., in two’s complement representation).
    • Digital Signal Processing: Subtracters are used in filters, image processing, and other signal manipulation tasks.
    • Counters: In binary counters, subtracters help in decrementing values.
    • Binary Multiplication and Division: Subtracters are used in algorithms for binary multiplication (e.g., shift-and-subtract) and division.

    5. Advantages of Subtracters

    • Simplicity: The design of half and full subtractors is straightforward, and their implementation is simple with minimal gates.
    • Integration with ALUs: Subtracters can be combined with adders in ALUs to enable both addition and subtraction functionality.
    • Efficient for Arithmetic Operations: Subtracters are essential for performing basic arithmetic operations in digital systems.

    6. Limitations of Subtracters

    • Propagation Delay: Like adders, subtracters can suffer from propagation delay when used in multi-bit configurations, especially in ripple borrow adders.
    • Need for Borrow-In: In full subtractors, the borrow-in signal must be managed properly, and in multi-bit systems, this borrow signal can create delays.

    Conclusion

    Subtracters, including the half subtractor and full subtractor, are crucial in digital arithmetic circuits for performing binary subtraction. The full subtractor, in particular, can handle the borrow-in from previous bits, making it useful for multi-bit subtraction operations. These circuits are essential components in digital systems, especially in arithmetic logic units (AL

    Previous topic 10
    Combinational Logic Design: Adders
    Next topic 12
    Combinational Logic Design: Code Converters

    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 time8 min
      Word count1,277
      Code examples0
      DifficultyIntermediate