Number bases (also called radixes) define how many unique digit symbols are used in a positional numeral system — humans use base 10 (decimal, digits 0–9) almost exclusively for daily arithmetic, but computers operate internally in base 2 (binary, digits 0 and 1), programmers read memory addresses in base 16 (hexadecimal, digits 0–9 and A–F), and Unix file permissions are traditionally expressed in base 8 (octal). Converting between bases is fundamental to computer science, embedded programming, and digital electronics. The sections below cover why different bases exist and when each is used, how positional notation works identically across any base, and two's complement — the clever representation that lets computers handle negative integers with the same circuitry used for positive ones.
Why Binary, Octal, and Hex Persist
Computers operate in binary because digital circuits have exactly two stable states — voltage high (1) or low (0) — and every other data representation must map to this underlying binary layer. A transistor in silicon is either conducting or not; a magnetic domain points one way or the other; a cell in flash memory stores high or low charge. Binary representation is therefore not a design choice but a physical constraint of digital hardware.
Hexadecimal (base 16) persists because each hex digit represents exactly 4 binary digits, making hex a compact human-readable shorthand for binary: a byte (8 bits) takes only 2 hex digits (00–FF) instead of 8 binary digits (00000000–11111111). Memory addresses, color codes (#FF5733), MAC addresses, and hash values all use hex for readability. Octal (base 8) represents 3 binary digits per symbol and survives in Unix file permissions (rwxr-xr-x = 755) and some embedded systems. Base 10 is purely a human convenience stemming from having 10 fingers — computers don't use decimal internally and convert only for display to human users, introducing rounding errors (like 0.1 not being exactly representable in binary) that occasionally surprise programmers.
Positional Notation Across Any Base
Positional notation works identically across any base — each digit position represents a power of the base. In base 10, the number 5,273 means 5×10³ + 2×10² + 7×10¹ + 3×10⁰ = 5000 + 200 + 70 + 3. In base 2, the binary number 1101 means 1×2³ + 1×2² + 0×2¹ + 1×2⁰ = 8 + 4 + 0 + 1 = 13 decimal. In base 16, the hex number 2AF means 2×16² + 10×16¹ + 15×16⁰ = 512 + 160 + 15 = 687 decimal.
This uniformity means the conversion algorithm is identical regardless of the bases involved: multiply each digit by its positional weight and sum the results to get decimal, then repeatedly divide by the target base and record remainders to convert decimal to any other base. The calculator automates this process while also supporting custom bases from 2 to 36 (using digits 0-9 followed by letters A-Z for higher-value digits). Base 36 is the maximum representable with standard alphanumeric characters and is occasionally used for compact encoding of large integers (URL shorteners, file identifiers) where 10-digit decimal numbers can be compressed into 6-digit base-36 representations.
Two's Complement for Signed Integers
The integer converter offers 8-, 16- and 32-bit two’s-complement representations. In n bits, the signed range is −2^(n−1) through 2^(n−1)−1. For 8 bits, 01111111 represents 127, 10000000 represents −128 and 11111111 represents −1. To negate, invert the bits and add one. The separate 64-bit IEEE 754 Double option represents floating-point numbers; it does not provide a 64-bit integer output. Use the displayed integer-width controls when inspecting signed or unsigned patterns.