This post is a series of diagrams to show how two 4 bit numbers can be added together. In the 4 bit adder diagram, A and B are added together to get a sum. Number A is a 4 bit number where A = A3, A2, A1, A0. Number B is a 4 bit number where B = B3, B2, B1, B0. The sum is a 4 bit number where Sum = Sum3, Sum2, Sum1, Sum0. The on/off state of each bit is fed into the corresponding half adder or full adder.
In binary numbers, the 0 placeholder equals 1 if on (0 if off), the 1 placeholder equals 2 if on (0 if off), the 2 placeholder equals 4 if on (0 if off), the 3 placeholder equals 8 if on (0 if off). The total of all placeholders added together is the number. For example, the binary number 1101 equals 13: (8 + 4 + 0 + 1 = 13). Another example, the binary number 0110 equals 6: (0 + 4 + 2 + 0 = 6).
For this 4 bit adder, if A = 0101 (5) and B = 0111 (7), then Sum = 1100 (12). Another example, if A = 0100 (4) and B = 1001 (9), then Sum = 1101 (13).
In the diagrams, a dot at an intersection represents a connection. A list of logic gates with inputs and outputs can be found at this link.
License: CC BY-SA 4.0