Motivation
A computer ultimately adds integers bit by bit in hardware. Even adding two 4-bit numbers raises the central question of digital logic: how is the carry passed from one bit position to the next? Different adder networks answer this with different trade-offs between circuit area, number of clock cycles and propagation delay. This tool contrasts three classic variants — the von Neumann adder, the parallel adder and the serial adder — and shows for each the bit/decimal step table together with the carry/overflow bit .
All three compute the same sum
with . The result may leave the 4-bit range: if an overflow occurs, captured in the fifth bit . The accumulator then holds , and the full value is .
How the three networks work
von Neumann adder
The von Neumann adder separates sum without carry from carry and iterates until no carry remains. At each step, for the current accumulator and buffer :
Here is bitwise XOR (the carry-free sum) and shifts the carries generated at each position one place to the left. As soon as a carry reaches bit position , the overflow bit is set:
The iteration ends when (the column then becomes ). The number of steps depends on how far the carries propagate.
parallel adder
The parallel adder forms the sum in one combinational step (a ripple-carry chain, shown here as a single cycle). The lower four bits land in the accumulator, the fifth bit is the carry-out:
It needs the fewest cycles but the most simultaneous logic.
serial adder
The serial adder uses one full adder that processes one bit per clock — starting from the least-significant bit (LSB) upward. For the current bits and the carry , the full-adder equations are
The sum bit is shifted into the most-significant bit of the accumulator, while and shift right by one. After four cycles the accumulator holds the sum and is the carry-out. The serial adder needs the least logic but four clock cycles.
Worked example
We add and with the von Neumann adder — the preset of the calculator above.
Since there is no carry: after a single step the buffer is already , the overflow bit stays , and the accumulator holds . Indeed , so it just fits into four bits.
Common pitfalls
- Reading the accumulator without the carry: the accumulator only holds . On overflow you must add bit as the s place, or the carry is missing from the final result.
- Confusing XOR with addition: in the von Neumann step is the carry-free sum — not . The carry lives separately in .
- Wrong bit order in the serial adder: it starts at the LSB and shifts right. Starting at the MSB propagates the carry in the wrong direction.
- Forgetting the carry between cycles: the serial adder carries from cycle to cycle; only then does a correct multi-bit addition emerge.