A binary calculator converts everyday decimal numbers into the 1s and 0s that computers use, and it can add, subtract, and convert them back again. It's a handy tool for computer science students, programmers, and anyone curious about how digital devices store numbers.
This guide shows you how binary works, how to convert by hand step by step, and the shortcuts that make conversions fast enough to do in your head.
What Is Binary?
Binary is a number system with only two digits: 0 and 1. It's called base 2, while our everyday system is base 10 (decimal).
Computers use binary because electronic circuits have two clear states: on (1) and off (0). Every number, letter, image, and sound on your device is ultimately stored as binary.
Binary Place Values
In decimal, each place is worth 10 times the one to its right: ones, tens, hundreds. In binary, each place is worth 2 times the one to its right:
| Place | 2⁷ | 2⁶ | 2⁵ | 2⁴ | 2³ | 2² | 2¹ | 2⁰ |
|---|---|---|---|---|---|---|---|---|
| Value | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
A binary calculator uses these place values for every conversion.
How to Convert Decimal to Binary
Method 1: Divide by 2
Keep dividing by 2 and record the remainders.
Example: Convert 45 to binary
| Division | Quotient | Remainder |
|---|---|---|
| 45 ÷ 2 | 22 | 1 |
| 22 ÷ 2 | 11 | 0 |
| 11 ÷ 2 | 5 | 1 |
| 5 ÷ 2 | 2 | 1 |
| 2 ÷ 2 | 1 | 0 |
| 1 ÷ 2 | 0 | 1 |
Read the remainders from bottom to top: 101101.
Method 2: Subtract Powers of 2
Find the largest power of 2 that fits, subtract it, and repeat.
Example: Convert 156 to binary
- 128 fits → 156 − 128 = 28 → put 1 in the 128 place
- 64 doesn't fit → 0
- 32 doesn't fit → 0
- 16 fits → 28 − 16 = 12 → 1
- 8 fits → 12 − 8 = 4 → 1
- 4 fits → 4 − 4 = 0 → 1
- 2 → 0, 1 → 0
Result: 10011100
Pro tip: Method 2 is often faster for numbers under 256 once you memorize the powers of 2. Method 1 is more reliable for large numbers.
How to Convert Binary to Decimal
Multiply each digit by its place value and add.
Example: 101101
- 1 × 32 = 32
- 0 × 16 = 0
- 1 × 8 = 8
- 1 × 4 = 4
- 0 × 2 = 0
- 1 × 1 = 1
Total: 32 + 8 + 4 + 1 = 45
A binary calculator does this instantly, but practicing by hand makes you much quicker at spotting errors.
Binary Addition
Binary addition follows four simple rules:
- 0 + 0 = 0
- 0 + 1 = 1
- 1 + 1 = 10 (write 0, carry 1)
- 1 + 1 + 1 = 11 (write 1, carry 1)
Example: 1011 + 0110
Working right to left:
- 1 + 0 = 1
- 1 + 1 = 0, carry 1
- 0 + 1 + 1 = 0, carry 1
- 1 + 0 + 1 = 0, carry 1
- Bring down the carry: 1
Result: 10001. Check in decimal: 11 + 6 = 17. ✔
Negative Numbers: Two's Complement
Computers usually store negative integers using two's complement. To write −5 in 8 bits:
- Write 5 in binary: 00000101
- Flip every bit: 11111010
- Add 1: 11111011
Many binary calculator tools include a signed mode that does this automatically. In 8-bit two's complement, the range is −128 to 127.
Bits, Bytes, and Ranges
- A bit is one binary digit.
- A byte is 8 bits.
- With n bits, you can store 2ⁿ different values.
| Bits | Unsigned Range |
|---|---|
| 4 | 0–15 |
| 8 | 0–255 |
| 16 | 0–65,535 |
This is why color values on screens often run from 0 to 255: each color channel uses one byte.
The Unique Value Section: The 4-Bit Hex Shortcut
Here's a trick programmers use constantly. Every 4 binary digits match exactly one hexadecimal digit (0–9 and A–F). So you can convert long binary numbers by splitting them into groups of four from the right.
Example: 10011100
- Split: 1001 | 1100
- 1001 = 9, 1100 = 12 = C
- Result: 0x9C
And 0x9C = 9 × 16 + 12 = 156, matching our earlier conversion.
Memorize These 16 Patterns
| Binary | Hex | Binary | Hex |
|---|---|---|---|
| 0000 | 0 | 1000 | 8 |
| 0001 | 1 | 1001 | 9 |
| 0010 | 2 | 1010 | A |
| 0011 | 3 | 1011 | B |
| 0100 | 4 | 1100 | C |
| 0101 | 5 | 1101 | D |
| 0110 | 6 | 1110 | E |
| 0111 | 7 | 1111 | F |
Once these feel familiar, you can read long binary strings faster than you can type them into a binary calculator.
Common Mistakes
- Reading remainders top to bottom instead of bottom to top
- Skipping zero places in the subtraction method
- Forgetting the carry in binary addition
- Mixing signed and unsigned interpretations of the same bits
Practice Problems With Answers
Try these by hand, then confirm with a binary calculator:
- 19 to binary → 16 + 2 + 1 → 10011
- 100 to binary → 64 + 32 + 4 → 1100100
- 11010 to decimal → 16 + 8 + 2 → 26
- 111 + 101 → 7 + 5 = 12 → 1100
- 11101110 to hex → 1110 | 1110 → EE
Notice how the subtraction method makes problems 1 and 2 fast once you know the powers of 2, and how the 4-bit grouping trick turns problem 5 into a simple lookup. Regular practice with small numbers like these builds the speed you need for larger ones.
Expert Tip and Final Takeaway
A binary calculator is fast and accurate, but understanding place values, the divide-by-2 method, and the 4-bit hex shortcut makes you confident with any number system.
Expert tip: Memorize the powers of 2 up to 2¹⁰ (1,024). With those in your head, you can convert most everyday numbers mentally and instantly check any calculator output.