Objectives
- Recognise that computers create binary code by pushing electricity through switches to create 1s (presence of electricity) and 0s (absence of electricity) and that this is used to generate numbers and letters.
Binary Language
We have been looking at what is inside the computer for quite a few lessons. Now we are going to look at how it all works.
Remember that the CPU (or brain of the computer, is basically a massive number of switches. It is the parts of the machine that does the thinking and the calculating. In this lesson we learn the language of computers. Binary. Watch the youtube video to 5:15 minutes.
Remember that the CPU (or brain of the computer, is basically a massive number of switches. It is the parts of the machine that does the thinking and the calculating. In this lesson we learn the language of computers. Binary. Watch the youtube video to 5:15 minutes.
Task
In your exercise books write down the following questions and answer:
What language does the CPU use?
Why do you think computers use binary rather than a different language?
What different data or items can binary code be used to represent?
What language does the CPU use?
Why do you think computers use binary rather than a different language?
What different data or items can binary code be used to represent?
Decimal......
Binary is a counting system, just like decimal. We use what is called positional notation. This is where we have columns for 1s, 10s, 100s, 1000s like this, or to the power of 10s. In each place there are 10 options. 0 to 9.
1,000s 100s 10s 1s
5 7 4 6
That gives us the number 5,746.
When we reach for example 9 1s and add another 1, we carry across to the 10s column. For example:
1,000s 100s 10s 1s
5 7 4 9
Is 5,749. 5,749 plus 1 is:
1,000s 100s 10s 1s
5 7 5 0
or 5,750
1,000s 100s 10s 1s
5 7 4 6
That gives us the number 5,746.
When we reach for example 9 1s and add another 1, we carry across to the 10s column. For example:
1,000s 100s 10s 1s
5 7 4 9
Is 5,749. 5,749 plus 1 is:
1,000s 100s 10s 1s
5 7 5 0
or 5,750
Binary......
Binary is based on the same concept, except everything is in powers of 2, and rather than having the options of 0-9 (10 values), we only have two options, 0s and 1s. On or Off.
64s 32s 16s 8s 4s 2s 1s
1 0 1 1 0 1 1
If we add this up we get:
64 + 16+ 8 + 2 + 1 giving us 91!
Watch this video as it explains this well:
64s 32s 16s 8s 4s 2s 1s
1 0 1 1 0 1 1
If we add this up we get:
64 + 16+ 8 + 2 + 1 giving us 91!
Watch this video as it explains this well:
Task
Try out this binary conversion quiz:
http://acc6.its.brooklyn.cuny.edu/~gurwitz/core5/binquiz.html
Write down the questions in your exercise book and then test yourself, writing the answers in your book before you check them online. You should aim to complete 10 binary to decimal, 10 decimal to binary. If you do not get the answer right in your book, correct in green pen.
http://acc6.its.brooklyn.cuny.edu/~gurwitz/core5/binquiz.html
Write down the questions in your exercise book and then test yourself, writing the answers in your book before you check them online. You should aim to complete 10 binary to decimal, 10 decimal to binary. If you do not get the answer right in your book, correct in green pen.
Adding binary numbers
Now you understand binary, watch this and see if you can add up binary numbers:
Task
![Picture](/uploads/1/3/5/0/13509255/6159687.jpg?527)
Write out these binary addition problems in your exercise books and try them out.
If the numbers sixteen and nine are added in binary form, will the answer be any different than if the same quantities are added in decimal form? Explain.
The second half is an extension - it's more difficult to take away than it is to add up!
Extension
What is the one's complement of a binary number? If you had to describe this principle to someone who just learned what binary numbers are, what would you say?
Determine the one's complement for the following binary numbers:
•100010102•110101112•111100112•111111112•111112•000000002•000002
Determine the one's complement for the following binary numbers:
•100010102•110101112•111100112•111111112•111112•000000002•000002