ScholarQuill logoScholarQuillUniversity Notes
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
Study Tools
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
Contact
ScholarQuill logo
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
ScholarQuill logoScholarQuillUniversity Notes
Study PortalCSI-306Combinational Logic De…
Ctrl + K
Login
Explore
Search
Semester
Papers
CGPA
    CSI-306

    Digital Logic Design

    Progress0 / 47 done
    Topics47
    1Overview of Binary Numbers2Boolean Algebra3Switching Algebra4Logic Gates5Karnaugh Map6Quin-McCluskey Methods7Simplification of Boolean Functions
    8Two-Level NAND/NOR Implementation9Tabular Minimization
    10Adders11Subtracters12Code Converters13Parity Checkers14Multilevel NAND/NOR/XOR Circuits15MSI Components16Design and Use of Encoders17Design and Use of Decoders18Design and Use of Multiplexers19BCD Adders20Comparators21Latches and Flip-Flops22Synchronous Sequential Circuit Design and Analysis23Registers24Synchronous and Asynchronous Counters25Memories26Control Logic Design27Wired Logic and Characteristics of Logic Gate Families28ROMs29PLDs30PLAs31State Reduction and Good State Variable Assignments32Algorithmic State Machine (ASM) Charts33Asynchronous Circuits34Memory Systems35Functional Organization36Multiprocessor and Alternative Architectures37Introduction to SIMD38Introduction to MIMD39Introduction to VLIW40Introduction to EPIC41Systolic Architecture42Interconnection Networks43Shared Memory Systems44Cache Coherence45Memory Models and Memory Consistency46Performance Enhancements47Contemporary Architectures
    8 min read
    Topic 11 of 47
    Topic Study Note Illustration
    11

    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...

    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)

    Subtractor
    Visual ReferenceSubtractor
    Wikipedia

    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 view and download past papers

    Click on Show Past Papers to load available exam papers.

    Reading Progress
    0%
    8mremaining
    1.3kwords
    Intermediatelevel
    On This Page

    No headings found

    Study Toolkit

    Subject Portal

    Digital Logic Design