Skip to content

Technology

Binary to Decimal Conversion — How Computers Count

Learn how to convert between binary and decimal number systems. Understand place values, the conversion algorithm, and why computers use base-2.

OurDailyCalc Team 4 min read

Everything your computer does — every pixel, calculation, and cat video — is ultimately processed as 1s and 0s. Understanding binary-to-decimal conversion reveals how machines think in a fundamentally different number system than we do.

The conversion formulas

Binary to Decimal:
  Multiply each digit by 2^(position), counting from right (position 0)
  Sum all results

  Example: 1101 in binary
  = 1×2³ + 1×2² + 0×2¹ + 1×2⁰
  = 8 + 4 + 0 + 1
  = 13 in decimal

Decimal to Binary:
  Repeatedly divide by 2, record remainders, read bottom-to-top

Place value comparison

Decimal (base 10):   ... 1000  100  10   1
                          10³  10²  10¹  10⁰

Binary (base 2):     ... 128   64   32   16   8   4   2   1
                          2⁷   2⁶   2⁵   2⁴  2³  2²  2¹  2⁰

Worked example: Binary → Decimal

Convert 10110101 to decimal:

Position:  7   6   5   4   3   2   1   0
Binary:    1   0   1   1   0   1   0   1
Value:    128  0   32  16  0   4   0   1

Sum = 128 + 32 + 16 + 4 + 1 = 181

Worked example: Decimal → Binary

Convert 53 to binary:

53 ÷ 2 = 26 remainder 1
26 ÷ 2 = 13 remainder 0
13 ÷ 2 = 6  remainder 1
6  ÷ 2 = 3  remainder 0
3  ÷ 2 = 1  remainder 1
1  ÷ 2 = 0  remainder 1

Read remainders bottom-to-top: 110101
53 in decimal = 110101 in binary

Verify: 32 + 16 + 4 + 1 = 53 ✓

Why computers use binary

  • Transistors have two states: on (1) or off (0)
  • Simple circuits: AND, OR, NOT gates only need two inputs
  • Noise resistance: distinguishing two voltage levels is more reliable than ten
  • All math operations reduce to binary addition and shifting

Hexadecimal: the programmer’s shortcut

Binary is hard to read. Hex (base 16) groups 4 binary digits into one symbol:

Binary:  1010 1111 0011
Hex:     A    F    3
Decimal: 175 × 16 + 3 = 2803

Quick grouping:
  0000=0  0100=4  1000=8  1100=C
  0001=1  0101=5  1001=9  1101=D
  0010=2  0110=6  1010=A  1110=E
  0011=3  0111=7  1011=B  1111=F

When to use binary conversion

  • Understanding how data is stored (file sizes, memory addresses)
  • Networking: IP addresses and subnet masks are 32-bit binary
  • Programming: bitwise operations, flags, permissions
  • Digital electronics: circuit design, logic gates
  • Computer science coursework and technical interviews

Tips for faster conversion

  • Memorize powers of 2: 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024
  • For binary → decimal: only add powers where the bit is 1
  • For decimal → binary: subtract the largest power of 2 that fits, repeat
  • Use hex as a middle step for large binary numbers (every 4 bits = 1 hex digit)
  • 8 bits = 1 byte = 0–255 range = two hex digits

Convert numbers between binary, decimal, and hexadecimal with OurDailyCalc’s binary converter — enter any value and see all three representations instantly.

TL;DR

  • Binary uses 2 digits (0, 1); each position is a power of 2
  • Binary → Decimal: sum the powers of 2 where bits are 1
  • Decimal → Binary: divide by 2 repeatedly, read remainders upward
  • Hex groups 4 binary digits into one character (0–F)
  • Computers use binary because transistors are two-state switches
#binary #decimal #hex #programming
DC

OurDailyCalc Team

OurDailyCalc — beautiful tools for everyday calculations.