Number base converter
Type a number into any of the fields to instantly see its value in the other bases. It supports integers of any size, negative numbers and the 0x, 0b and 0o prefixes.
Number systems
A positional number system represents numbers with a set of digits whose value depends on their position. In decimal (base 10) we use ten digits; in binary (base 2), just 0 and 1, which is how computers store data; in octal (base 8), 0 to 7; and in hexadecimal (base 16), 0 to 9 and A to F.
For example, 2026 in decimal is 111 1110 1010 in binary, 3752 in octal and 7EA in hexadecimal.
What is hexadecimal used for?
Each hexadecimal digit is exactly 4 bits, so a byte is always written with 2 digits (00 to FF). That is why hex is everywhere in computing: web colours (#FF8800), MAC and IPv6 addresses, Unicode code points, hashes such as MD5 or SHA-256, and memory dumps. Octal is mostly used for file permissions on Linux (chmod 755).
How to convert binary to decimal by hand
Multiply each bit by the power of 2 for its position, starting with 20 = 1 on the right, and add up the results. For example, 1011 = 1×8 + 0×4 + 1×2 + 1×1 = 11. To go from binary to hex, just group the bits in fours: 1011 0110 = B6.