How base conversion works
To convert a decimal number to another base, keep dividing by the base and read the remainders backwards. For 13 in binary: 13 ÷ 2 = 6 remainder 1, 6 ÷ 2 = 3 remainder 0, 3 ÷ 2 = 1 remainder 1, 1 ÷ 2 = 0 remainder 1, giving 1101. Going back, 1101 is 1×8 + 1×4 + 0×2 + 1×1 = 13.
- Hexadecimal uses 0 to 9 and A to F (10 to 15). Four binary digits map to one hex digit, which is why hex is used for colour codes (#FF8800) and memory addresses.
- Octal groups binary digits in threes and shows up in Linux file permissions (755).
- Numbers starting with 0x, 0b or 0o can be pasted as they are.
The tool works with whole numbers of any length and stays exact for very large values.