Number Base Converter — Binary, Octal, Decimal, Hex

Binary (Base 2)

0

Octal (Base 8)

0

Decimal (Base 10)

0

Hexadecimal (Base 16)

0

Understanding Number Base Systems

A number base (or radix) determines how many unique digits are used to represent numbers. The decimal system (base 10) uses digits 0-9. Computers operate in binary (base 2), using only 0 and 1. Hexadecimal (base 16) uses 0-9 and A-F, providing a compact way to represent binary data.

Octal (base 8) uses digits 0-7 and is still used in Unix file permissions. Each octal digit represents exactly 3 binary digits, and each hexadecimal digit represents exactly 4 binary digits.

To convert between bases, the number is first converted to decimal by multiplying each digit by its positional value, then converted to the target base through repeated division. For example, binary 1111 equals decimal 15 which equals hexadecimal F.

Frequently Asked Questions

How do I convert binary to decimal?

Multiply each digit by 2 raised to its position (starting from 0 on the right) and sum the results. For example, binary 1011 = (1x8)+(0x4)+(1x2)+(1x1) = 11 in decimal.

Why do computers use binary?

Computers use binary because their electronic circuits have two stable states: on (1) and off (0). All data in a computer is ultimately represented as sequences of binary digits (bits).

What is hexadecimal used for?

Hexadecimal provides a compact way to represent binary data. One hex digit represents exactly 4 bits. Common uses include color codes (#FF0000 for red), memory addresses, and MAC addresses.

How do I convert decimal to hexadecimal?

Repeatedly divide by 16 and record remainders. Read remainders from bottom to top. For example, 255/16=15 R15, 15/16=0 R15. Since 15=F in hex, 255 decimal = FF hexadecimal.

Related Calculators