Binary Adder & Subtractor
A = 3 → 0 0 1 1
B = 5 → 0 1 0 1
Gate network — ripple from LSB (right) to MSB (left)
bit 0
A=0
B'=0
0
x1
C=1
1
S
0
0
0
C_out
bit 1
A=0
B'=1
1
x1
C=1
0
S
0
1
1
C_out
bit 2
A=1
B'=0
1
x1
C=1
0
S
0
1
1
C_out
bit 3
A=1
B'=1
0
x1
C=0
0
S
1
0
1
C_out
Each gate lights up one after another (inputs → x1 → carry → sum → ANDs → OR) with a delay so you can follow the computation.
Result
1
0
0
0
8
4
2
1
- Binary
- 1 0 0 0
- Integer (unsigned)
- 8
- Integer (signed)
- -8
- CARRY/BORROW
- 0
- OVERFLOW
- Yes
Enter two numbers from 1 to 10, choose ADD or SUBTRACT, then click "Run step-by-step". Each operation (XOR, carry, sum, ANDs, OR) appears one at a time with a delay so you can follow how the computer computes the result.