
The halfadder uses simple logic gates.
Input bits 0-3 are used for the first number and bits 4-7 for the second number. The output bits 0-3 are the resulting number an bit 4 the carry. All numbers should be in little endian format.
| # | Input | Output | 
|---|---|---|
| 0 | a0 | r0 | 
| 1 | a1 | r1 | 
| 2 | a2 | r2 | 
| 3 | a3 | r3 | 
| 4 | b0 | carry | 
| 5 | b1 | |
| 6 | b2 | |
| 7 | b3 |