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-110Full Subtractor Operat…
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
    9 min read
    Topic 52 of 63
    Topic Study Note Illustration
    52

    Full Subtractor Operation

    A Full Subtractor is a digital circuit that performs the subtraction of three binary bits: two significant bits and a borrow-in bit (from a previous subtraction). It...

    Full Subtractor Operation

    A Full Subtractor is a digital circuit that performs the subtraction of three binary bits: two significant bits and a borrow-in bit (from a previous subtraction). It is an extension of the Half Subtractor, which can only subtract two bits and does not handle a borrow-in input. The Full Subtractor takes into account the borrow from previous stages of subtraction and produces two outputs: the Difference (D) and the Borrow-out (B_out).


    Inputs and Outputs of a Full Subtractor

    • Inputs:

      • A: The minuend (the bit from which we subtract).
      • B: The subtrahend (the bit that we subtract).
      • Borrow-in (B_in): The borrow bit from a previous subtraction (if any).
    • Outputs:

      • Difference (D): The result of the subtraction of A, B, and Borrow-in.
      • Borrow-out (B_out): The borrow bit that indicates whether a borrow is needed when subtracting (i.e., if A - B - Borrow-in results in a negative number).

    Truth Table of a Full Subtractor

    The Full Subtractor performs binary subtraction based on the following truth table:

    A B Borrow-in (B_in) Difference (D) Borrow-out (B_out)
    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

    Explanation of the Truth Table:

    • When A = 0, B = 0, and Borrow-in = 0:
      The Difference (D) is 0, and there is no borrow, so Borrow-out = 0.

    • When A = 0, B = 0, and Borrow-in = 1:
      The Difference (D) is 1, and there is a borrow, so Borrow-out = 1.

    • When A = 0, B = 1, and Borrow-in = 0:
      The Difference (D) is 1, and there is a borrow, so Borrow-out = 1.

    • When A = 0, B = 1, and Borrow-in = 1:
      The Difference (D) is 0, and there is a borrow, so Borrow-out = 1.

    • When A = 1, B = 0, and Borrow-in = 0:
      The Difference (D) is 1, and there is no borrow, so Borrow-out = 0.

    • When A = 1, B = 0, and Borrow-in = 1:
      The Difference (D) is 0, and there is no borrow, so Borrow-out = 0.

    • When A = 1, B = 1, and Borrow-in = 0:
      The Difference (D) is 0, and there is no borrow, so Borrow-out = 0.

    • When A = 1, B = 1, and Borrow-in = 1:
      The Difference (D) is 1, and there is no borrow, so Borrow-out = 0.


    Boolean Equations for Difference and Borrow-out

    The outputs of the Full Subtractor can be expressed using Boolean algebra as follows:

    1. Difference (D):

      • The Difference output is equivalent to the XOR of the three input bits A, B, and Borrow-in.
      D=A⊕B⊕BinD = A \oplus B \oplus B_{\text{in}}D=A⊕B⊕Bin​

      This equation shows that the difference is 1 when an odd number of the inputs (A, B, and B_in) are 1.

    2. Borrow-out (B_out):

      • The Borrow-out output is 1 if a borrow is required from previous stages. The borrow condition occurs when B and Borrow-in are 1, or when A is less than B (and possibly needs a borrow).
      Bout=(A‾⋅B)+(A‾⋅Bin)+(B⋅Bin)B_{\text{out}} = (\overline{A} \cdot B) + (\overline{A} \cdot B_{\text{in}}) + (B \cdot B_{\text{in}})Bout​=(A⋅B)+(A⋅Bin​)+(B⋅Bin​)

      This equation indicates that a borrow occurs if:

      • A = 0 and B = 1, or
      • A = 0 and Borrow-in = 1, or
      • B = 1 and Borrow-in = 1.

    Logic Gate Implementation of Full Subtractor

    The Full Subtractor can be implemented using a combination of XOR, AND, and OR gates:

    1. Difference (D):

      • First, XOR the inputs A and B: Temp1=A⊕B\text{Temp1} = A \oplus BTemp1=A⊕B
      • Then, XOR Temp1 with Borrow-in to get the final Difference (D): D=Temp1⊕BinD = \text{Temp1} \oplus B_{\text{in}}D=Temp1⊕Bin​
    2. Borrow-out (B_out):

      • Use AND gates and OR gates to calculate the borrow:
        • AND NOT A and B: A‾⋅B\overline{A} \cdot BA⋅B
        • AND NOT A and Borrow-in: A‾⋅Bin\overline{A} \cdot B_{\text{in}}A⋅Bin​
        • AND B and Borrow-in: B⋅BinB \cdot B_{\text{in}}B⋅Bin​
      • Finally, OR the results to produce Borrow-out: Bout=(A‾⋅B)+(A‾⋅Bin)+(B⋅Bin)B_{\text{out}} = (\overline{A} \cdot B) + (\overline{A} \cdot B_{\text{in}}) + (B \cdot B_{\text{in}})Bout​=(A⋅B)+(A⋅Bin​)+(B⋅Bin​)

    Circuit Diagram:

    • The XOR gates calculate the Difference.
    • The AND gates and OR gates calculate the Borrow-out.

    Full Subtractor Example

    Let’s walk through an example to better understand how the Full Subtractor works.

    Example 1:

    • Inputs: A = 1, B = 0, Borrow-in = 1
      • Difference (D): D=A⊕B⊕Bin=1⊕0⊕1=0D = A \oplus B \oplus B_{\text{in}} = 1 \oplus 0 \oplus 1 = 0D=A⊕B⊕Bin​=1⊕0⊕1=0
      • Borrow-out (B_out): Bout=(A‾⋅B)+(A‾⋅Bin)+(B⋅Bin)=(0⋅0)+(0⋅1)+(0⋅1)=0B_{\text{out}} = (\overline{A} \cdot B) + (\overline{A} \cdot B_{\text{in}}) + (B \cdot B_{\text{in}}) = (0 \cdot 0) + (0 \cdot 1) + (0 \cdot 1) = 0Bout​=(A⋅B)+(A⋅Bin​)+(B⋅Bin​)=(0⋅0)+(0⋅1)+(0⋅1)=0
      • Result: Difference = 0, Borrow-out = 0

    Example 2:

    • Inputs: A = 0, B = 1, Borrow-in = 1
      • Difference (D): D=A⊕B⊕Bin=0⊕1⊕1=0D = A \oplus B \oplus B_{\text{in}} = 0 \oplus 1 \oplus 1 = 0D=A⊕B⊕Bin​=0⊕1⊕1=0
      • Borrow-out (B_out): Bout=(A‾⋅B)+(A‾⋅Bin)+(B⋅Bin)=(1⋅1)+(1⋅1)+(1⋅1)=1B_{\text{out}} = (\overline{A} \cdot B) + (\overline{A} \cdot B_{\text{in}}) + (B \cdot B_{\text{in}}) = (1 \cdot 1) + (1 \cdot 1) + (1 \cdot 1) = 1Bout​=(A⋅B)+(A⋅Bin​)+(B⋅Bin​)=(1⋅1)+(1⋅1)+(1⋅1)=1
      • Result: Difference = 0, Borrow-out = 1

    Applications of Full Subtractor

    1. Multi-bit Subtraction:

      • Full subtractors are used in multi-bit binary subtractors. By chaining Full Subtractors together, subtraction of multi-bit numbers can be achieved, much like in addition circuits.
    2. Arithmetic Logic Units (ALUs):

      • Full Subtractors are part of ALUs in processors, where they perform subtraction operations in addition to other arithmetic and logic operations.
    3. Digital Signal Processing:

      • Full Subtractors are used in applications like signal comparison, error detection, and digital filters, where binary subtraction is necessary.
    4. Counters and Digital Systems:

      • Full Subtractors are useful in digital counters, data comparison systems, and systems requiring binary subtraction with carry/borrow handling.

    Conclusion

    The Full Subtractor is a crucial component in digital electronics that allows the subtraction of three binary digits: two significant bits and a borrow-in. It produces two outputs: the Difference and the Borrow-out. The Full Subtractor is used in multi-bit binary subtraction circuits, Arithmetic Logic Units (ALUs), and many other digital systems, where handling borrow conditions from previous operations is essential for accurate subtraction.

    ← Previous topic 51
    Half Subtractor Operation
    Next topic 53 →
    7-Segment Display Operation

    Past Papers

    Open this section to view and download past papers

    Click on Show Past Papers to load available exam papers.

    Reading Progress
    0%
    9mremaining
    1.5kwords
    Intermediatelevel
    On This Page

    No headings found

    Study Toolkit

    Subject Portal

    Digital Logic Design