Lab1
Lab1
0 0 0
0 1 0
1 0 0
1 1 0
0 0 1
0 1 1
1 0 1
1 1 1
5. Now you’re going to build a 4 bit adder. Before you start, plan it
out. Think about the parts you need (Mr. Google).
Page 2 of 3
Student ID: Full in name:
6. A 4-bit adder sums together two 4-bit binary numbers. Each bit
of each number is repre- sented by a binary on/off pin. So, you
will need two sets of four input pins.
6.1. Layout the pins you need for each input bit.
6.2. While doing this, workout the order of your bits (Big-endian
or Little-endian?). Use labels to indicate the significance of
each bit (i.e., which column, from least significant (20
column) to most significant (23 column).
7. Now start implementing your adder. Use a half-adder to add the
first bits from both binary numbers, and wire up an LED to
represent the output bit. We did this last week so it should now
be straight forward!
8. Now wire-up a full-adders to add all remaining bits. Remember
that a full-adder also adds the carry-in bit from the previous
adder. Use an LED to show the sum output for each col- umn.
Page 3 of 3
Student ID: Full in name:
0101 0000
0101 0001
0101 0010
0101 0011
0101 0100
0101 0101
0101 0110
0101 0111
0101 1000
0101 1001
0101 1010
0101 1011
0101 1100
0101 1101
0101 1110
0101 1111
Page 4 of 3