In this assignment, you are to design a two-digit decimal adder, using a binary-coded-decimal representation, and verify the design by simulating it using a popular procedural language such as C or Pascal.
In a binary-coded-decimal (BCD) representation, each decimal digit is represented by four signals, D, D, D, and D. These are interpreted as a binary number, with D being the least significant digit, so that the digit 5 is represented by D=0, D=1, D=0, and D=1. Bit combinations representing values of ten or greater are not valid BCD patterns.
A two-digit decimal number is represented by two sets of four signals: ONES and TENS. A two-digit decimal adder takes two decimal numbers: A-ONES and A-TENS, and B-ONES and B-TENS (16 bits of input in total); it produces a two-digit sum, SUM-ONES and SUM-TENS, and a single CARRY-OUT bit (9 bits total).
The tricky part is to create a decimal adder circuit for a single decimal digit. You can create a circuit directly from the truth table, but there are more straightforward ways. Specifically, you can perform decimal addition of inputs A and B in three steps:
Finally, you have to produce a carry-out from the decimal digit.
All this should be bundled together and submitted not later than September 29. Late assignments are penalized 10% for each weekday late.