Add Binary Numbers
Add two binary numbers instantly with step-by-step carry visualization, decimal conversion, and full-adder logic breakdown.
About
Binary addition is the foundational arithmetic operation of every digital processor. Errors in manual binary computation propagate exponentially: a single misplaced carry bit in a 32-bit word corrupts the entire result. This tool computes the sum of two unsigned binary integers up to 64 bits using full-adder logic - the same S = A ⊕ B ⊕ Cin circuit equation implemented in hardware ALUs. It displays every intermediate carry bit so you can trace propagation column by column, exactly as you would on paper but without the transcription mistakes.
The calculator assumes unsigned (non-negative) integers in pure base-2 positional notation. Leading zeros are tolerated but stripped from output. Results exceeding 64 bits (overflow beyond 264 − 1) are still computed correctly but lose JavaScript integer precision above 253 − 1 for the decimal readout due to IEEE 754 double-precision limits.
Formulas
The full-adder computes a single-bit sum and carry-out from two input bits and a carry-in:
Where A and B are the input bits at position i, Cin is the carry from position i − 1, S is the sum bit written at position i, and Cout is the carry forwarded to position i + 1. The symbol ⊕ denotes XOR (exclusive OR), ∧ denotes AND, and ∨ denotes OR.
Decimal conversion from binary uses positional weighting:
Where bi is the bit value (0 or 1) at position i counted from the right (LSB = 0), and n is the total number of bits.
Reference Data
| Bit Width | Max Unsigned Value (Decimal) | Max Binary | Common Use |
|---|---|---|---|
| 4-bit (Nibble) | 15 | 1111 | Single hex digit, BCD |
| 8-bit (Byte) | 255 | 11111111 | ASCII, pixel channels |
| 12-bit | 4095 | 111111111111 | ADC resolution |
| 16-bit (Word) | 65,535 | 1111111111111111 | Unicode BMP, ports |
| 20-bit | 1,048,575 | 11111111111111111111 | Real-mode addressing |
| 24-bit | 16,777,215 | 111111111111111111111111 | RGB color, audio |
| 32-bit (DWord) | 4,294,967,295 | 32 ones | IPv4, float32, ARM |
| 48-bit | 281,474,976,710,655 | 48 ones | MAC addresses |
| 53-bit | 9,007,199,254,740,991 | 53 ones | JS safe integer limit |
| 64-bit (QWord) | 18,446,744,073,709,551,615 | 64 ones | x86-64, uint64 |
| 128-bit | 3.4 × 1038 | 128 ones | IPv6, UUID, AES |
| 256-bit | 1.16 × 1077 | 256 ones | SHA-256, elliptic curves |
| Binary Addition Rules (Single-Bit) | |||
| 0 + 0 | 0 | carry 0 | No carry produced |
| 0 + 1 | 1 | carry 0 | No carry produced |
| 1 + 0 | 1 | carry 0 | No carry produced |
| 1 + 1 | 0 | carry 1 | Carry propagates left |
| 1 + 1 + 1 | 1 | carry 1 | Full adder with carry-in |