Hexadecimal in Everyday Computing: Colors, MAC Addresses and Bytes
By Jagaveeran · Published November 20, 2026 · 2 min read
Hexadecimal looks intimidating, but you probably meet it every day without noticing: in web colors, in device addresses and in error codes. This guide explains why computers favor base 16 and how to read it by hand.
Why base 16?
Computers store data in bits, and a byte is eight bits. One hexadecimal digit represents exactly four bits, so a byte is always exactly two hex digits. That makes hex a compact, readable way to write binary: the byte 11111111 is simply FF. Decimal does not line up with bits this way, which is why 255 is harder to recognize as "all eight bits on".
Hex uses sixteen symbols: 0 to 9 for the values zero to nine, and A to F for ten to fifteen. Prefixes such as 0x (as in 0xFF) or # (in CSS colors) only signal that the number is hexadecimal.
| Decimal | Hex | Binary |
|---|---|---|
| 10 | A | 1010 |
| 15 | F | 1111 |
| 16 | 10 | 10000 |
| 255 | FF | 11111111 |
| 256 | 100 | 100000000 |
| 4095 | FFF | 111111111111 |
| 65535 | FFFF | 1111111111111111 |
Reading a web color
A CSS color such as #FF5733 is three bytes: red, green and blue. Split it into FF, 57 and 33. In decimal, FF is 255, 57 is 5 × 16 + 7 = 87, and 33 is 3 × 16 + 3 = 51. So #FF5733 is rgb(255, 87, 51): full red, a little green and less blue, which gives a reddish orange.
#000000 is black and #FFFFFF is white. Any color with equal red, green and blue values, such as #808080, is a shade of gray.
Converting by hand
To convert hex to decimal, multiply each digit by a power of 16, starting from the right. For 0x1F4: 1 × 256 + 15 × 16 + 4 × 1 = 256 + 240 + 4 = 500.
To go the other way, divide by 16 repeatedly and read the remainders from bottom to top. For 500: 500 ÷ 16 = 31 remainder 4; 31 ÷ 16 = 1 remainder 15 (F); 1 ÷ 16 = 0 remainder 1. Reading upward gives 1, F, 4, so 500 is 0x1F4.
Other places you will see hex
- MAC addresses: a network card address such as 00:1A:2B:3C:4D:5E is six bytes written as twelve hex digits.
- IPv6 addresses: written as eight groups of four hex digits, for example 2001:0db8:85a3:0000:0000:8a2e:0370:7334.
- Unicode: the letter é has the code point U+00E9, which is 233 in decimal.
- Debuggers and memory dumps usually print values in hex because it maps cleanly onto bytes.
Common mistakes
- Thinking letter case matters. 0xff and 0xFF are the same value.
- Misreading shorthand colors. #0F0 expands to #00FF00 (each digit is doubled), not #0F0000.
- Reading a hex number that contains only digits as decimal. 0x10 is 16, not ten.
Try it yourself
- Decimal to Hex Converter →Convert decimal numbers to hexadecimal instantly, including very large and negative numbers.
- Hex to Decimal Converter →Convert hexadecimal numbers to decimal instantly, with an optional 0x prefix and large number support.
- Binary to ASCII Converter →Convert binary numbers into readable text using ASCII and UTF-8.