CalcStack — free, instant, no signup. The interactive calculator loads automatically.
255 = 0xFF = 1111 1111₂ = 377₈. Prefixes auto-detected, binary grouped in nibbles, bit width shown — the programmer's everyday converter.
Computers speak binary but humans can't read 32-digit strings of ones and zeros — so programming runs on hexadecimal, which compresses binary exactly 4:1 with zero information loss. This converter moves between decimal, hex, binary, and octal instantly, auto-detects 0x/0b/0o prefixes, groups binary for readability, and shows the bit width — the number that decides whether your value fits in a byte.
Programmers use it daily: 255 = 0xFF = 1111 1111₂ = 377₈ — decimal, hex, binary, octal with bit-width shown and 0x/0b prefixes auto-detected.
Because hex is binary with the tedium removed: each hex digit encodes exactly 4 bits, so 0xFF = 1111 1111 and 0xA5 = 1010 0101 — conversion is mechanical, no arithmetic. A 32-bit value that reads 11111111111111111111111111111111 in binary is just FFFFFFFF in hex. This is why memory addresses, color codes (#FF5733 = red FF, green 57, blue 33 in hex pairs), MAC addresses, and byte-level data all print in hex. Octal survives mainly in Unix file permissions (chmod 755 = rwxr-xr-x, three 3-bit groups). The classic milestones to know: 0xFF = 255 (one byte), 0xFFFF = 65,535 (16-bit ceiling — the old integer-overflow wall in games), and 2,147,483,647 = 0x7FFFFFFF, the 32-bit signed maximum that broke things in 2038-style bugs.
Two methods, both worth knowing. Repeated halving: divide by 2, record the remainder, repeat — 13 → 6 r1, 3 r0, 1 r1, 0 r1 — read the remainders bottom-up: 1101. Verify: 8+4+1 = 13. Faster with practice: place values. Binary places are 128, 64, 32, 16, 8, 4, 2, 1 — for 202, take 128 (leftover 74), take 64 (leftover 10), skip 32 and 16, take 8 (leftover 2), take 2 → 11001010. Hex conversion is then trivial: group the bits in fours from the right (1100 1010) and convert each nibble (C, A) → 0xCA. The place-value table doubles each step — that exponential doubling is why 8 bits max at 255, 16 bits at 65,535, and 32 bits at 4.29 billion.
A bit is one binary digit (0 or 1); a byte is 8 bits, the fundamental unit because early computers standardized on it for characters. Eight bits give 2⁸ = 256 combinations, numbered 0–255 — hence 255 as the per-channel color maximum (RGB 255,0,0 is pure red), the old-school stat cap in RPGs, and the IPv4 octet ceiling (255.255.255.255). The powers of two become second nature: 2¹⁰ = 1,024 (why "kilobyte" meant 1,024 bytes historically), 2¹⁶ = 65,536, 2³² ≈ 4.29 billion (the 32-bit address limit that capped old systems at 4 GB RAM), 2⁶⁴ ≈ 18.4 quintillion. When a number in software mysteriously maxes at 255, 65,535, or 2.1 billion, you have found the integer width — and probably the bug.