← All posts
8 min read

How Binary Represents Numbers: Place Value with Powers of Two

#technology#computer-science#binary#digital-foundations
📑 On this page

The binary pattern 1011 looks unlike the decimal numbers we use every day. Yet it represents an ordinary quantity: eleven.

There is no secret translation table to memorize. Binary uses the same place-value idea as decimal. The only change is the base.

Decimal positions use powers of ten. Binary positions use powers of two.

Once that connection is clear, binary numbers become a different notation for familiar quantities rather than a mysterious computer language.

Place value in decimal

Consider the decimal number 4,372.

Each position has a value:

4 thousands + 3 hundreds + 7 tens + 2 ones

Written mathematically:

4 × 1000 + 3 × 100 + 7 × 10 + 2 × 1

The place values are powers of ten:

10³   10²   10¹   10⁰
1000  100   10    1

We use ten possible digits because decimal is base 10. When a position would go beyond 9, we reset it to 0 and carry one into the next position.

Binary follows precisely the same structure with two digits.

Binary place values

Starting from the right, binary positions represent:

... 128  64  32  16  8  4  2  1

These are powers of two:

2⁷  2⁶  2⁵  2⁴  2³  2²  2¹  2⁰

A 1 means the corresponding value is included. A 0 means it is not.

For 1011:

Binary digit1011
Place value8421
Contribution8021

Add the active positions:

8 + 2 + 1 = 11

Therefore:

1011₂ = 11₁₀

The small subscripts identify the base when it might be unclear.

Counting in binary

Counting shows how carrying works:

DecimalBinary
00
11
210
311
4100
5101
6110
7111
81000

After 1, no higher single binary digit exists. The position resets to zero and carries:

1 + 1 = 10₂

After 11, adding one causes both rightmost positions to carry:

  11
+  1
----
 100

This is analogous to decimal 99 + 1 = 100. The carrying rule changes because binary positions fill after one instead of nine.

Converting binary to decimal

Use this repeatable method:

  1. Write the powers of two above the digits.
  2. Keep the values whose digits are 1.
  3. Add them.

Example: convert 110101.

Digit110101
Value32168421
32 + 16 + 4 + 1 = 53

So 110101₂ equals 53₁₀.

You can verify the position values by repeatedly doubling from the right:

1, 2, 4, 8, 16, 32, 64, ...

Converting decimal to binary

One intuitive method is to select powers of two from largest to smallest.

Convert decimal 45:

  1. The largest power of two no greater than 45 is 32. Write 1. Remainder: 13.
  2. The next value is 16, which is too large. Write 0.
  3. Eight fits. Write 1. Remainder: 5.
  4. Four fits. Write 1. Remainder: 1.
  5. Two does not fit. Write 0.
  6. One fits. Write 1.
32  16  8  4  2  1
 1   0  1  1  0  1

Therefore:

45₁₀ = 101101₂

Check the result:

32 + 8 + 4 + 1 = 45

Another method repeatedly divides by two and records remainders. It is convenient for algorithms, but selecting place values often gives beginners a clearer understanding.

How many values fit in a fixed width?

Computers usually work with fixed groups of bits.

An unsigned n-bit value has 2^n possible patterns. If counting begins at zero, its largest value is:

2^n - 1

Examples:

BitsPattern countUnsigned range
4160 to 15
82560 to 255
1665,5360 to 65,535
324,294,967,2960 to 4,294,967,295

The subtraction by one happens because zero uses one of the patterns.

This explains why color channels frequently range from 0 to 255: one byte provides 256 possible intensity values.

What happens when a value is too large?

Suppose a four-bit register stores 1111, the value 15. Adding one mathematically produces 10000, which requires five bits.

If the system keeps only four bits, the leading carry is lost:

1111 + 0001 = 0000  (with a carry outside the available width)

This behavior is called overflow. Its exact consequences depend on the data type, processor, and programming language. A value may wrap around, produce an error, expand into a larger representation, or behave in another defined way.

Fixed-width arithmetic is one reason software developers must know the permitted range of a number type.

Representing negative numbers

So far, every bit contributes to a non-negative value. Computers also need signed numbers.

Most modern systems use a representation called two's complement. For an n-bit signed value, the range is:

-2^(n-1) through 2^(n-1) - 1

An eight-bit signed integer therefore ranges from -128 to 127.

Why is the range not balanced? Zero occupies one pattern, and two's complement assigns one additional pattern to the negative side.

The full mechanism deserves its own later lesson. For now, remember that bit patterns have no inherent sign. The chosen number format determines whether 11111111 means 255, -1, or something else.

Binary fractions

Positions can also continue to the right of a binary point:

1/2, 1/4, 1/8, 1/16, ...

For example:

10.101₂

means:

2 + 0 + 1/2 + 0 + 1/8 = 2.625

Some decimal fractions cannot be represented exactly with a finite number of binary fraction digits. Just as decimal writes one third as the repeating 0.333..., binary has repeating representations for values such as decimal 0.1.

That is why ordinary floating-point calculations can produce results such as 0.30000000000000004. The computer is not randomly failing; it is using a finite binary approximation.

Where binary numbers appear

You may encounter binary place values in:

  • File permissions
  • Color values
  • Network masks
  • Hardware registers
  • Character encodings
  • Flags and feature settings
  • Image, audio, and sensor data

Developers often write the same underlying bits using hexadecimal because one hexadecimal digit neatly represents four bits. We will return to that compact notation when it becomes useful.

Common misunderstandings

"Binary numbers are different quantities"

Binary and decimal can represent the same quantity. They are different written systems, much like different languages can name the same object.

"More bits make calculations more accurate in every case"

More bits increase the available patterns. How that affects range or precision depends on whether the format stores integers, fractions, colors, measurements, or something else.

"The leftmost bit always means a negative number"

Only certain signed formats interpret it that way. In an unsigned value, every bit contributes to a non-negative magnitude.

Knowledge check

1. What decimal value does 10110 represent?

The active positions are 16, 4, and 2. Their sum is 22.

2. How would you write decimal 13 in binary?

Thirteen is 8 + 4 + 1, so the bits for 8, 4, 2, 1 are 1, 1, 0, 1: 1101.

3. What is the largest unsigned value in eight bits?

There are 256 patterns, covering 0 through 255. The largest value is 2^8 - 1 = 255.

4. Why can fixed-width arithmetic overflow?

A result may require more bits than the storage location provides. The system must then follow its defined overflow behavior.

The one idea to remember

Binary uses ordinary place value with powers of two.

Read each 1 as "include this power of two," add the included values, and the pattern becomes a familiar number.

Next, we will see how agreed numerical values allow computers to represent letters, scripts, punctuation, and emoji.