Convert between binary, octal, decimal, and hex.
🔢 Common uses: programming (hex colors, memory addresses), digital electronics (binary), and file permissions (octal). Try 255 in decimal = FF in hex.
The Number Base Converter is based on the following formula:
N = Σ dᵢ × bⁱ (digits dᵢ, base b, positions i counted from 0 at the right) 1 hex digit = 4 bits 1 octal digit = 3 bits
Variables: b = base: 2 for binary, 8 for octal, 10 for decimal, 16 for hexadecimal dᵢ = the digit in position i (rightmost digit is position 0) bⁱ = the base raised to the power of the position A-F = hex digits standing for 10-15
In positional notation each digit is worth digit × base to the power of its position, counted from 0 on the right. Hexadecimal uses A-F for 10-15, and since 16 = 2⁴, every hex digit maps to exactly 4 binary digits, which is why programmers write binary compactly as hex.
Worked example: Convert hex 0xFF to decimal, binary and octal: 0xFF = 15 × 16 + 15 × 1 = 240 + 15 = 255 255 in binary = 11111111 (two hex digits = 8 bits) 255 in octal = 377 (3 × 64 + 7 × 8 + 7 = 192 + 56 + 7 = 255)
This tool converts numbers between four bases: binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16). These are the number systems used in computing.
More tools you might find useful
Convert between watts, kilowatts, horsepower, and BTU.
Convert between bar, PSI, pascal, atm and more.
US, UK, EU and cm shoe sizes for men, women and kids by lookup table.
Convert between km/h, mph, m/s, knots, and ft/s instantly.