● COMPUTER SCIENCE · BASE-2Binary
Binary
Calculator
Add, subtract, multiply, and divide binary numbers. Convert between binary, decimal, hex, and octal instantly with a built-in reference table.
Base 2
Binary
Base 10
Decimal
Base 16
Hex
Binary Arithmetic
$ 1101 + 1010 = 10111 (binary) = 23 (decimal)
📋 Binary Reference Table (0–31)
| Dec | Binary | Hex | Oct | Dec | Binary | Hex | Oct |
|---|---|---|---|---|---|---|---|
| 0 | 00000 | 0 | 0 | 1 | 00001 | 1 | 1 |
| 2 | 00010 | 2 | 2 | 3 | 00011 | 3 | 3 |
| 4 | 00100 | 4 | 4 | 5 | 00101 | 5 | 5 |
| 6 | 00110 | 6 | 6 | 7 | 00111 | 7 | 7 |
| 8 | 01000 | 8 | 10 | 9 | 01001 | 9 | 11 |
| 10 | 01010 | A | 12 | 11 | 01011 | B | 13 |
| 12 | 01100 | C | 14 | 13 | 01101 | D | 15 |
| 14 | 01110 | E | 16 | 15 | 01111 | F | 17 |
| 16 | 10000 | 10 | 20 | 17 | 10001 | 11 | 21 |
| 18 | 10010 | 12 | 22 | 19 | 10011 | 13 | 23 |
| 20 | 10100 | 14 | 24 | 21 | 10101 | 15 | 25 |
| 22 | 10110 | 16 | 26 | 23 | 10111 | 17 | 27 |
| 24 | 11000 | 18 | 30 | 25 | 11001 | 19 | 31 |
| 26 | 11010 | 1A | 32 | 27 | 11011 | 1B | 33 |
| 28 | 11100 | 1C | 34 | 29 | 11101 | 1D | 35 |
| 30 | 11110 | 1E | 36 | 31 | 11111 | 1F | 37 |
How Binary Numbers Work
Binary is a base-2 number system that represents every value using only two digits, 0 and 1, called bits. It is the foundation of digital computing because a transistor is simplest to build as a two-state switch — on or off — so every number, letter, image, and instruction a computer handles is ultimately stored as a string of these two symbols.
Place Value Example — Binary 1101
| Bit | Position (2ⁿ) | Place Value | Contributes |
|---|---|---|---|
| 1 | 2³ | 8 | 1 × 8 = 8 |
| 1 | 2² | 4 | 1 × 4 = 4 |
| 0 | 2¹ | 2 | 0 × 2 = 0 |
| 1 | 2⁰ | 1 | 1 × 1 = 1 |
Total: 8 + 4 + 0 + 1 = 13 → so binary 1101 equals decimal 13.
Conversion Method
Binary → Decimal: multiply each bit by its power of 2, then sum the resultsDecimal → Binary: divide by 2 repeatedly, record each remainder, read them bottom-to-topBinary → Hex: group bits into sets of 4 from the right, convert each group to one hex digitBinary → Octal: group bits into sets of 3 from the right, convert each group to one octal digit— FAQ