Convert between binary, decimal, octal, and hexadecimal. Type in any field and all others update instantly.
A number base (or radix) determines how many unique digits are used to represent numbers. Base 10 (decimal) uses digits 0-9. Base 2 (binary) uses only 0 and 1. Base 16 (hexadecimal) uses 0-9 and A-F. Base 8 (octal) uses 0-7. Different bases are used in different contexts: decimal for everyday math, binary for computer hardware, hexadecimal for programming and color codes, and octal for Unix file permissions.
Enter a number and its current base, then select the target base. The calculator converts between binary, octal, decimal, hexadecimal, and any custom base from 2 to 36. It shows the step-by-step conversion process and the equivalent value in all common bases simultaneously. The Color Picker uses hexadecimal for color codes.
Binary to decimal: Each binary digit represents a power of 2. 1010 in binary = 1x8 + 0x4 + 1x2 + 0x1 = 10 in decimal. Hex to decimal: Each hex digit represents a power of 16. FF in hex = 15x16 + 15x1 = 255 in decimal. Decimal to binary: Repeatedly divide by 2 and read the remainders bottom-up. 13 in decimal = 1101 in binary.
Binary (base 2) is the foundation of all digital computing because transistors have two states (on/off). Hexadecimal (base 16) is used as a compact representation of binary: each hex digit represents exactly 4 binary digits. Octal (base 8) was common in early computing but has largely been replaced by hexadecimal. In web development, colors are specified in hex (#FF5733 = red 255, green 87, blue 51). In networking, IPv4 addresses are often displayed in dotted decimal but computed in binary for subnet calculations. Memory addresses in debugging tools appear in hexadecimal. ASCII character codes use decimal values (A = 65, a = 97) that correspond to 7-bit binary values. Unicode extends this to handle over 150,000 characters using variable-length encoding (UTF-8).