Study Tips

Binary and Hexadecimal Explained: Converting Number Bases

By Math Solving Space · · 2 min read

On this page
  1. Place value in binary
  2. Decimal to binary: repeated division
  3. Hexadecimal
  4. Binary ↔ hex shortcut
  5. Common mistakes
  6. Practice questions
  7. Frequently asked questions

Every number system uses place value. In decimal each place is a power of 10; in binary each place is a power of 2 and the only digits are 0 and 1; in hexadecimal each place is a power of 16, with digits 0–9 and A–F. Convert to decimal by multiplying out place values, and from decimal by repeated division.

Place value in binary

1011012101101_2 means

1×32+0×16+1×8+1×4+0×2+1×1=451 \times 32 + 0 \times 16 + 1 \times 8 + 1 \times 4 + 0 \times 2 + 1 \times 1 = 45

Decimal to binary: repeated division

Divide by 2 repeatedly and write down the remainders, then read them bottom to top.

13÷2=613 \div 2 = 6 r 1, 6÷2=36 \div 2 = 3 r 0, 3÷2=13 \div 2 = 1 r 1, 1÷2=01 \div 2 = 0 r 1, so 13=1101213 = 1101_2.

For a bigger example, 2026=1111110101022026 = 11111101010_2.

Hexadecimal

Hex digits: 0–9 then A = 10, B = 11, C = 12, D = 13, E = 14, F = 15.

FF16=15×16+15=255FF_{16} = 15 \times 16 + 15 = 255, the largest value in one byte.

Binary ↔ hex shortcut

Each hex digit is exactly four binary digits. Group binary digits in fours from the right:

101101=0010  1101=2 D101101 = 0010\;1101 = 2\,D, so 1011012=2D16101101_2 = 2D_{16}.

Common mistakes

  • Reading the division remainders top to bottom instead of bottom to top.
  • Forgetting that A–F stand for 10–15.
  • Grouping binary digits from the left instead of the right.

Practice questions

  1. Convert 10011210011_2 to decimal.
  2. Convert 37 to binary.
  3. Convert 1F161F_{16} to decimal.

Answers: 1) 19 2) 1001012100101_2 3) 31

Convert between any bases from 2 to 36 with the binary converter, which shows both methods. Powers of 2 come from the exponents calculator, and division with remainders from the remainder calculator.

Frequently asked questions

Why do computers use binary?

Electronic circuits have two reliable states, on and off, which map naturally to 1 and 0.

What is a byte?

Eight bits, which can store 256 different values (0 to 255).

What is octal?

Base 8, using digits 0–7. Each octal digit is three binary digits.

Open the calculator →

#number#binary#computing