Base Converter guide

What Is Hexadecimal Used For?

Hexadecimal is used wherever binary needs to be readable by people: CSS colour codes, memory addresses, MAC addresses, error codes and file signatures. It is chosen because one hex digit is exactly four binary digits, so it compresses binary four-to-one without any arithmetic.

The problem hex solves

Computers work in binary, but binary is painful for people to read. A single byte is eight characters of 1s and 0s, and it is very easy to lose your place in the middle of one.

Decimal is readable but does not line up with binary at all — you cannot look at 214 and see anything about its bits.

Hex sits in between. It is compact, it is readable, and because 16 is a power of 2, it maps onto binary exactly. Two hex characters are one byte, always.

Colour codes

The most common place non-programmers meet hex is CSS colours like #FF7F50.

Those six digits are three pairs, one per colour channel: FF red, 7F green, 50 blue. Each pair is one byte, so each channel runs from 00 to FF — 0 to 255.

FF7F50 is full red, a bit over half green, and a little blue. That combination is coral.

The calculator on this page is loaded with FF7F50, so you can see the whole thing as a single decimal number — 16744272 — which is what the computer actually stores.

The short form #FFF is shorthand where each digit is doubled, so it means #FFFFFF, white.

Memory addresses

Anything showing you where something lives in memory uses hex: 0x7FFF5FBFF8C0 and the like.

Hex is used because memory is organised in powers of two, so boundaries land on round hex numbers. An address ending in 000 is aligned to a 4096-byte page, which is instantly visible in hex and invisible in decimal.

If you have ever seen a crash report or a debugger, most of the numbers in it were hex for this reason.

Other places hex turns up

  • MAC addresses — six pairs of hex digits, like 00:1A:2B:3C:4D:5E, identifying a network interface.
  • Error codes — Windows stop codes such as 0x0000007B, where individual bits carry meaning.
  • File signatures — the first few bytes of a file identify its type. A PNG always starts 89 50 4E 47.
  • Unicode code points — written as U+0041 for "A", or U+1F600 for a grinning face.
  • Checksums and hashes — an MD5 or SHA hash is printed as a long string of hex digits.

Why 16 and not some other base

The base needs to be a power of two to line up with binary, so the candidates are 4, 8, 16, 32 and so on.

Base 4 and base 8 are barely more compact than binary. Base 32 would need 32 distinct symbols, which means reaching well into the alphabet and inviting confusion between characters.

Base 16 is the sweet spot: a four-to-one compression, and only six extra symbols needed — A to F, which are unambiguous and easy to say aloud.

It also happens that two hex digits make exactly one byte, and the byte is the unit computers are built around. That alignment is what settled it.

FAQ

Related questions

What is hexadecimal used for?

Colour codes, memory addresses, MAC addresses, error codes, file signatures and hashes — anywhere binary data needs to be readable by people.

Why are colour codes in hex?

Each colour channel is one byte, from 0 to 255, and one byte is exactly two hex digits. So a three-channel colour fits neatly into six hex characters.

What does #FF7F50 mean?

Red at FF (255), green at 7F (127) and blue at 50 (80) — the colour coral. Each pair is one byte.

Why not just use decimal?

Decimal does not line up with binary, so byte boundaries and bit patterns are invisible in it. Hex shows them directly, since every hex digit is exactly four bits.

Take Base Converter with you

The app adds plain-English AI explanations, dark mode, and works offline — useful when there is no signal or the exam hall has no Wi-Fi.

Free to download. AI explanations and dark mode are part of the optional PRO subscription.