Skip to content

Number Base Converter

Convert between binary, hex, decimal, and octal

Quick:

Quick Reference

DecimalBinaryHexOctalUse
0000000Zero/false
1000111One/true
101010A12Newline (LF)
12711111117F177Max signed byte
25511111111FF377Max byte
2561000000001004001 byte + 1
10241000000000040020001 KB
655351111111111111111FFFF177777Max 16-bit

Why Computers Use Binary

Computers use binary (base 2) because digital circuits have two stable states: on and off, high voltage and low voltage, 1 and 0. Every piece of data in a computer — text, images, video, programs — is ultimately stored and processed as sequences of ones and zeros. A single binary digit (bit) stores one of two values. Eight bits make a byte, which can represent 256 values (2^8) — enough for every ASCII character, or a single pixel's red, green, or blue channel.

Hexadecimal (base 16) exists as a shorthand for binary. Every hex digit maps to exactly 4 binary digits: F = 1111, A = 1010, 0 = 0000. This means a byte (8 bits) can be written as exactly 2 hex digits: 11111111 = FF, 10101010 = AA. Reading "FF" is much faster than reading "11111111," which is why programmers, network engineers, and web developers use hex for everything from color codes (#FF5733) to MAC addresses (AA:BB:CC:DD:EE:FF) to memory addresses.

Practical Uses

Web colors: #FF5733 is three hex bytes — FF red (255), 57 green (87), 33 blue (51). Subnet masks: 255.255.255.0 in binary is 11111111.11111111.11111111.00000000 — the boundary between network and host portions. File permissions in Unix: 755 is three octal digits — 7 (rwx for owner), 5 (r-x for group), 5 (r-x for others). Understanding number bases turns these from magic numbers into readable, meaningful values.

How do I read binary?

Each position is a power of 2, right to left: 1, 2, 4, 8, 16, 32, 64, 128. To read 10110: 16+4+2 = 22. To convert 42 to binary: 32+8+2 = 101010. With practice, common values become instant: 1111 = 15, 11111111 = 255, 10000000 = 128.

🐛 Report a Calculator Error
Found a bug or outdated data? Reports go directly to Kevin and are reviewed personally.