Hexadecimal Converter

In hexadecimal, that's
7EA
2,026 in decimal — three hex digits where binary needs eleven bits.
Total digits
3
Fraction digits
0
Repeating cycle
Bits it packs
11
Whole part — divide by 16, keep the remainders
Fraction part — multiply by 16, peel off digits

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.

In decimal, that's
2,026.5
7EA.8 read in base 16 — the .8 is eight sixteenths, exactly one half.
Whole part
2,026
As a fraction
4,053/2
Hex digits
4
In binary
12 bits
The positional expansion, written out

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.

Result, in hex
1A4
Decimal check: 255 + 165 = 420.
First, in decimal
255
Second, in decimal
165
Result, in decimal
420
Result in binary
9 bits
Column by column, right to left

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.

In binary, nibble by nibble
1111 1111
FF — two hex digits, one full byte, all bits set.
Decimal
255
Octal
377
Bits
8
Bytes
1
The same number, four alphabets

How many digits each base needs for this value — hex is binary compressed fourfold, which is its entire job description.

The sixteen nibbles — the table every programmer absorbs

Each hex digit maps to exactly one 4-bit pattern. Hover or tap any of them.

Hover a nibble to see it every way.

Your number, digit by digit

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.

#4A90D9
Red
74
Green
144
Blue
217
Luminance
53%
The three channels

A hex color is just three bytes standing in a trench coat — one each for red, green, and blue, each running 00 to FF.

Taking the color apart

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.