Experiment No. : 03
Aim of The Experiment: –
i. Design, construction and verification of Half Adder and Half Subtractor circuit.
ii. Design, construction and verification of Full Adder and Full Subtractor circuit.
iii. Design, construction and verification of 1-bit and 4-bit Magnitude comparator.
Components Required: –
| Sl. No. | Equipment/Component Name | Specification | Quantity |
|---|---|---|---|
| 1 | NOT gate | IC 4069 | 1 no. |
| 2 | AND gate | IC 7408 | 1 no. |
| 3 | OR gate | IC 7432 | 1 no. |
| 4 | XOR gate | IC 7486 | 1 no. |
| 5 | LED | 5 nos. | |
| 6 | Resistor | 330 Ω | 2 nos. |
| 7 | Breadboard | – | 1 no. |
| 8 | DC Power Supply | 5 Volt | 1 no. |
| 9 | Connecting Wires | – | |
| 10 | Slide switch | – | 5 nos. |
Theory : –
- Design, construction and verification of Half Adder and Half Subtractor circuit
Half Adder: It adds two binary digits (A & B) results Sum output (S) and a Carry Output (C).
Truth Table

From table we see that Logic Functions and Logic Diagram will be for SUM & CARRY is S = A⊕B and C = AB

Half Subtractor: It subtracts two binary digits (X & Y) results Difference output (D) & a Borrow Output (B).
Truth Table

From table we see that Logic Functions and Logic Diagram will be for DIFFERENCE & BORROW is D = X⊕Y and B = X’Y
Figure 1. Breadboard connections of two bit half adder and half subtractor
- Design, construction and verification of Full Adder and Full Subtractor circuit.
Full Adder: It adds three binary digits (A, B & Cin). Cin is the carry resulted from the previous addition. It gives a sum Output (S) and a Carry output (Cout).
Truth Table

From table we see that Logic Functions and Logic Diagram will be for SUM & CARRY is
| SUM= A’B’CIN+A’BCIN’+AB’CIN’+ABCIN =CIN (A’B’+AB) + CIN’ (A’B+AB’) =CIN ⊕A⊕B | COUT= A’BCIN+ AB’CIN+ ABCIN’+ ABCIN = CIN (A’B+AB’)+AB = CIN (A⊕B)+AB |

Full Subtractor: It subtracts three binary digits (X, Y & Bin). Bin is the borrow input. It gives a Difference Output (D) and a Borrow output (Bout).
Truth Table

From table we see that Logic Functions and Logic Diagram will be for DIFFERENCE & BORROW is
| DIFFERENCE= X’Y’BIN+X’YBIN’+XY’CIN’+XYBIN =BIN (X’Y’+XY) + BIN’ (X’Y+XY’) =BIN ⊕X⊕Y | BOUT= X’Y’BIN+ X,YBIN’+ X’YBIN+ XYBIN = BIN (X’Y+XY’)+XY = BIN (X⊕Y)’+X’Y |
Figure 2. Breadboard connections of three bit full adder and half subtractor
So, the circuit response like as below
| INPUTS | SUM/ DIFFERENCE RED LED | CARRY OUT GREEN LED | BORROW OUT BLUE LED | ||
| A/X | B/Y | CIN/ BIN | |||
| 0 | 0 | 0 | OFF | OFF | OFF |
| 0 | 0 | 1 | ON | OFF | ON |
| 0 | 1 | 0 | ON | OFF | ON |
| 0 | 1 | 1 | OFF | ON | ON |
| 1 | 0 | 0 | ON | OFF | OFF |
| 1 | 0 | 1 | OFF | ON | OFF |
| 1 | 1 | 0 | OFF | ON | OFF |
| 1 | 1 | 1 | ON | ON | ON |
4-bit magnitude comparator
The 7485 IC is a 4-bit magnitude comparator that compares two 4-bit binary numbers and gives outputs indicating whether one is greater than, equal to, or less than the other.
Also, in the 7485 IC, the term cascading means connecting two or more comparator ICs together so they can compare numbers larger than 4 bits.
A single 7485 can only compare 4-bit numbers (0 to 15).
If want to compare 8-bit numbers (0 to 255) or more, you connect multiple 7485s in series — this is called cascading.
Here are the pin layout:-

According to Word P and Word Q as 4 bit binary inputs the schematic functional diagram/ logic symbol represented as in shape of IC layout-

If we create the truth table in binary form, there will be 8 variables and the table will require 256 rows. So, it is complex one.
Now,
Step-by-step procedure- for connecting a 7485 IC as a 4-bit magnitude comparator:
| 1. Connect the power supply Pin 16 → +5V (Vcc) Pin 8 → Ground (GND) | 4. Set cascade inputs for single IC use A > B in (pin 4) → GND (logic 0) A = B in (pin 3) → Vcc (logic 1) A < B in (pin 2) → GND (logic 0) |
| 2. Identify & Connect the A inputs (A3–A0): Apply the first 4-bit binary number to pins 15, 13, 12, 10 respectively. Identify & Connect the B inputs (B3–B0): Apply the second 4-bit binary number to pins 1, 14, 11, 9 respectively. | 5. Read the outputs A > B out → HIGH if A is greater than B A = B out → HIGH if A equals B A < B out → HIGH if A is less than B |
| 3. Take outputs from pins A > B out (pin 5) A = B out (pin 6) A < B out (pin 7) |
This is the circuit connection sketch
