Binary Calculator

Convert and calculate with binary numbers.

Number System Converter

Enter a whole number (0-999999)

Number System Reference

Binary (Base 2): Uses digits 0, 1
Octal (Base 8): Uses digits 0-7
Decimal (Base 10): Uses digits 0-9
Hexadecimal (Base 16): Uses 0-9, A-F

Decimal

42

Base 10

Binary

101010

Base 2

Octal

52

Base 8

Hexadecimal

2A

Base 16

Binary Details

8-bit:00101010
16-bit:0000000000101010
Formatted:1010 10

Common Conversions

Dec
Bin
Oct
Hex
0
0
0
0
1
1
1
1
2
10
2
2
3
11
3
3
4
100
4
4
5
101
5
5
6
110
6
6
7
111
7
7
8
1000
10
8
9
1001
11
9
10
1010
12
A
15
1111
17
F

How it works

Binary is base-2: every digit is a power of two, using only 0 and 1. This calculator converts between binary and decimal and does binary arithmetic. To read a binary number, add up the place values where there's a 1.

Binary to decimal

Decimal = Σ (digit × 2^position)   counting positions from 0 on the right
digit
0 or 1
2^position
place value (1, 2, 4, 8, 16, …)

Worked example

  • Convert binary 1011 to decimal
  1. 1×8 + 0×4 + 1×2 + 1×1

1011₂ = 11 in decimal.

Good to know

  • Each binary digit is a 'bit'; eight bits make a byte (values 0–255).
  • Binary is how computers store everything — text, numbers, and images all reduce to bits.
  • Adding in binary carries at 2 (1 + 1 = 10), just as decimal carries at 10.

Related Calculators

Frequently Asked Questions

What is binary?

Binary is base-2 numbering using only 0 and 1 — the fundamental language of computers, where each digit (bit) represents an on/off state. Every place value is a power of two: 1, 2, 4, 8, 16, and so on.

How do I convert decimal to binary?

Repeatedly divide by 2 and record the remainders, then read them from bottom to top. For 13: 13÷2=6 r1, 6÷2=3 r0, 3÷2=1 r1, 1÷2=0 r1 — so 13 is 1101 in binary.

How do I add binary numbers?

Column by column, just like decimal, except you carry at 2 instead of 10: 1 + 1 = 10 (write 0, carry 1). For example, 1011 + 0110 = 10001, which is 11 + 6 = 17 in decimal.

What are bitwise operations?

Operations applied to individual bits: AND (&), OR (|), XOR (^), NOT (~), and shifts (<<, >>). They are essential in low-level programming for flags, masks, and fast arithmetic — a left shift by one doubles a number.

What are bits, bytes, and hexadecimal?

A bit is one binary digit; eight bits make a byte, which holds values 0-255. Hexadecimal (base-16) is shorthand for binary — each hex digit encodes exactly four bits, so a byte is two hex digits, like FF for 11111111.