Developer · 2026-08-25
Every number system you have ever used — decimal, binary, hexadecimal — works on exactly the same underlying idea. Once that idea clicks, converting between them stops being a memorised trick and becomes something you can work out from scratch every time.
Decimal (base 10) uses ten digits, 0 through 9, and each position in a number represents a power of ten: the number present in the tens place is worth ten times more than the same digit in the units place, the hundreds place ten times more again, and so on. There is nothing mathematically special about the number ten — it is simply the base humans standardised on, almost certainly because we have ten fingers.
A number system in base *b* uses *b* digits (0 through *b*−1) and each position is worth a power of *b* instead of a power of 10. Once you see decimal as just "base 10, one option among many" rather than the natural, default way numbers work, every other base becomes far less mysterious.
Binary uses only two digits, 0 and 1, with each position worth a power of two (1, 2, 4, 8, 16...). Computers use binary because transistors — the tiny switches that make up a processor — are most reliably built as two-state devices: on or off, high voltage or low voltage. Building reliable hardware with ten distinct voltage levels (for decimal) is far harder than building it with two, so binary became the physical foundation of essentially all modern computing.
Every piece of data a computer handles — a letter, a colour, a sound, this very sentence — is ultimately stored as a sequence of binary digits (bits). It is inconvenient for humans to read directly, though, which is where hexadecimal comes in.
Hexadecimal uses sixteen digits: 0 through 9, then A through F to represent 10 through 15. It exists purely for human convenience — because 16 is a power of 2 (2⁴), exactly four binary digits map onto exactly one hexadecimal digit, with no remainder or overlap. This makes hex a clean, compact way to write binary values without the visual noise of a long string of 1s and 0s.
This is why you see hexadecimal constantly in software: colour codes like #FF5733 in CSS, memory addresses in debugging tools, and MAC addresses on network hardware. A colour code like #FF5733 is really just three binary values (one each for red, green and blue) written in a form a human can actually read and type without losing their place.
You do not need to do these conversions by hand for real work, but understanding what is actually happening under the hood makes a surprising number of everyday development tasks less mysterious: why a colour picker shows both a hex code and RGB sliders for the same colour, why file sizes sometimes look "odd" in different units, why certain numbers (255, 65535, 4294967295) show up constantly as maximum values in code — they are all one less than a power of two, the largest value that fits in a given number of bits.
UtilityHub's Number Base Converter converts instantly between binary, decimal, hexadecimal and octal, and the Hash Generator and Hex Colour tool are good places to see hexadecimal doing real work.