We use computers every day
Inside a computer are “0s and 1s”
Consider the decimal number (what we humans typically use) 123
The rightmost column is the 1s column
The middle, the 10s
The leftmost, the 100s
100 | 10 | 1 |
---|---|---|
1 | 2 | 3 |
Thus we have 100 x 1 + 10 x 2 + 1 x 3 = 100 + 20 + 3 = 123
Inside a computer, the binary 000 would represent 0, just like in our human world!
However, in this case, we are dealing with binary so:
4 | 2 | 1 |
---|---|---|
0 | 0 | 0 |
In the human world (decimal) we use powers of 10 for place values
10 = 1, 10 = 10, 10 = 100, 10 = 1000, etc.
0
1
2
3
In the computer world (binary) we use powers of 2 for place values
2 = 1, 2 = 2, 2 = 4, 2 = 8, etc.
0
1
2
3
The difference between decimal numbers and binary numbers is changing the base
For the binary number 000, we have 4 x 0 + 2 x 0 + 1 x 0 = 0 + 0 + 0 = 0!
Consider the binary number 001:
4 | 2 | 1 |
---|---|---|
0 | 0 | 1 |
How do we represent the decimal number 2 in binary?
4 | 2 | 1 |
---|---|---|
0 | 1 | 0 |
Likewise, the number 3 would be:
4 | 2 | 1 |
---|---|---|
0 | 1 | 1 |
Similarly, 4 would be:
4 | 2 | 1 |
---|---|---|
1 | 0 | 0 |
What about 7?
What about 7?
4 | 2 | 1 |
---|---|---|
1 | 1 | 1 |
What about 8?
We can’t count to 8 without another bit (binary digit)
8 | 4 | 2 | 1 |
---|---|---|---|
1 | 0 | 0 | 0 |
Even though computers only use binary, they can count as high as humans can!
Using these transistors we can store values, store data, compute, and do everything we can with computers
David demonstrates how transistors work using light bulbs
So far all that we can represent our numbers
A decision needs to be made on what pattern of 1s and 0s to represent letters, words, and paragraphs
All computers can store 0s and 1s
To represent letters, we need a mapping of 0s and 1s to characters
Programs like Notepad, TextEdit, and Microsoft Word decide whether to display patterns of bits as letters or words
ASCII is limited
UNICODE is a bigger set of characters that includes written languages other than English and even emoji!
Consider this pattern of bits: 01001000 01001001
128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 |
1 x 64 + 1 x 8 | 1 x 64 + 1 x 8 + 1 x 1 |
---|---|
72 | 73 |
H | I |
If you have heard that your computer has “Intel Inside,” it has an Intel processor in it
The CPU is the brain of the computer
CPUs now can have multiple cores