The project adds two 4-bit numbers and outputs a 5-bit number as the result.
Inputs A0, A1, A2, and A3 are the bits for the first number to be added. A0 is the LSB. Same logic for the B input. The S0, S1, S2 and S3 output are the first 4 bits of the result with the 5th bit named C_OUT since its the carry-out.
I used LED's for the output and switches for the inputs.
# | Input | Output | Bidirectional |
---|---|---|---|
0 | A0 | S0 | |
1 | A1 | S1 | |
2 | A2 | S2 | |
3 | A3 | S3 | |
4 | B0 | C_OUT | |
5 | B1 | ||
6 | B2 | ||
7 | B3 |