Bummer! This is just a preview. You need to be signed in with a Basic account to view the entire video.
Start a free Basic trial
to watch this video
In order to talk to machines, you have to speak in their language. Machine language is usually represented in binary form. Binary is a numbering system that only uses the digits 0 and 1. When these numbers, 0 and 1 are arranged correctly they represent everything we do on the computer.
Binary Number Game (music begins automatically)
Unlike Decimals which use 10 as a base, Binary numbers are figured by multiples of 2.
Here's a mathematical tip for understanding Binary:
What is 101011
?
1 x 1 = 1
1 x 2 = 2
0 x 4 = 0
1 x 8 = 8
0 x 16 = 0
1 x 32 = 32
1 + 2 + 8 + 32 = 43

0:00
In order to talk to machines, you have to speak in their language.

0:04
Early on, we figured out ways to extract code from machine languages.

0:08
But, in order to step forward,

0:09
we must step down to some lower level machine code.

0:12
The binary numbering system is similar to the decimal numbering system you're

0:16
already use to in many ways.

0:18
The principles behind the systems are similar, but

0:21
obviously there's some differences as well.

0:24
Let's start with some names you may already be familiar with.

0:27
A bit is the smallest unit in binary, and it can either be a zero or a one.

0:33
If you put eight bits together it's a byte.

0:36
Both the decimal and binary numbering system, are positional numbering systems

0:41
meaning, the position of the numbers indicate the relative value.

0:45
Let's look at an example.

0:47
In the number 1,234, the 1 is worth 1000,

0:52
the 2 is worth 200, the 3 is worth 30 and the 4 is worth 4.

0:58
If you switch these numbers around, their relative values will also switch around.

1:04
The decimal system accomplishes this place value by using 10 as the base, and

1:10
increasing the power each time you step to the left, or 10 the 0, 10 to the 1,

1:14
10 to the 2, are the ones, tens, and hundreds place.

1:19
This same process happens in binary.

1:22
Only it uses two as the base instead of ten so the first position is two to zero

1:27
the second position is two the first, the third position is two to the second and

1:33
the fourth position is two to the third, representing the ones,

1:37
twos, fours and eights place.

1:41
Now, let's use our knowledge of place value to find out

1:44
what this bite represents.

1:46
Don't be shy, take a guess.

1:48
[SOUND] That's right, it's 1.

1:51
Here we've turned on the first bit which represents a 1 or

1:56
a 0 meaning this equals 1.

2:01
Let's try another, what about this bite?

2:04
Here we've turned on the second bit which represents two, so this bit equals two.

2:12
And, what about this one?

2:14
Here we've turned on the first two bits, the two and

2:17
the one, because two and one equals three.

2:21
This represents three.

2:22
[BLANK_AUDIO]

2:25
Let's skip ahead a little bit.

2:27
What do you think this byte will represent?

2:30
Here we have the 8 and

2:31
the 2 bits turned on, so this represent 10, because 8 plus 2 is 10.

2:37
Now, let me assure you none of the languages we teach here at

2:41
Treehouse use the binary numbering system.

2:44
But, it's important to know where your data is going, and

2:46
what it looks like to a computer.

2:49
In the next video,

2:50
we'll look at a laptop tear down to see what data storage hardware looks like.
You need to sign up for Treehouse in order to download course files.
Sign up