32 Bit Full Adder: Purpose
32 Bit Full Adder: Purpose
Purpose
Learn how addition can be performed using logical gates. Learn to implement combinational logic
circuits. Learn how to reduce logical expressions using a Karnaugh map.
Method
Complete the circuit for a 32-bit adder and verify it's operation using the simulator Logisim. If you
work on the department Unix system, Logisim is allready installed.
Preparation
You should have done the exercise Introduction to Digital Logic before you continute with this
assignment. Read Appendix B in the textbook.
File to Use
add.circ
What to Hand In
Completed file add.circ
Introduction
https://pingpong.uu.se/pp/courses/course05639/published/1256630881283/resourceId/83... 10/27/2009
Page 2 of 5
Now, look at all cases (rows) for which the sum output (S) is 1. Do you notice anything special? All rows
for which the sum (S) is 1 have an odd number of enabled inputs. This means only one or all of the inputs
x,y or Cin can be 1 for S to be 1. This is exactly the XOR function.
Step 0
Step 1
, is not a minimal expression. Show step by step how you can reduce the expression for Cout to end up
with:
Step 2
z Start Logisim. On the department Unix System, type logisim in a shell and press enter. If you work on
a laptop or form home, downlad and install Logisim from here.
Open up add.circ in Logisim. Start by double-click on add1 to select the add1 circuit.
https://pingpong.uu.se/pp/courses/course05639/published/1256630881283/resourceId/83... 10/27/2009
Page 3 of 5
Use this circuit to construct your 1-bit full adder. You are free to move the input- and output pins around,
but, don't change their orientations or relative positions.
Sum:
z Start by adding XOR-gates to produce the sum S from the inputs A, B and Cin.
z Use the text tool to add a comment to the circuit giving the equation for the S output.
Cout:
Step 3
z Add three splitters to the circuit. Each splitter should have an input bit width of 8 and a fan out of 8.
Attach two east-facing splitters to the 8-bit inputs A and B. Attach a west-facing splitter to the 8-bit
output S.
z Create eight instances of the add1 circuit.
z Connect the S outputs of the eight add1 instances to the splitter for the 8-bit S output.
z Connect the carry inputs and outputs of the eight add1 instances so that carries will propagate
appropriately from the Ci input, through the 1-bit adders, to the Co output.
z Connect the A inputs of the eight add1 instances to the splitter for the A input.
z Connect the B inputs of the eight add1 instances to the splitter for the B input.
z Change the values of the Ci, A, and B inputs and observe the Co and S outputs to verify the correct
operation of the circuit.
https://pingpong.uu.se/pp/courses/course05639/published/1256630881283/resourceId/83... 10/27/2009
Page 4 of 5
Step 4
z You will find three splitters in the circuit. Each splitter has an input bit width of 32 and a fan out of 4.
Thus, each connection to a splitter represents 8 bits.
z Create four instances of the add8 circuit.
z Connect the 8-bit S outputs of the four add8 instances to the splitter for the 32-bit S output.
z Connect the carry inputs and outputs of the four add8 instances so that carries will propagate
appropriately from the Ci input, through the 8-bit adders, to the Co output.
z Connect the 8-bit A inputs of the four add8 instances to the splitter for the A input.
z Connect the 8-bit B inputs of the four add8 instances to the splitter for the B input.
Step 5
Within the main circuit, you will find a 32-bit adder connected side-by-side with your add32 circuit.
Change the values of the Ci, A, and B inputs and observe the Co and S outputs to verify the correct
operation of your add32 circuit.
Step 6
There is more than one way to implemt a logical function. An alternative expression for Cout can be found
by reducing the expression using only min-terms.
Note: using Karnaugh map to reduce the expression for the Sum will no be possible, it will result in the
original sum-of-products for the Sum.
Add a new circuit to the project named add1_k and implement a new version of a 1 bit full adder using the
new expression for Cout and the original sum-of-producs exreppsions for the Sum
Simlary, add new circuits named add8_k and add32_k to construct an alternate version of the 32 bit full
adder.
Add the add32_k component to the main circuit along with the other adders and verify that they give the
same results.
https://pingpong.uu.se/pp/courses/course05639/published/1256630881283/resourceId/83... 10/27/2009
Page 5 of 5
Kommentar
Stavningskontroll
Skicka
https://pingpong.uu.se/pp/courses/course05639/published/1256630881283/resourceId/83... 10/27/2009