Skip to content
Calcuplay
Tech

Number base converter

Type a number and choose its base to see it in binary, decimal, hexadecimal and octal at once. 255 in decimal is 1111 1111 in binary and FF in hexadecimal.

Decimal (base 10)

255

Binary (base 2)

1111 1111

Hexadecimal (base 16)

FF

Octal (base 8)

377

Tap a bit to switch it on or off

Quick challenge

Streak 0Best 0

Test yourself: every answer is computed by the tool, and the wrong choices are the most common traps.

How it works

Formula: 1011₂ = 1×2³ + 0×2² + 1×2¹ + 1×2⁰ = 11

Each digit is worth its value times a power of the base, counted from the right: 1011 in binary is 1×8 + 0×4 + 1×2 + 1×1 = 11. To convert to another base, the number is divided by the new base repeatedly and the remainders are read backwards. Hexadecimal uses the digits 0–9 and the letters A–F (10 to 15); one hex digit stands for exactly four binary digits. The calculator works with whole numbers of any size; prefixes like 0x and 0b are accepted.

Common numbers in binary, octal and hexadecimal

Common numbers in binary, octal and hexadecimal
DecimalBinaryOctalHexadecimal
0000
1111
21022
31133
410044
510155
711177
81000108
10101012A
15111117F
161 00002010
3210 00004020
64100 000010040
100110 010014464
127111 11111777F
1281000 000020080
2551111 1111377FF
2561 0000 0000400100
100011 1110 100017503E8
1024100 0000 00002000400
40961 0000 0000 0000100001000
655351111 1111 1111 1111177777FFFF

Frequently asked questions

How do I convert binary to decimal?

Multiply each digit by 2 raised to its position (starting at 0 on the right) and add: 110101 = 32 + 16 + 4 + 1 = 53.

How do I convert decimal to hexadecimal?

Divide by 16 repeatedly and write the remainders backwards, using A–F for 10–15. 255 = 15 × 16 + 15, so 255 = FF.

Why do programmers use hexadecimal?

Because one hex digit matches exactly four bits, so a byte (8 bits) is always two hex digits: 1111 1111 = FF. It's shorter to read than binary.

Tech calculators

Tech calculators

Related tools

Other calculators