## Adders and Subtractors

### Objective:

To study binary adders and subtractors

### Binary Adders:

- Functionally a full-adder has three inputs and two outputs. A and B are the two binary bits to be added and C
_{in}is the carry from the previous position. S is the sum bit and C_{out}is the carry bit to the next position. Derive the truth table. Using NAND gates, design and implement a full-adder. Demonstrate the circuit to your instructor.

Figure 1 - Full-Adder - The 7483 is a 4-bit binary adder, i.e., four full-adders. Similar to your design. Verify its operation.

### Binary Subtractor:

- Using NAND gates design and implement a full binary subtractor. A is the minuend bit, B is the subtrahend and D is the difference bit. B
_{in}is the borrow from the previous position and B_{out}is the borrow to the next position. Let the instructor verify your circuit.

Figure 2 - Full Subtractor - The 7483 chip (with some external logic circuits) can be used as a four bit subtractor. Design and draw the wiring diagram for a four-bit subtractor using a 7483. Wire up your circuit and verify its operation. Let the instructor verify your circuit.
- Normally the arithmetic unit of a computer has both adders and subtractors. Design and implement a four-bit adder and subtractor unit using a 7483 and a 74157 chip. When the control bit is zero, the outputs will be the sum (A+B) and the carry out. When the control bit is one, the outputs will be the difference (A-B) and the borrow out. Let the instructor verify your circuit.

Figure 3 - Adder/Subtractor Circuit