Binary Calculator

Convert between binary (base 2), decimal (base 10), hexadecimal (base 16), and octal (base 8). Enter a value in any field and all others update automatically.

Number Base Converter

Number Base Reference

DecimalBinaryHexOctal
0000000
81000810
101010A12
151111F17
16100001020
25511111111FF377

Frequently Asked Questions

Why do computers use binary?+
Computers use binary because digital circuits have two stable states: on (1) and off (0), represented by high and low voltage. All data — text, images, video — is ultimately stored and processed as sequences of 1s and 0s.
What is hexadecimal used for?+
Hexadecimal (hex) is a compact way to represent binary data. Each hex digit represents exactly 4 binary bits, making it much shorter to write. Common uses include: color codes (#FF5733), memory addresses (0x1A2B), error codes, and MAC addresses.

How binary place values work

Decimal uses powers of ten; binary uses powers of two. Each position doubles as you move left: 1, 2, 4, 8, 16, 32, 64, 128.

Reading 1011 from the right: 1 + 2 + 0 + 8 = 11.

Converting decimal to binary

Divide repeatedly by 2 and read the remainders bottom to top. For 13: 13÷2 = 6 r1, 6÷2 = 3 r0, 3÷2 = 1 r1, 1÷2 = 0 r1 → 1101.

Hexadecimal as shorthand

Hex is base 16, using 0–9 then A–F for 10–15. Its value is that one hex digit maps exactly to four binary digits, so long binary strings compress cleanly.

DecBinHex
810008
101010A
151111F
25511111111FF

This is why colour codes look like #FF8800 — three pairs of hex digits, each a byte from 0 to 255 for red, green and blue.

Why computers use binary

A circuit reliably distinguishes two states — voltage present or absent — far more easily than ten. Everything above that is built on the same two symbols: text through character encodings, images through pixel values, instructions through opcodes.

It also explains why storage sizes cluster on powers of two. 256, 512, 1024 are round numbers in binary even though they look arbitrary in decimal.