CS201 Lab: Design Adders & Subtractors
Objectives
<1> implement a halfadder as a device
<2> use this halfadder to create other circuits such as:
fulladders and halfsubtractors
<3> implement a half subtractor as a device
<4> implement a full adder as a device
<5> use the half subtractor and full adder devices to implement a full subtractor
<6> use the full adder device to implement a 4bit parallel adder
Preparation
Lab Assignments

Following the notes in the lab, you should have completed the half adder device.
Use the device (the box) and connect binary probes and switches to ensure that the truth table is correct.
Write the boolean functions for sum and carry beside the circuit
HandIn
 The underlying circuit of the "Half Adder" device. (Circuit with labeled portsPart 1 in the notes)
 Boolean functions for Sum and Carry
 The testing circuit of the "Half Adder" device (the box) with binary switches and binary probes connected to it
 As mentioned in the notes, a full adder can be designed using two "Half Adder" devices and one additional gate.
(Hint c_{i+1}= the sum of the carries out of the two half adders).
Build and test your circuit with the truth table.
Write the boolean functions for sum and the carry beside the circuit.
HandIn
 The full adder circuit using two "Half Adder" devices and one additional gate
 Boolean functions for Sum and Carry for the full adder
 A half subtractor subtracts two bits, x and y producing their difference d.
It also has an output b to specify if a 1 has been borrowed from the next higher position.
The truth table is given below.
Following the steps from the notes, produce the "Half Subtractor" device.
Then, use the device and connect binary switches and binary probes to test the truth table.
Write the boolean function for d and b beside the circuit.
Input 

Output 
x 
y 

b 
d 
0 
0 

0 
0 
0 
1 

1 
1 
1 
0 

0 
1 
1 
1 

0 
0 
HandIn
 The underlying circuit of the "Half Subtractor " device. (Circuit with labeled portsPart 1 in the notes)
 Boolean functions for borrow (b) and difference (d)
 The testing circuit of the "Half Subtractor " device (the box) with binary switches and binary probes connected to it
 Using the property that:
show that a half subtractor can be implemented using a "Half Adder" device and two inverter gates.
Build and test this circuit with the truth table.
Write the expressions of the difference and the borrow beside the circuit.
HandIn
 The half subtractor circuit using the "Half Adder" device and two NOT 's
 Boolean functions for Difference and Borrow (will be slightly different from 3, because of invertersconsider what is going into the box and what is coming out of the box)
 A full subtractor can be built using two "Half Subtractor" devices and an
OR gate.
Design and test a full subtractor (schematic diagram and truth table shown below).
Write the expressions of the difference and the borrow beside the circuit.
Input 

Output 
x 
y 
b_{i} 

b_{i+1} 
d 
0 
0 
0 

0 
0 
0 
0 
1 

1 
1 
0 
1 
0 

1 
1 
0 
1 
1 

1 
0 
1 
0 
0 

0 
1 
1 
0 
1 

0 
0 
1 
1 
0 

0 
0 
1 
1 
1 

1 
1 
HandIn
 The full subtractor circuit using two "Half Subtractor" devices and an OR gate
 Boolean functions for Difference and Borrow
 Show that a full subtractor can be implemented using a "Full Adder" device and two inverter gates.
For this, you will have to create a "Full Adder" device (Note: you can use the idea of what you built in question 2)
Build and test your circuit with the truth table.
Write the expressions of the difference and the borrow beside the circuit.
HandIn
 The underlying circuit of the "Full Adder " device. (Circuit with labeled portsPart 1 in the notes)
 The testing circuit of the "Full Adder" device (the box) with binary switches and binary probes connected to it
 The full subtractor circuit using "Full Adder " device and two NOT gates
 Boolean functions for Difference and Borrow (a little different from question 5 because of the inverters)
 Build a 4bit parallel adder by using four "Full Adder" devices.
For this, you will use the "Full Adder" device that you just built
in the last step.
Build and test your circuit with the examples:
0101 + 0010 = ?
0110 + 0011 = ?
and any other examples of your choice
HandIn
 The 4bit Parallel Adder Circuit using "Full Adder "
devices with the above two examples and another one of your choice.
Inputs are provided with the binary switches
and the outputs will be displayed with the binary probes.
Summary:
At the end of this exercise, you should have:
 Three devices in a library:
 "Half Adder"
 "Half Subtractor"
 "Full Adder
 Seven circuits using the above devices:
 Half Adder
 Full Adder Using Half Adders
 Half Subtractor
 Half Subtractor Using Half Adder
 Full Subtractor Using Half Subtractors
 Full Subtractor Using Full Adder
 4bit Parallel Adder Using Full Adders
 Boolean functions written for the outputs of each of the circuits except
the 4bit parallel adder
Copyright: Department of Computer Science, University of Regina.