1.1.1 · D1How Computers Work

Foundations — Binary number system — conversions from - to decimal, counting in binary

1,986 words9 min readBack to topic

Before you can convert, count, or even read a binary number, you must own every symbol the parent note quietly used. This page builds them one at a time, from absolute zero. Nothing here assumes you have seen the notation before.


0. What is a "digit"? What is a "number"?

Look at the figure: the same pile of five dots can wear decimal clothing ("5") or binary clothing ("101"). Same pile, different marks.

Figure — Binary number system — conversions from - to decimal, counting in binary

1. The base — how many marks are allowed

Plain-words picture: the base is the size of your box of stamps. Decimal gives you a box of 10 stamps; binary hands you a box of only 2. You must build every number using only stamps from your box.


2. The subscript notation and


3. Exponents: — repeated multiplication

The parent note is full of things like , , . You cannot read the place-value formula without owning this symbol first.

Figure — Binary number system — conversions from - to decimal, counting in binary

4. The position index and the "rightmost is 0" convention

Picture: the slots are houses on a street. The house nearest the "units end" is house 0. Its weight is ; the next house is worth , then

Figure — Binary number system — conversions from - to decimal, counting in binary

5. Weight — what one slot is worth

Plain-words picture: think of coins. In binary the coins are worth each. A digit "1" in a slot means "I have one coin of that value"; a digit "0" means "I have none of that value".


6. The summation symbol — "add all of these up"

The capital Greek "S", , scares people. It is just an instruction to add.


7. The floor bracket and remainders

The decimal→binary algorithm uses and "remainder". Both must be built.


8. Putting it together — the picture of a whole conversion

Now every symbol in is owned:

  • — the digit (0 or 1) sitting in house ,
  • — the weight of house (a coin value),
  • — add up the coins you actually have,
  • the subscript — reminder we are in the base-2 box.

With that, "convert binary to decimal" reads in plain English as: add the coin-values of every slot showing a 1. Nothing mystical remains.


Prerequisite map

Number equals a count

Base b equals size of digit box

Exponent b to the i

Allowed digits 0 to b minus 1

Weight of a slot

Position index from 0

Place value value equals sum

Summation sigma

Floor and remainder

Decimal to binary by division

Binary number system


Equipment checklist

A number is really a
a count of things; the digits are just clothing for that count.
The base means
how many different digits (stamps) the system allows.
Allowed digits in base satisfy
; so binary uses only 0 and 1, never a "2".
The subscript in tells you
which base to read the digits in (here base 2).
equals
1, for every base — this is why the rightmost slot is worth 1.
equals
.
The rightmost slot is position
0, not 1; positions count from the right starting at 0.
The weight of the digit at position is
.
The symbol tells you to
plug in and add all the results.
equals
6 (throw away the fraction, keep the whole part).
The remainder of is
0 if is even, 1 if is odd — it is the units bit.
Why "odd/even" fixes the last bit
only the units weight is odd, so it alone decides oddness.

Connections

  • Parent: Binary number system — these foundations feed directly into every conversion there.
  • Place-value and number bases — the general idea for any base .
  • Hexadecimal and Octal — the same foundations with and .
  • Bits and Bytes — once you own "digit" and " values", a byte is just 8 of these slots.
  • Logic gates and switches — the physical reason the digit box has exactly two stamps.
  • Binary addition and overflow — needs carrying, built from the "no digit 2" rule here.
  • Two's complement — reuses weights and position index to encode negatives.