Number Base Converter β How It Works
Computers and programming languages use multiple number bases. While decimal (base 10) is used in everyday life, binary (base 2), octal (base 8), and hexadecimal (base 16) appear constantly in programming, hardware, and networking contexts. This tool converts any non-negative integer between all four bases instantly.
Binary (Base 2)
Binary uses only the digits 0 and 1. Every byte in a computer is stored as 8 binary digits (bits). Decimal 255 is 11111111 in binary, which represents a fully saturated byte β commonly seen in networking (subnet masks like 255.255.255.0) and color values (RGB 255 = max intensity).
Octal (Base 8)
Octal uses digits 0β7. Three binary bits map to one octal digit, making it a compact representation of binary data. Unix/Linux file permissions use octal notation β chmod 755 means rwxr-xr-x in binary terms.
Hexadecimal (Base 16)
Hexadecimal uses digits 0β9 and letters AβF. Four binary bits map to one hex digit, so one byte is always two hex digits. Hex is everywhere: color codes (#FF6600), memory addresses (0x7FFFFFFF), and byte-level data inspection. The 0x prefix in code signals a hex literal.
Frequently Asked Questions
- What is 1111 1111 in binary equal to in decimal?
- It equals 255. Each bit represents a power of 2: 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255.
- Why does hexadecimal use letters AβF?
- Hex needs 16 distinct symbols. After using 0β9 (10 digits), the letters AβF represent the values 10β15, keeping each digit a single character for easy reading.