Binary, Decimal and Hexadecimal, Explained for Humans

Binary and hexadecimal have a reputation for being intimidating, but the idea behind them is something you already understand — you just use it without thinking. This guide demystifies number bases: what "base" means, how binary and hex actually work, why computers rely on them, and the everyday places they show up. No advanced maths required.

What "base" even means

The numbers you use every day are "base 10", or decimal. That means you have ten digits (0–9), and when you run out, you add a new column. The number 254 really means (2 × 100) + (5 × 10) + (4 × 1). Each column is worth ten times the one to its right. There's nothing sacred about ten — we use it mostly because we have ten fingers. A "base" is simply how many digits you have before you need a new column.

Binary: base 2, the language of computers

Binary has just two digits: 0 and 1. Each column is worth twice the one to its right — 1, 2, 4, 8, 16, and so on. So the binary number 1011 means (1×8) + (0×4) + (1×2) + (1×1) = 11 in decimal. That's it; it's the same column idea, just with two digits instead of ten.

Why do computers use it? Because at the physical level a computer is made of billions of tiny switches, and a switch has two states: on or off. Representing those as 1 and 0 maps perfectly onto binary. Everything a computer does — numbers, text, images, sound — is ultimately stored as long strings of these two digits. A single binary digit is called a bit, and eight bits make a byte, which can represent 256 different values (from 0 to 255). That "256" turns up everywhere once you know to look for it.

Hexadecimal: base 16, binary's convenient shorthand

Binary is perfect for machines but painful for humans — the numbers get long fast. The byte for 255 is 11111111, and nobody wants to read pages of that. Hexadecimal solves this. It's base 16, so it needs sixteen digits: 0–9 for the first ten, then A, B, C, D, E, F for ten through fifteen. So F means 15, and 10 in hex means sixteen.

The magic is that one hex digit corresponds exactly to four binary digits. That means a byte (8 bits) is always exactly two hex digits. The unwieldy 11111111 becomes a tidy FF. This clean mapping is why programmers use hex constantly as a compact, human-friendly stand-in for binary.

Where you'll actually meet these

You run into number bases far more often than you'd guess:

Converting between them

You rarely need to convert bases by hand, but knowing it's possible — and reversible — takes the fear out of it. Every whole number has an exact representation in every base; they're just different ways of writing the same value. Decimal 255, binary 11111111, and hex FF are the identical quantity. When you need to switch, our number base converter does it live: type into any base and the others update, so you can build intuition by watching how a value looks across binary, octal, decimal and hex.

A small mental model

If you remember one thing, make it this: a base is just "how many digits before you add a column", and every base describes the same numbers differently. Binary is what the hardware speaks, hexadecimal is the readable shorthand for binary, and decimal is what humans find natural. They're three views of one underlying thing, and moving between them is always exact.

A note on octal, the forgotten base

You'll occasionally meet a fourth base: octal, or base 8, which uses digits 0–7. It's less common today but still shows up in one famous place — file permissions on Unix and Linux systems, where a value like 755 is octal. Octal exists for the same reason as hex: it groups binary neatly, three bits per octal digit. Hex won out for most uses because it maps to bytes so cleanly (two digits per byte), but octal lingers where its three-bit grouping fits the problem. The broader point is that bases aren't rivals; each is chosen because its grouping happens to line up with the thing being described. Once you see a base as "a convenient way to group bits," the whole topic stops feeling arbitrary.

Key takeaways

Advertisement

Tools mentioned in this guide

Base64 Encoder & Decoder

Encode text to Base64 or decode it back instantly.

Developer Tools

Color Converter

Convert colors between HEX, RGB and HSL instantly.

Color Tools

Number Base ConverterNEW

Convert between binary, octal, decimal and hexadecimal live.

Developer Tools