CSP Number Systems Mrs., GA Lesson Overview Learning Objectives and Evidence Statements 2.1.2 Explain how binary sequences are used to represent digital data. [P5] Prerequisite knowledge Students should have a good understanding of how our decimal number system works as well as understand place value. Essential/Guiding Question(s) Indicate the guiding questions that will lead students to the learning objectives indicated above. For example: How do we use electricity to make decisions? How does a computer use number systems to understand commands? How can we convert binary numbers to decimal numbers and decimal number to binary numbers? How can we apply what we know about binary numbers to other number systems that the computer may use, like Octal and Hexadecimal? How can we apply the principles of abstraction and develop an algorithm that can be used to convert any base number system to decimal? Lesson Summary You will learn how the computer represents and stores information using the binary number system. In addition we will work on how we convert between these two systems. After students become comfortable with conversions, this knowledge will be extended and applied to other number systems. Students will conclude this section with a project where they have developed their own number system. A quiz on number conversions will also be given. Outline of lesson Provide an outline of each part of the instructional day(s) needed for the lesson, including approximate timing for each part of the lesson. For example: Introduce the binary numbers and their conversions (40 minutes) Cisco Binary Game(15 minutes) Introduce Octal and Hexadecimal numbers (40 minutes) Develop Algorithm and Share (40 minutes) Number systems project (1 day)
Lesson Details Student Activities Students will apply what they know about how our decimal number system works as well as place value to the binary number system. Students will spend time practicing converting between binary and decimal and back again. A good resource for practicing binary number conversions is the Cisco Binary Game. Once students are comfortable converting from binary to decimal and back, new systems will be introduced such as octal and hexadecimal. Students will also consult the ASCII chart to see how these different number systems are used to represent the symbols on the keyboard. Students will spend time in groups developing an algorithm that can be used to convert between any base system and our decimal number system. These algorithms will be presented and shared with another group for feedback. Students will then work to develop their own number system, and include examples of how to convert between their system and the decimal number system and back again. Teaching and Learning Strategies Provide a detailed description of what teachers will be doing in all parts of the lesson, and suggestions on instructional and classroom practices. This should include: Introduction of binary numbers: What are binary numbers? Why do we use them? (Electric circuits) Remind students how to write decimal numbers in expanded form and discuss place value. Ask them if they know what base system we use? Do the students know of any other number systems? Binary numbers are base 2 system: What would the place values be for a system that is base 2? How many different combinations are in 2 bits? 3 bits? 8 bits? Convert from Binary to Decimal using place values Convert from Decimal to Binary using place values Discussion Questions: What if we have a very large decimal number we want to convert to binary? Students should play the Cisco binary game to provide significant practice. Quick Quiz: Binary and Decimal conversions Extend what was learned the previous day to Octal and Hexadecimal number systems Students can work on the mixed review practice worksheet Using binary to solve problems the evil king problem Students should pair up to develop an algorithm to convert any number system to decimal and back. Students share with another group to get feedback. Students work on their number systems project.
Appendices Materials and Resources Provide any student handouts, instructional documents, or other materials needed for the lesson. Items to be distributed to students should be labeled as Handouts ; other items that are primarily supporting items for teacher use, such as lists of lesson materials or instructional notes, should be labeled as Instructional Resources. Quick Quiz for Binary and Decimal Conversions Practice worksheet on Binary, Octal, Hexadecimal and Decimal number conversions Binary Puzzle Number Systems Project outline Supplemental Resources When appropriate, include a list of resources that support these instructional and student activities, along with a brief note explaining how the resources might be helpful with the associated activity. Cisco Binary Numbers Game - http://forums.cisco.com/certcom/game/binary_game_page.htm Binary Card Rebecca Dovi s picture dated 9/20/11- http://hcps.us/phhs/comsci/cs_principles_year_2.htm Practice it number conversions - http://practiceit.cs.washington.edu/ Levitin A and Levitin M. Algorithmic Puzzles, Oxford University Press, Inc, 2011
Name: CSP Binary Numbers Quiz Fill in the place values above the following binary number. Then convert the following from binary to decimal. 1. 2. 1 1 0 0 0 0 1 1 = 3. 0 1 0 1 1 1 0 0 = 4. 1 1 1 1 0 0 1 0 = 5. 0 0 0 0 1 1 0 0 = Convert the following from decimal to binary. 6. 123 7. 77 8. 210 9. 235 10. Write your age in binary and decimal.
Number Conversions Mixed Practice 1. is a number system that only uses the digits 0 and 1 and powers of 2. 2. is a number system that uses the digits 0 7 and the powers of 8. 3. is a number system that uses the digits 0-9 along with the letters A F and the powers of 16. 4. is a number system that uses the digits 0-9 and powers of 10. 5. Write 75 10 in binary 6. Write 102 10 in binary 7. Write 3B 16 in decimal 8. Write AC 16 in decimal 9. Write 00110001 2 in decimal 10. Write 10101110 2 in decimal 11. Write 67 8 in decimal 12. Write 123 8 in decimal 13. Write 0010 2 in Octal 14. Write 23 8 in binary
15. Write 11 16 in binary 16. Write E8 16 in octal 17. Write 103 10 in octal 18. Write 25 10 in hexadecimal 19. Write 45 10 in octal 20. Write 200 10 in hexadecimal
Binary Puzzle An evil king is informed that one of his 1000 barrels of lemonade has been poisoned. The poison is so potent that a miniscule amount of it, no matter how diluted, kills a person in exactly 30 days. The king is prepared to sacrifice 10 of his slaves to determine the poisoned barrel. a. Can this be done before a feast scheduled in 5 weeks? b. Can the king achieve his goal with just eight slaves? How can we utilize the binary number system to solve this puzzle? Draw an illustration and thoroughly explain your answer. Puzzle taken from: Levitin A and Levitin M. Algorithmic Puzzles, Oxford University Press, Inc, 2011
Number Systems Project Outline Apply the algorithm you have created and what you have learned about Binary, Octal, and Hexadecimal number systems to another base system. Your project should address the following: 1. A name for your system 2. The systems base 3. How we convert values from this base into the decimal number system 4. How we convert values from decimal into this base 5. Examples of how to convert from base to decimal and back again are included You may present your project in any medium.
Name: Answer Key CSP Binary Numbers Quiz Fill in the place values above the following binary number. Then convert the following from binary to decimal. 1. 128 64 32 16 8 4 2 1 2. 1 1 0 0 0 0 1 1 = 128 64 2 1 195 3. 0 1 64 0 1 16 1 8 1 4 0 0 = 92 4. 1 1 1 1 0 0 1 0 = 128 64 32 16 2 242 5. 0 0 0 0 1 8 1 4 0 0 = 12 Convert the following from decimal to binary. 6. 123 64 + 32 + 16 + 8 + 2 + 1 0111 1011 8. 210 128 + 64 + 16 + 2 1101 0010 7. 77 64 + 8 + 4 +1 0100 1101 9. 235 128 + 64 + 32 + 8 + 2 + 1 1110 1011 10. Write your age in binary and decimal. Answers will vary
Name: Answer Key CSP - Number Conversions Mixed Practice 1. binary is a number system that only uses the digits 0 and 1 and powers of 2. 2. _octal is a number system that uses the digits 0 7 and the powers of 8. 3. hexadecimal is a number system that uses the digits 0-9 along with the letters A F and the powers of 16. 4. decimal is a number system that uses the digits 0-9 and powers of 10. 5. Write 75 10 in binary 64 + 8 + 2 + 1 = 0100 1011 6. Write 102 10 in binary 64 + 32 + 4 + 2= 0110 0110 7. Write 3B 16 in decimal 3*16 + 11 = 48 + 11 = 59 8. Write AC 16 in decimal 10 * 16 + 12 = 160 + 12 = 172 9. Write 00110001 2 in decimal 32 + 16 + 1 = 49 10. Write 10101110 2 in decimal 128 + 32 + 8 + 4 + 2 = 174 11. Write 67 8 in decimal 6 * 8 + 7 = 48 + 7 = 55 12. Write 123 8 in decimal 64 + 2 * 8 + 3 = 64 + 16 + 3 = 83 13. Write 0010 2 in Octal 0010 2 = 2 10 = 2 8 14. Write 23 8 in binary 2 * 8 + 3 = 16 + 3 = 19 10 16 + 2 + 1 = 0001 0011 2
15. Write 11 16 in binary 16 + 1 = 0001 0001 2 16. Write E8 16 in octal 14 * 16 + 8 = 224 + 8 = 232 10 128 + 64 + 32 + 8 = 1110 1000 17. Write 103 10 in octal 64 + 4 * 8 + 7 147 8 18. Write 25 10 in hexadecimal 16 + 9 = 19 16 19. Write 45 10 in octal 5 * 8 + 5 = 55 8 20. Write 200 10 in hexadecimal 12 * 16 + 8 = C8 16
Binary Puzzle Answer Key An evil king is informed that one of his 1000 barrels of lemonade has been poisoned. The poison is so potent that a miniscule amount of it, no matter how diluted, kills a person in exactly 30 days. The king is prepared to sacrifice 10 of his subjects to determine the poisoned barrel. a. Can this be done before a feast scheduled in 5 weeks? b. Can the king achieve his goal with just eight subjects? How can we utilize the binary number system to solve this puzzle? Draw an illustration and thoroughly explain your answer. a. 1000 10 = 512 + 256 + 128 + 64 + 32 + 8 = 11 1110 1000 2 Assign a place value to each subject. Have them mix a cocktail of from all lemonade barrels with a 1 in their place value. So 1s place value subject will make a lemonade drink will all the odd barrels. If he dies, we know that the poisoned barrel is odd. However, if he is still alive after 30 days, the poisoned barrel is even. This will eliminate ½ of the barrels. If a subject dies that means the barrel number has a 1 in that place value. We can construct the barrel number by using the pace values of the subjects that have died. b. If we have 8 subjects the largest binary number we can represent it 256. If we divided the barrels into 4 groups of 250, we could test the barrels using 8 subjects, and have them drink from the different groups each day in 4 consecutive days. If they die on day 30, the poison barrel is in the first group and we can figure out the number using place value as we did in part a. If they die on day 31, then the poisoned barrel is in the 2nd group and so on. Puzzle taken from: Levitin A and Levitin M. Algorithmic Puzzles, Oxford University Press, Inc, 2011
Number System Project Rubric Algorithm for converting bases to decimal and base is correct 20 points Students system: name 5 points base 5 points digits used in representing system 5 points Students correctly state how to convert from their base to 10 points decimal Students correctly state how to convert from decimal to their 10 points base Examples: at least 2 base to decimal examples 10 points at least 2 decimal to base examples 10 points Presentation is creative and thorough Total 25 points 100 points