When do hex fractions end? A decimal fraction terminates in hex exactly when its denominator is a power of 2 — so 0.5 is a crisp 0.8 and 0.75 is 0.C, but one humble 0.1 becomes 0.19, nines forever. It's the same rounding ghost that haunts floating-point arithmetic: computers store 0.1 in base 2, and base 2 can't finish writing it either.
Convert decimal numbers to hexadecimal, including negative numbers and fractions, with exact repeating-digit detection, worked division and multiplication steps, and the bit count of the result.
Where the letters came from: when IBM's System/360 made hexadecimal the lingua franca of computing in 1964, the six extra digits simply borrowed the start of the alphabet — A through F for ten through fifteen. Earlier machines had tried stranger sets: the Bendix G-15 wrote them u, v, w, x, y, z. The alphabet won, and the 0x prefix from the C language later became hex's universal name tag.
Convert hexadecimal to decimal with fractional places, see the exact fraction form, the full positional expansion with powers of sixteen, and the equivalent bit length.
Why programmers do bitwise in hex: each hex digit is exactly one nibble — four bits — so a byte is always two digits and the binary is readable straight through the hex. FF AND A5 keeps only the bits both share; OR keeps any bit either has; XOR keeps the bits where they differ, which is why XORing a value with itself gives zero and XORing twice undoes itself — the trick behind checksums and simple ciphers alike.
Add, subtract, and multiply hexadecimal numbers with carry-by-carry worked columns, and run bitwise AND, OR, and XOR with the binary shown nibble by nibble.
How many digits each base needs for this value — hex is binary compressed fourfold, which is its entire job description.
Each hex digit maps to exactly one 4-bit pattern. Hover or tap any of them.
Hover a nibble to see it every way.
Convert hexadecimal to binary with 4-bit nibble grouping, to octal and decimal, count bits and bytes, and learn the sixteen nibble patterns behind every hex digit.
A hex color is just three bytes standing in a trench coat — one each for red, green, and blue, each running 00 to FF.
Why colors are hex: screens mix light from red, green, and blue subpixels, each with 256 brightness levels — exactly one byte, exactly two hex digits. So a color is three bytes, six digits, and #FFFFFF is all three channels at full blast. The three-digit shorthand works because doubling each digit (#ABC → #AABBCC) lands on a evenly-spaced subset of the full palette.
Decode any hex color code into red, green, and blue channel values, relative luminance, the complementary color, grayscale equivalent, and ready-to-paste CSS rgb() notation.