Understanding Binary Numbers

by Vanessa Else

Step 1:  Relax

Don't be afraid of understanding binary numbers and how to convert them to our common decimal number system.  It's easy.  Before we delve into mathematics, though, let's consider a linguistic analogy.  Consider that "love" and "amour" are two different ways of saying the same thing.  One is English.  One is French.  However, they both represent the same concept.  The abstract concept "love" is  independent of how we choose to label it.  It is a concept.  We give it a name so we can communicate with each other when describing to someone that we feel love.  The name for that feeling is different depending upon your frame of reference.  If you say "love," you might say you are speaking in Base English.  If you say "amour," you could say you are speaking in Base French.

Similarly, when you say you have $162 in the bank, that number is a way of expressing how many dollars you have in the bank (in Base-10, otherwise known as "decimal numbers").  You would not say "one hundred and sixty two" if you are speaking Swedish, or Spanish, or some other language.  It would sound different -- but regardless of how you say it, you still have $162 dollars in the bank.

Humans think in decimal numbers largely because the vast majority of  human hands have ten fingers, and that is how humans learned to count.  Thus, counting in "base 10" is a natural extention of the human body.   But base-10 is not the only "language" of numbers.  You could count in Base-6, or Base-13, if you wanted to, but hey, we have enough to worry about without changing the whole number structure of the human race.

So, then, why do we want to learn binary numbers (Base-2)?  Because that's the best way for a computer to think (and even though we modelled computers in our own image, they are decidedly not human).  Using binary representations of numbers is  the best way for a computer to tranfer information throughout its circuits with minimal error.

An in-depth discussion about computer electronics and logic isn't necessary at this time, so just think of it this way.  Base 2 means that there are only two possible digits, 0 and 1.  Compare that to Base-10 which has ten digits:  0, 1, 2, 3, 4, 5, 6, 7, 8, and 9.  If a computer is going to transmit a digit, it's much easier  for the computer to check for errors in transmission if it has only two options.  Electronically, it's much easier to distinguish between two states rather than a range of possiblities because it either transmits a voltage (1 - On) or it doesn't (0 - Off).  None of this in-between stuff.  It's cut and dried.  Nice and simple.

To describe a quantity of things, and represent it with digits, you can do it in Base-2, Base-20, Base-16 (also called hexidecimal), etc.  However, whatever  "language" (number base) that you use to describe this quantity, you will still have the same number of things.  Your number of it will just look different in Base-2 than it does in Base-10.

Decimal Numbers

Let's take a closer look at something most of us take for granted.  Counting in decimal numbers.  For example, when you see the decimal number:


it means that you sum the following to get a concept of the total quantity of things represented by that number:
4 x 1000
plus    2 x 100
plus    7 x 10
plus    5 x 1

which is the same as:
4 x 103
plus    2 x 102
plus    7 x 101
plus    5 x 100

(Remember that in mathematics, any number  raised to the zero power equals 1)

The number that is the on the far right is in the "ones" place holder (called the least significant digit).  To the left of that is the "tens" place holder.  To the left of that is the "hundreds" place holder, and so on.  They are all powers of 10.  Whatever digit is sitting in a particular place holder, you multiply that place holder amount ( power of 10) by the digit, and then add them all up.
Thousands column
(most significant digit)
Hundreds column
Tens column
Ones column
(least significant digit)
digit from 0-9 x 1000
digit from 0-9 x 100
digit from 0-9 x 10
digit from 0-9 x 1

= 4 thousand, 2 hundred, and seventy-five
= 4275

Binary Numbers

Similarly, in binary (Base-2), all the columns are powers of 2.  Think of the following table as the four least significant digit place holders for the binary number system just like the tables above using the decimal number system:
Eights column
(most significatnt digit)
Fours column
Twos column
Ones column
(least significant digit)

The far right colum is the "ones" place holder.  To the left of that is the "twos" place holder.  To the left of that is the "fours" place holder (22 = 4).  To the left of that is the "eights" place holder (23 = 8).  They are all powers of 2.  Whatever digit is sitting in a particular place holder, you multiply that place holder amount ( power of 2) by the digit, and then add them all up.  However, remember that a binary digit has only two options, 0 or 1, so it's very easy.

For example, let's look at the binary number:


You would this  interpret in decimal as:
1 x 23
plus   0 x 22
plus   1 x 21
plus   1 x 20
which equals
1 x 8
plus   0 x 4
plus   1 x 2
plus   1 x 1
which equals
plus   0
plus   2
plus   1

The total is:  11 (in decimal)  which equals   8 + 0 + 2 + 1

In other words,

10112  =  1110

(Note: the subscripted number indicates the number base)

Try It Yourself

Here are two more examples of binary numbers converted to decimal.  Try the conversion yourself before peaking at the answer.

Example 1:

What does this binary number:

0111    (also written as 01112)

equal in decimal?

0 x 23
plus   1 x 22
plus   1 x 21
plus   1 x 20
= 0 x 8
plus 1 x 4
plus   1 x 2
plus   1 x 1
= 0
+ 4
+ 2
+ 1

Total = 7    (also written as 710)

Example 2:

What does this binary number:

1010    (also written as 10102)

equal in decimal?

1 x 23
plus   0 x 22
plus   1 x 21
plus   0 x 20
= 1 x 8
plus 0 x 4
plus   1 x 2
plus   0 x 1
= 8
+ 0
+ 2
+ 0

Total = 10    (also written as 1010)


Trick Question:

If you were going to count from 0 to 15 (a total of 16 possibilites), what would it look like in binary?


Binary    Decimal
0000       =  0010
0001       =  0110
0010       =  0210
0011       =  0310
0100       =  0410
0101       =  0510
0110       =  0610
0111       =  0710
1000       =  0810
1001       =  0910
1010       =  1010
1011       =  1110
1100       =  1210
1101       =  1310
1110       =  1410
1111       =  1510

Can you see the pattern?  Just like decimal counting, you start with zero, add 1 to the least significant digit to count up by 1 each time.  When you've exhausted the total number of possibilities in that place holder (which in binary is only two), the next time you add 1, you have to carry it over to the next highest significant place holder, reset the less significant place holder to 0, and repeat the process.  Just like decimal numbers, as you count up, the digits on the right hand side change more rapidly than those further to the left.

Let's Get Advanced

In computers, each "bit" of information is like a place holder digit in a binary number.  An 8-bit piece of computer data is often called a "byte"  and is represented by an 8-digit binary number.  The values of these binary place holders are as follows (with the "most significant digit" on the left hand side, and the "least significant digit" on the right had side -- just like decimal numbers):
= 128
= 64
= 32
= 16
= 8
= 4
= 2
= 1


Check the following binary to decimal conversions:
Binary number
Decimal Number
 Summation of Decimal Numbers
1000 1111
(128 + 8 + 4 + 2 + 1)
0110 0110
(64 + 32 + 4 + 2)
1111 1111
(128 + 64 + 32 + 16 + 8 + 4 + 2 + 1)

You might notice something interesting about the number 111111112.    256K is a number often used in the computer world.  So, why does 111111112 convert to 25510 and not 25610?  That's because, one of the possibilities is zero!  Any 8-digit number that might have a 1 in it (25510 total), plus one more possible state:  000000002.

- END -