Practical No. 7: Implement 2 Input, 3 Input Subtractor Circuit
Practical No. 7: Implement 2-Input and 3-Input Subtractor Circuit
1. Practical Significance
A Subtractor is a combinational logic circuit used to perform binary subtraction.
Subtractor circuits are used in:
Arithmetic and Logic Units (ALU)
Microprocessors
Microcontrollers
Digital computers
Calculators
Digital electronic systems
In this practical, we study and implement:
Half Subtractor – 2 Inputs
Full Subtractor – 3 Inputs
2. Learning Outcomes
After completing this practical, students will be able to:
Understand the working of a Half Subtractor.
Understand the working of a Full Subtractor.
Identify Difference and Borrow outputs.
Implement subtractor circuits using logic gates.
Verify the circuit using a Truth Table.
Measure output voltage using a Digital Multimeter.
Compare practical results with theoretical results.
3. Theoretical Background
What is a Subtractor?
A Subtractor is a combinational logic circuit used to perform subtraction of binary numbers.
There are two basic types:
1. Half Subtractor
A Half Subtractor subtracts two binary bits.
It has:
Inputs:
A
B
Outputs:
Difference (D)
Borrow (Bo)
2. Full Subtractor
A Full Subtractor subtracts three binary inputs.
It has:
Inputs:
A
B
C (Borrow-in)
Outputs:
Difference (D)
Borrow (Bo)
4. Important Boolean Symbols Used
Before studying the equations, understand these symbols.
| Symbol | Meaning | Example |
|---|---|---|
| ' | NOT / Complement | A' means NOT A |
| . | AND | A.B means A AND B |
| + | OR | A + B means A OR B |
| XOR | Exclusive-OR | A XOR B |
Very important
Students should remember:
A' = NOT A
A.B = A AND B
A + B = A OR B
A XOR B = XOR operation
5. Half Subtractor
A Half Subtractor performs the subtraction:
A − B
Here:
A = Minuend
B = Subtrahend
D = Difference
Bo = Borrow
Half Subtractor Equations
Difference
D = A XOR B
Borrow
Bo = A'.B
Read this as:
Borrow = NOT A AND B
Easy way to remember
Difference → XOR gate
Borrow → NOT A + AND with B
6. Half Subtractor Truth Table
| A | B | Difference (D) | Borrow (Bo) |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 1 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 0 |
Understanding the Half Subtractor Truth Table
Case 1: A = 0, B = 0
0 − 0 = 0
Therefore:
Difference = 0
Borrow = 0
Case 2: A = 0, B = 1
We have:
0 − 1
We cannot subtract 1 directly from 0.
Therefore, we need a Borrow.
The result is:
Difference = 1
Borrow = 1
Case 3: A = 1, B = 0
1 − 0 = 1
Therefore:
Difference = 1
Borrow = 0
Case 4: A = 1, B = 1
1 − 1 = 0
Therefore:
Difference = 0
Borrow = 0
7. Full Subtractor
A Full Subtractor performs subtraction of three inputs.
The inputs are:
A = Minuend
B = Subtrahend
C = Borrow-in
The outputs are:
D = Difference
Bo = Borrow-out
The input C represents the borrow received from the previous lower bit.
8. Full Subtractor Equations
Difference
D = A XOR B XOR C
Read it as:
Difference = A XOR B XOR C
Borrow
Bo = A'.B + A'.C + B.C
Read it as:
Borrow = NOT A AND B OR NOT A AND C OR B AND C
Important
Do not worry about the expression at first.
Students only need to remember:
Full Subtractor Difference:
D = A XOR B XOR C
Full Subtractor Borrow:
Bo = A'.B + A'.C + B.C
9. Full Subtractor Truth Table
| A | B | C | Difference (D) | Borrow (Bo) |
|---|---|---|---|---|
| 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 | 1 |
10. Easy Method to Understand Full Subtractor
Remember:
D = A XOR B XOR C
The Difference becomes 1 when the number of 1s in A, B and C is odd.
For example:
| A | B | C | Number of 1s | D |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 1 |
| 0 | 1 | 0 | 1 | 1 |
| 0 | 1 | 1 | 2 | 0 |
| 1 | 0 | 0 | 1 | 1 |
| 1 | 0 | 1 | 2 | 0 |
| 1 | 1 | 0 | 2 | 0 |
| 1 | 1 | 1 | 3 | 1 |
Therefore:
000 → D = 0
001 → D = 1
010 → D = 1
011 → D = 0
100 → D = 1
101 → D = 0
110 → D = 0
111 → D = 1
11. Logic ICs Used
Common 74-series ICs used in this practical are:
| IC Number | Gate | Function |
|---|---|---|
| 7404 | NOT | NOT operation |
| 7408 | AND | AND operation |
| 7432 | OR | OR operation |
| 7486 | XOR | XOR operation |
Note: Always check the IC number and pin configuration from the laboratory manual or IC datasheet before making the circuit.
12. Resources Required
| Sr. No. | Name of Resource | Suggested Specification | Quantity |
|---|---|---|---|
| 1 | Digital IC Tester | TTL IC Tester | 1 |
| 2 | Digital ICs | 7404, 7408, 7432, 7486 | As required |
| 3 | DC Power Supply | +5 V Fixed DC Supply | 1 |
| 4 | Breadboard | Standard Digital Electronics Breadboard | 1 |
| 5 | Connecting Wires | Single-strand wires | As required |
| 6 | LED | 5 mm LED | 2 or more |
| 7 | Resistor | 330 Ω / suitable value | As required |
| 8 | Digital Multimeter | DC Voltage Measurement | 1 |
13. Precautions
Check the IC before using it.
Set the power supply to +5 V DC before connecting the circuit.
Check all connections according to the circuit diagram.
Do not insert or remove an IC when the power supply is ON.
Connect VCC and GND correctly.
Check the LED polarity before connecting it.
Do not short-circuit +5 V and GND.
Switch OFF the power supply after completing the experiment.
14. Procedure – Half Subtractor
Step 1
Check the required ICs using a Digital IC Tester.
Step 2
Place the required ICs carefully on the breadboard.
Step 3
Connect the +5 V DC supply and GND.
Step 4
Construct the Half Subtractor circuit according to the given circuit diagram.
Step 5
Connect the two inputs:
A and B
Step 6
Connect LEDs to the two outputs:
Difference
Borrow
Step 7
Apply:
A = 0, B = 0
Observe the outputs.
Step 8
Apply:
A = 0, B = 1
Observe the outputs.
Step 9
Apply:
A = 1, B = 0
Observe the outputs.
Step 10
Apply:
A = 1, B = 1
Observe the outputs.
Step 11
Measure the output voltage using a Digital Multimeter.
Step 12
Record the readings in the Half Subtractor observation table.
15. Procedure – Full Subtractor
Step 1
Construct the Full Subtractor circuit according to the circuit diagram.
Step 2
Connect the three inputs:
A
B
C
Here C is Borrow-in.
Step 3
Connect LEDs to:
Difference
Borrow
Step 4
Apply all 8 possible combinations of A, B and C.
Step 5
Observe the Difference and Borrow outputs.
Step 6
Measure the output voltages using a Digital Multimeter.
Step 7
Record the readings in the Full Subtractor observation table.
Step 8
Compare the practical results with the theoretical truth table.
16. Observation Table – Half Subtractor
Table 7.1: Observation Table for Half Subtractor
| A | B | Difference Logic Level (0/1) | Difference Output Voltage (V) | Borrow Logic Level (0/1) | Borrow Output Voltage (V) |
|---|---|---|---|---|---|
| 0 (0 V) | 0 (0 V) | 0 | Measure | 0 | Measure |
| 0 (0 V) | 1 (5 V) | 1 | Measure | 1 | Measure |
| 1 (5 V) | 0 (0 V) | 1 | Measure | 0 | Measure |
| 1 (5 V) | 1 (5 V) | 0 | Measure | 0 | Measure |
What should students write?
In the Logic Level columns, write the values shown in the table.
In the Output Voltage columns, write the actual DMM reading.
For example, if the DMM shows:
Logic 0 = 0.12 V
Logic 1 = 4.80 V
then write those measured values.
Do not write 0 V and 5 V automatically. Use your actual DMM readings.
17. Observation Table – Full Subtractor
Table 7.2: Observation Table for Full Subtractor
| A | B | C | Difference Logic Level (0/1) | Difference Output Voltage (V) | Borrow Logic Level (0/1) | Borrow Output Voltage (V) |
|---|---|---|---|---|---|---|
| 0 (0 V) | 0 (0 V) | 0 (0 V) | 0 | Measure | 0 | Measure |
| 0 (0 V) | 0 (0 V) | 1 (5 V) | 1 | Measure | 1 | Measure |
| 0 (0 V) | 1 (5 V) | 0 (0 V) | 1 | Measure | 1 | Measure |
| 0 (0 V) | 1 (5 V) | 1 (5 V) | 0 | Measure | 1 | Measure |
| 1 (5 V) | 0 (0 V) | 0 (0 V) | 1 | Measure | 0 | Measure |
| 1 (5 V) | 0 (0 V) | 1 (5 V) | 0 | Measure | 0 | Measure |
| 1 (5 V) | 1 (5 V) | 0 (0 V) | 0 | Measure | 0 | Measure |
| 1 (5 V) | 1 (5 V) | 1 (5 V) | 1 | Measure | 1 | Measure |
18. Understanding Logic Level and Output Voltage
For a typical 5 V TTL circuit:
| Logic Level | Meaning | Typical Output Voltage |
|---|---|---|
| 0 | LOW | Approximately 0 to 0.4 V |
| 1 | HIGH | Approximately 2.4 to 5 V |
The actual voltage may be slightly different.
Therefore, always record the actual DMM reading.
19. Actual Procedure – Write in Practical Record
Students can write:
The required ICs were tested using a Digital IC Tester.
The Half Subtractor circuit was assembled on the breadboard according to the given circuit diagram.
A +5 V DC supply was connected to the circuit.
All four combinations of inputs A and B were applied.
Difference and Borrow outputs were observed using LEDs.
Output voltages were measured using a Digital Multimeter.
The readings were recorded in Table 7.1.
The Full Subtractor circuit was then assembled.
All eight combinations of A, B and C were applied.
Difference and Borrow outputs were observed.
Output voltages were measured and recorded in Table 7.2.
The observed results were compared with the theoretical truth tables.
20. Result
Write the following:
The 2-input Half Subtractor and 3-input Full Subtractor circuits were successfully implemented and tested using logic gates. The observed Difference and Borrow outputs were found to be according to their respective truth tables.
21. Interpretation of Results
Write the following:
The observed output of the Half Subtractor matched the theoretical truth table. The Difference output was obtained using the XOR operation, and the Borrow output was obtained using NOT A AND B.
The Full Subtractor also produced the expected Difference and Borrow outputs for all eight combinations of A, B and C. Hence, the practical results verify the working of the Half Subtractor and Full Subtractor circuits.
22. Conclusion and Recommendation
Write the following:
The 2-input Half Subtractor and 3-input Full Subtractor circuits were successfully implemented using logic gates.
The Difference and Borrow outputs were observed for all possible input combinations and were compared with the theoretical truth tables.
The practical helped us understand the working of binary subtractor circuits.
It is recommended to check the ICs, power supply, breadboard connections and input combinations carefully before taking observations.
23. Practical Related Question 1
Draw Half Subtractor using NAND gate only.
Answer
The Half Subtractor has two outputs:
Difference:
D = A XOR B
Borrow:
Bo = A'.B
The XOR operation can be made using NAND gates.
Use the following connections:
NAND Gate 1
X = A NAND B
NAND Gate 2
Y = A NAND X
NAND Gate 3
Z = B NAND X
NAND Gate 4
D = Y NAND Z
Therefore:
D = A XOR B
For Borrow:
NAND Gate 5
A' = A NAND A
NAND Gate 6
X = A' NAND B
NAND Gate 7
Bo = X NAND X
Therefore:
Bo = A'.B
Final equations
D = A XOR B
Bo = A'.B
24. Practical Related Question 2
Design Half Subtractor using K-map.
Step 1: Write the Truth Table
| A | B | D | Bo |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 1 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 0 |
Step 2: Difference
Difference is 1 for:
A = 0, B = 1
A = 1, B = 0
Therefore:
D = A'.B + A.B'
This is the same as:
D = A XOR B
Final answer:
D = A XOR B
Step 3: Borrow
Borrow is 1 only when:
A = 0 and B = 1
Therefore:
Bo = A'.B
Final answer:
Bo = A'.B
25. Practical Related Question 3
Draw a Full Subtractor using Half Subtractor circuits.
A Full Subtractor can be constructed using:
2 Half Subtractors
1 OR gate
First Half Subtractor
Inputs:
A and B
Outputs:
D1 = A XOR B
B1 = A'.B
Second Half Subtractor
Inputs:
D1 and C
Outputs:
D = D1 XOR C
Therefore:
D = A XOR B XOR C
The borrow outputs are connected to an OR gate.
Bo = B1 + B2
After simplification:
Bo = A'.B + A'.C + B.C
Simple Block Diagram
A
│
│
▼
┌─────────────┐
B ─► HALF │
│ SUBTRACTOR │
└──────┬──────┘
│
D1
│
▼
┌─────────────┐
C ─► HALF │
│ SUBTRACTOR │
└──────┬──────┘
│
▼
DIFFERENCE
Borrow B1 ──────┐
│
▼
┌────┐
Borrow B2 ───►│ OR │───► BORROW
└────┘
26. Important Viva Questions and Answers
Q1. What is a Half Subtractor?
A Half Subtractor is a combinational logic circuit used to subtract two binary bits.
Q2. What are the inputs of a Half Subtractor?
The inputs are:
A and B
Q3. What are the outputs of a Half Subtractor?
The outputs are:
Difference (D) and Borrow (Bo).
Q4. What is the Difference equation of a Half Subtractor?
D = A XOR B
Q5. What is the Borrow equation of a Half Subtractor?
Bo = A'.B
Q6. What is a Full Subtractor?
A Full Subtractor is a combinational logic circuit used to subtract three binary inputs.
Q7. What are the inputs of a Full Subtractor?
The inputs are:
A, B and C
Here, C is Borrow-in.
Q8. What are the outputs of a Full Subtractor?
The outputs are:
Difference (D) and Borrow (Bo).
Q9. What is the Difference equation of a Full Subtractor?
D = A XOR B XOR C
Q10. What is the Borrow equation of a Full Subtractor?
Bo = A'.B + A'.C + B.C
Q11. How many input combinations are possible in a Half Subtractor?
There are 2 inputs.
Therefore:
2² = 4 combinations
Q12. How many input combinations are possible in a Full Subtractor?
There are 3 inputs.
Therefore:
2³ = 8 combinations
Q13. Which gate is mainly used for Difference?
XOR gate
Q14. Why is Borrow generated when A = 0 and B = 1?
Because 0 cannot directly subtract 1, so a borrow is required.
Q15. Can a Half Subtractor accept Borrow-in?
No.
A Half Subtractor has only two inputs.
A Full Subtractor is used when Borrow-in is present.
27. Half Subtractor vs Full Subtractor
| Feature | Half Subtractor | Full Subtractor |
|---|---|---|
| Number of inputs | 2 | 3 |
| Inputs | A, B | A, B, C |
| Borrow-in | No | Yes |
| Outputs | Difference, Borrow | Difference, Borrow |
| Number of combinations | 4 | 8 |
| Difference | A XOR B | A XOR B XOR C |
| Borrow | A'.B | A'.B + A'.C + B.C |
28. References / Further Reading
Digital Techniques Laboratory Manual – Course Code 313303
MSBTE Digital Techniques – Course 313303
Digital Logic and Computer Design – M. Morris Mano
Digital Electronics – R. P. Jain
74-Series Logic IC Datasheets
29. Quick Revision
Students should remember only these four important expressions:
Half Subtractor
Difference:
D = A XOR B
Borrow:
Bo = A'.B
Full Subtractor
Difference:
D = A XOR B XOR C
Borrow:
Bo = A'.B + A'.C + B.C
⭐ Easy Memory Trick
Half Subtractor
2 Inputs → A, B
No Borrow-in
D = A XOR B
Bo = A'.B
Full Subtractor
3 Inputs → A, B, C
C = Borrow-in
D = A XOR B XOR C
Bo = A'.B + A'.C + B.C
30. Observation Table – What Students Must Remember
For Half Subtractor
There are 4 combinations:
00, 01, 10, 11
For Full Subtractor
There are 8 combinations:
000, 001, 010, 011, 100, 101, 110, 111
For every combination, record:
Difference Logic Level
Difference Voltage
Borrow Logic Level
Borrow Voltage
Important
The 0 and 1 values can be filled from the truth table.
The voltage values must be taken from the Digital Multimeter during the actual practical.
31. Final Practical Record Checklist
Before submitting the practical record, check that you have completed:
Practical Significance
Learning Outcomes
Theoretical Background
Important Boolean expressions
Circuit Diagram
Resources Required
Precautions
Procedure
Actual Procedure
Half Subtractor Observation Table
Full Subtractor Observation Table
Result
Interpretation of Results
Conclusion and Recommendation
Answers to all 3 Practical Related Questions
Viva Questions and Answers
References
Teacher's Signature
⭐ Final Takeaway
A Subtractor is a digital circuit used for binary subtraction.
Half Subtractor
2 Inputs → A, B
2 Outputs → Difference, Borrow
D = A XOR B
Bo = A'.B
Full Subtractor
3 Inputs → A, B, C
C = Borrow-in
2 Outputs → Difference, Borrow
D = A XOR B XOR C
Bo = A'.B + A'.C + B.C
For students: First understand the truth table. Then learn the equations. Do not try to memorize the equations without understanding what Difference and Borrow mean.