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 PortalCC-110Subtractor Design
Ctrl + K
Login
Explore
Search
Semester
Papers
CGPA
    CC-110

    Digital Logic Design

    Progress0 / 63 done
    Topics63
    1Introduction to Digital Systems2Number Systems3Introduction to Boolean Algebra4Basic theorems and properties of Boolean Algebra5Boolean Functions6Logic Gates7NAND and NOR Implementation8Representation of Function in Sum of Minterms or Product of Maxterms9Simplification of Boolean function using Karnaugh Map10Don't care Conditions11The Tabulation Method12Introduction to Combinational Logic13Design of Adders14Design of Subtractors15Code Convertors16Analysis Procedure of Combinational Circuits17Binary Parallel Adders18Decimal Adders19Magnitude Comparator20Decoders and its applications21Multiplexers22Demultiplexers23Encoders24ROM25Programmable Logic Array (PLA)26Introduction to Sequential Circuits27Basic Flip Flop28Clocked RS Flip Flop29Clocked D Flip Flop30Clocked JK Flip Flop31Clocked T Flip Flop32Analysis of Clocked Sequential Circuits33State Reduction and Assignment34Flip Flop Excitation tables35Design Procedure36Design of Counters37Design with State Equations38Introduction to Registers39Shift Registers40Ripple Counters41Synchronous Counters42Timing Sequences43Memory Unit44Random Access Memory45Introduction to Programmable Logic Devices (CPLD, FPGA)46Lab Assignments using tools such as Verilog HDL/VHDL, MultiSim47Familiarization with Digital Electronic Trainer48Logic gates operations49Half Adder Operation50Full Adder Operation51Half Subtractor Operation52Full Subtractor Operation537-Segment Display Operation54Decoder Operation55BCD To 7-Segment Display56Multiplexer Operation57Using Multiplexer and Demultiplexer/Decoder58Multiplexing 7-Segment Displays59Comparator Operations60D Latch and Flip-Flop Operation61Latching BCD Data for Displaying On 7-Segment Display62JK Flip-Flop Operation63Random Access Memories
    7 min read
    Topic 14 of 63
    Topic Study Note Illustration
    14

    Design of Subtractors

    Subtractors are digital circuits used to subtract one binary number from another. Like adders, subtractors are essential components in arithmetic units (ALUs) of digital systems and processors....

    Design of Subtractors in Digital Logic

    Subtractors are digital circuits used to subtract one binary number from another. Like adders, subtractors are essential components in arithmetic units (ALUs) of digital systems and processors. The basic operation of subtraction in binary involves borrowing, and subtractors are designed to handle this process.

    There are two main types of subtractors:

    1. Half Subtractor (HS)
    2. Full Subtractor (FS)

    We'll explore both types of subtractors in detail, along with their design and applications.


    1. Half Subtractor (HS)

    A half subtractor is the simplest subtractor circuit that subtracts two binary digits. It subtracts two single-bit numbers and produces two outputs:

    • Difference (D)
    • Borrow (B)

    A half subtractor does not take into account any borrow from a previous stage, hence the term "half."

    Truth Table for Half Subtractor:

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

    Boolean Equations for Half Subtractor:

    • Difference: D=A⊕BD = A \oplus BD=A⊕B (XOR gate)
    • Borrow: B=¬A⋅BB = \neg A \cdot BB=¬A⋅B (AND gate)

    Circuit Diagram:

    • The difference is computed using an XOR gate, which outputs 1 when the inputs are different.
    • The borrow is computed using an AND gate, which outputs 1 when A is 0 and B is 1.

    2. Full Subtractor (FS)

    A full subtractor is a more general subtractor that can handle the subtraction of two binary digits with a borrow input. It subtracts three bits:

    • Two significant bits (A and B)
    • A borrow bit from the previous stage (Borrow_in, BinB_{in}Bin​)

    The full subtractor produces two outputs:

    • Difference (D)
    • Borrow_out (B_out)

    Truth Table for Full Subtractor:

    A B Borrow_in (Bin) 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

    Boolean Equations for Full Subtractor:

    • Difference: D=A⊕B⊕BinD = A \oplus B \oplus B_{in}D=A⊕B⊕Bin​ (XOR gate)
    • Borrow-out: Bout=¬A⋅B+(Bin⋅(A⊕B))B_{out} = \neg A \cdot B + (B_{in} \cdot (A \oplus B))Bout​=¬A⋅B+(Bin​⋅(A⊕B)) (AND and OR gates)

    Circuit Diagram:

    • The difference is calculated using two XOR gates: one for A⊕BA \oplus BA⊕B, and the second for (A⊕B)⊕Bin(A \oplus B) \oplus B_{in}(A⊕B)⊕Bin​.
    • The borrow-out is calculated using AND and OR gates based on the Boolean equation.

    Design Considerations for Subtractors:

    1. Handling Borrowing:

      • Subtractors must be able to handle the borrow process, which happens when the digit being subtracted is larger than the digit being subtracted from. The borrow is propagated to the next stage.
      • In the full subtractor, the borrow-out from the current stage becomes the borrow-in for the next stage.
    2. Difference Calculation:

      • The difference is typically calculated using an XOR gate since it naturally produces the result of a bitwise subtraction (considering borrow as a factor).
    3. Carry/Borrow Propagation:

      • Borrowing is a crucial aspect of binary subtraction. If a borrow is needed, it must be passed to the next lower bit.

    3. Binary Subtraction Using Borrowing (in Ripple Mode)

    In a multi-bit binary subtraction, we need to chain multiple full subtractors together. Each subtractor handles a pair of bits (from the two numbers being subtracted) and takes the borrow from the previous subtractor. This is similar to how a ripple carry adder works.

    Ripple Borrow Adder (Ripple Carry Subtractor):

    For an nnn-bit subtraction:

    1. You need n full subtractors.
    2. The borrow-out of each subtractor is fed into the borrow-in of the next subtractor.

    This process is known as ripple borrowing because the borrow bit ripples through all stages from the least significant bit to the most significant bit.

    Example for 4-bit Subtraction:

    If we want to subtract two 4-bit binary numbers A3A2A1A0A_3 A_2 A_1 A_0A3​A2​A1​A0​ and B3B2B1B0B_3 B_2 B_1 B_0B3​B2​B1​B0​, we would use four full subtractors:

    • Full subtractor 1: A0A_0A0​, B0B_0B0​, Bin0B_{in0}Bin0​ → Difference D0D_0D0​, Borrow B1B_1B1​
    • Full subtractor 2: A1A_1A1​, B1B_1B1​, B1B_1B1​ → Difference D1D_1D1​, Borrow B2B_2B2​
    • Full subtractor 3: A2A_2A2​, B2B_2B2​, B2B_2B2​ → Difference D2D_2D2​, Borrow B3B_3B3​
    • Full subtractor 4: A3A_3A3​, B3B_3B3​, B3B_3B3​ → Difference D3D_3D3​, Borrow B4B_4B4​

    The final borrow-out (B4B_4B4​) will represent whether a borrow occurred from the most significant bit.


    4. Borrow Lookahead Adder (BLA)

    To speed up the operation of subtractors, borrow lookahead logic is sometimes used. Borrow lookahead subtractors use parallel logic to generate the borrow signal for all stages simultaneously, rather than waiting for the borrow to propagate through each stage. This significantly reduces the delay in multi-bit subtractions, just as carry lookahead adders reduce delay in multi-bit additions.


    Applications of Subtractors:

    1. Arithmetic Logic Units (ALUs): Subtractors are essential components of ALUs, which perform arithmetic operations like addition, subtraction, and comparison in processors.

    2. Digital Signal Processing (DSP): Subtractors are used in DSP systems for signal manipulation, especially when performing operations like filtering or image processing.

    3. Binary Counters: Subtractors are used in digital counters and timers, where counting down is necessary.

    4. Control Systems: Subtractors are used in control systems for error detection and correction, where the difference between expected and actual values is important.


    Conclusion:

    Subtractors are fundamental circuits in digital systems, used to perform binary subtraction. From the simple half subtractor to the more complex full subtractor and borrow lookahead techniques, subtractors are essential for various applications, including processors, ALUs, and DSP systems. Understanding the design and operation of subtractors is crucial for building efficient arithmetic circuits in digital systems.

    ← Previous topic 13
    Design of Adders
    Next topic 15 →
    Code Convertors

    Past Papers

    Open this section to view and download past papers

    Click on Show Past Papers to load available exam papers.

    Reading Progress
    0%
    7mremaining
    1.2kwords
    Intermediatelevel
    On This Page

    No headings found

    Study Toolkit

    Subject Portal

    Digital Logic Design