Presentation on theme: "101. Take a look at this code and tell me what generation of programming language is used here. It is important that you can EXPLAIN how you came up."— Presentation transcript:
Take a look at this code and tell me what generation of programming language is used here. It is important that you can EXPLAIN how you came up With your answer.
Please get out one piece of paper and something to write with. Once you have done that push your chair in and walk quickly and quietly to the back of the room. Wait there for further instructions.
From our previous lessons it’s clear that computers speak a very unique language. In order for you to have a better appreciation for just what a computer does we are going to learn to speak their language. Their language is called binary.
This activity will help you understand how a computer can use 1’s and 0’s to accomplish so many things. I am going to hand out a set of cards to you and I would like you to use these cards to accomplish one simple task. Find a way that you can use these cards to count from 1 through 31. Please DO NOT share answers outside of your groups.
Each card has one of two values. If it is face up it is a 1 which means it is ‘on’ If it is face down it is a 0 which means it is ‘off’ Let’s take a look at how that works…
What does 00001 represent in binary If you said 1 you are correct but do you understand why? Take a look at the following graphic. Earlier we said that a 0 was ‘off’ that means you simply ignore them. A 1 is ‘on’ which means any card that has a 1 needs to be added to all of the other cards that have a 1 0 0 0 01
Lets try that one more time. 0 1 0 01
Notice the pattern moving from right to left. The first card has a value of 1. The second card has a value of 2 which is twice as large as the previous. The third card has a value of 4 which is twice as large as the previous. See the pattern? 0 0 0 01
Please place the names of every member of your group in the upper right hand corner on one page. Give a title to this page and make it ‘Binary Quiz’ The rules are as follows: You cannot communicate with other groups EVERY MEMBER of your group needs to understand HOW you came up with your answers EVERY MEMBER of your group needs to be able DEMONSTRATE that they can come up with answers on their own
Please answer the following questions on your sheet. Represent the following numbers in binary. 22 10 21 27 31 How many numbers can be represented using the five cards you have. Warning – This is sort of a trick question. Think about it before you write your answer. In our example we had only 5 cards. What would be the largest number you could represent if I gave you 8 cards?
Use what you know to decode the message on the ‘Sending Secret Messages’ worksheet. This homework is due TOMORROW.