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
    CC-110
    Progress0 / 63 topics
    Topics
    1. Introduction to Digital Systems2. Number Systems3. Introduction to Boolean Algebra4. Basic theorems and properties of Boolean Algebra5. Boolean Functions6. Logic Gates7. NAND and NOR Implementation8. Representation of Function in Sum of Minterms or Product of Maxterms9. Simplification of Boolean function using Karnaugh Map10. Don't care Conditions11. The Tabulation Method12. Introduction to Combinational Logic13. Design of Adders14. Design of Subtractors15. Code Convertors16. Analysis Procedure of Combinational Circuits17. Binary Parallel Adders18. Decimal Adders19. Magnitude Comparator20. Decoders and its applications21. Multiplexers22. Demultiplexers23. Encoders24. ROM25. Programmable Logic Array (PLA)26. Introduction to Sequential Circuits27. Basic Flip Flop28. Clocked RS Flip Flop29. Clocked D Flip Flop30. Clocked JK Flip Flop31. Clocked T Flip Flop32. Analysis of Clocked Sequential Circuits33. State Reduction and Assignment34. Flip Flop Excitation tables35. Design Procedure36. Design of Counters37. Design with State Equations38. Introduction to Registers39. Shift Registers40. Ripple Counters41. Synchronous Counters42. Timing Sequences43. Memory Unit44. Random Access Memory45. Introduction to Programmable Logic Devices (CPLD, FPGA)46. Lab Assignments using tools such as Verilog HDL/VHDL, MultiSim47. Familiarization with Digital Electronic Trainer48. Logic gates operations49. Half Adder Operation50. Full Adder Operation51. Half Subtractor Operation52. Full Subtractor Operation53. 7-Segment Display Operation54. Decoder Operation55. BCD To 7-Segment Display56. Multiplexer Operation57. Using Multiplexer and Demultiplexer/Decoder58. Multiplexing 7-Segment Displays59. Comparator Operations60. D Latch and Flip-Flop Operation61. Latching BCD Data for Displaying On 7-Segment Display62. JK Flip-Flop Operation63. Random Access Memories
    CC-110›Half Subtractor Operation
    Digital Logic DesignTopic 51 of 63

    Half Subtractor Operation

    6 minread
    962words
    Intermediatelevel

    Half Subtractor Operation

    A Half Subtractor is a digital circuit that performs the subtraction of two single-bit binary numbers. It subtracts the second bit (B) from the first bit (A) and produces two outputs: the Difference (D) and the Borrow (B_out). It is the simplest form of a subtractor in digital electronics and is used to calculate the difference and borrow in binary subtraction.


    Inputs and Outputs of a Half Subtractor

    • Inputs:

      • A: The minuend (the bit from which we subtract).
      • B: The subtrahend (the bit that we subtract).
    • Outputs:

      • Difference (D): The result of the subtraction of A and B.
      • Borrow (B_out): The borrow bit, which indicates whether a borrow is needed when subtracting (i.e., if A < B).

    Truth Table of a Half Subtractor

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

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

    Explanation of the Truth Table:

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

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

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

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


    Boolean Equations for Difference and Borrow

    The outputs of the Half Subtractor can be defined using Boolean algebra as follows:

    1. Difference (D):

      • The Difference output is equivalent to the XOR (exclusive OR) of the two input bits A and B.
      D=A⊕BD = A \oplus BD=A⊕B

      This equation shows that the difference is 1 when the inputs A and B are different, and 0 when they are the same.

    2. Borrow (B_out):

      • The Borrow output is the result of an AND operation between B and the negation (inversion) of A. It indicates that A is less than B and requires a borrow.
      Bout=A‾⋅BB_{\text{out}} = \overline{A} \cdot BBout​=A⋅B

      This equation shows that a borrow is needed when A = 0 and B = 1.


    Logic Gate Implementation of Half Subtractor

    The Half Subtractor can be implemented using basic logic gates (XOR and AND):

    1. Difference (D):

      • Use an XOR gate to compute the difference between A and B: D=A⊕BD = A \oplus BD=A⊕B
    2. Borrow (B_out):

      • Use an AND gate and a NOT gate (for negating A) to compute the borrow: Bout=A‾⋅BB_{\text{out}} = \overline{A} \cdot BBout​=A⋅B

    Circuit Diagram:

    • The XOR gate is used to calculate the Difference.
    • The AND gate is used with a NOT gate (to invert A) to calculate the Borrow.

    Half Subtractor Example

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

    Example 1:

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

    Example 2:

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

    Applications of Half Subtractor

    1. Basic Arithmetic Operations:

      • The Half Subtractor is fundamental in performing binary subtraction. It is used in constructing larger binary subtractors and arithmetic circuits like ALUs (Arithmetic Logic Units) that support subtraction operations.
    2. Digital Subtraction:

      • Half Subtractors are used in digital systems where binary subtraction is required, such as in counters, digital signal processors, and control units.
    3. Data Processing:

      • Half Subtractors are involved in operations where data comparison or subtraction is essential, such as in error detection or checksum calculations.

    Limitations of Half Subtractor

    While the Half Subtractor is useful, it has a key limitation:

    • No Borrow-in Input: The Half Subtractor does not handle a borrow-in bit from a previous subtraction operation. For multi-bit subtraction, a Full Subtractor is used, which can handle both Borrow-in and Borrow-out bits.

    Conclusion

    The Half Subtractor is a simple yet essential digital circuit that allows the subtraction of two single-bit binary numbers. It produces two outputs: the Difference and the Borrow, using basic logic gates like XOR and AND. The Half Subtractor is a foundational building block for more complex arithmetic operations in digital systems, though for multi-bit operations, the Full Subtractor is used to handle borrow propagation across multiple bits.

    Previous topic 50
    Full Adder Operation
    Next topic 52
    Full Subtractor Operation

    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 time6 min
      Word count962
      Code examples0
      DifficultyIntermediate