LO To learn basic computer coding using binary Applied maths- coding LO To learn basic computer coding using binary Col 1 2 3 4 5 16 8 17 9 18 10 6 19 11 7 20 12 21 13 22 14 23 15 24 25 26 27 28 29 30 31 Pick a number 1 to 31 and tell me in which columns your number is present in the grid. Be careful to check all columns. Example – No. 23 is in columns 1, 3, 4 & 5. Ask all pupils to think of a number and write it down on their MWB. Choose a few pupils at random and show how you can find their number. Ask them to show MWB to class to confirm.
Only 4 columns here Can you spot the trick now? How does this work? Only 4 columns here Can you spot the trick now? Pick a number 1 to 15 and tell me in which columns your number is present in the grid. 8 4 2 1 9 5 3 10 6 11 7 12 13 14 15 Col 1 2 3 4 8 9 5 10 6 11 7 12 13 14 15 Tell me the number at the top of each column where your number is present. Any ideas?
So this is how the game is played:- Explanation So this is how the game is played:- 8 4 2 1 9 5 3 10 6 11 7 12 13 14 15 Pick a number - 6 At the top of the columns where 6 is present we have 4 & 2. 4 + 2 = 6
Your turn Now you can impress your friends with this trick! Looking at the top two rows we see: Pick a number - 𝒙 𝒙 is in columns 1, 3, 4 & 5. A bit of practice needed to remember the top row numbers 16 + 4 + 2 + 1 = 23 Col 1 2 3 4 5 16 8 17 9 18 10 6 19 11 7 20 12 21 13 22 14 23 15 24 25 26 27 28 29 30 31 Col 1 2 3 4 5 16 8 Now you can impress your friends with this trick!
Binary Code 0100001001101001011011100110000101110010011110010010000001000011011011110110010001100101 Computers are not as smart as you think, in fact, they only know 2 things… 0 and 1 Everything else is told to the computer by a human, this is called programming.
For a computer 0 means turn a circuit off 1 means turn a circuit on Computers have millions of tiny circuits inside. For a computer 0 means turn a circuit off 1 means turn a circuit on
Humans need to learn the computer’s language to be able to tell computers what to do. Computer language is Binary. Here is an example of what binary code looks like: 0101010001101000011010010111001100100000011010010111001100100000011001010110000101110011011110010000110100001010
The computer can only use 0s and 1s Denary (our numbers) Binary 1 2 10 3 11 4 100 5 101 6 110 7 111 8 1000 9 1001 1010 1011 12 1100 The computer can only use 0s and 1s So for a computer numbers go like is this…
Denary numbers – keep doubling! Method Denary numbers – keep doubling! Make a table like this.. 128 64 32 16 8 4 2 1 To make the number 5, place a 1 under the numbers that you need and a 0 under the numbers that you don’t… 128 64 32 16 8 4 2 1 This is Binary
So 5 for us, is 00000101 for the computer 128 64 32 16 8 4 2 1 We can forget the first few 0s and our binary number 5 looks like this… 101
Convert binary to denary digits ACTIVITY Convert binary to denary digits a) 128 64 32 16 8 4 2 1 b) 128 64 32 16 8 4 2 1 c) 128 64 32 16 8 4 2 1
Convert binary to denary digits ACTIVITY Convert binary to denary digits a) 128 64 32 16 8 4 2 1 64 + 2 = 66
Convert binary to denary digits ACTIVITY Convert binary to denary digits b) 128 64 32 16 8 4 2 1 32 + 4 + 1 = 37
Convert binary to denary digits ACTIVITY Convert binary to denary digits c) 128 64 32 16 8 4 2 1 128 + 1 = 129
ACTIVITY 1. Show your shoe size in binary 2. Show the date of the month you were born in binary 3. Show your age in binary 4. Show your height in cm in binary 5. Show the amount of siblings you have in binary 6. Show your house number in binary
give your partner any number under 255 ACTIVITY Working in pairs; give your partner any number under 255 see if they can convert it into binary. >>>EXT Is there any number that CAN’T be made? Additional discussion points could examine why I have asked them to choose a number less than 255.
Use your table to convert these numbers to binary: ACTIVITY 3 2 6 10 17 20 42 47 71 146 255 Use your table to convert these numbers to binary: >>>EXT:
>>>EXT: Answers 3 2 6 10 17 20 42 47 71 146 255 11 10 110 6 10 17 20 42 47 71 146 255 11 10 110 1010 10001 10100 101010 101111 1000111 10010010 11111111 >>>EXT:
Convert these binary numbers into denary ACTIVITY Convert these binary numbers into denary a) 00011000 b) 00000101 c) 00010110 d) 01101011 e) 01111000 f) 10100100 g) 10100101 h) 10111100 i) 11010111 j) 11100110 k) 11111010
Answers 24 00011000 5 00000101 22 00010110 107 01101011 120 01111000 164 10100100 165 10100101 188 10111100 215 11010111 230 11100110 250 11111010
11001% of people in the world do not have access to a mobile phone. ACTIVITY De-code the following: 11001% of people in the world do not have access to a mobile phone. Gorillas sleep as much as 1110 hours per day. You can tell the sex of a horse by its teeth. Most males have 101000, females have 100100. On average, 1100 newborns will be given to the wrong parents daily. A giraffe can clean its ears with its 10101 inch tongue! A man named Charles Osborne had the hiccups for 1000101 years!
25% of people in the world do not have access to a mobile phone . Answers De-code the following: 25% of people in the world do not have access to a mobile phone . Gorillas sleep as much as fourteen hours per day. You can tell the sex of a horse by its teeth. Most males have 40, females have 36. On average, 12 newborns will be given to the wrong parents daily. A giraffe can clean its ears with its 21 inch tongue! A man named Charles Osborne had the hiccups for 69 years!
GAME Try playing this Cisco games in groups alongside coding competing against each other for highest score. http://forums.cisco.com/CertCom/game/binary_game_page.htm
Discussion as to how this joke works.
Binary code is not just about numbers Binary code is not just about numbers. Every number, letter and symbol on your keyboard needs to be converted into binary so the computer can understand it. We can see all these conversions in something called an ASCII table.
From the ASCII table… Symbol Decimal Binary A 65 01000001 B 66 01000010 C 67 01000011 D 68 01000100 E 69 01000101 F 70 01000110 G 71 01000111 H 72 01001000 I 73 01001001 J 74 01001010 K 75 01001011 L 76 01001100 M 77 01001101 N 78 01001110 O 79 01001111 P 80 01010000 Q 81 01010001 R 82 01010010 S 83 01010011 T 84 01010100 U 85 01010101 V 86 01010110 W 87 01010111 X 88 01011000 Y 89 01011001 Z 90 01011010 Symbol Decimal Binary a 97 01100001 b 98 01100010 c 99 01100011 d 100 01100100 e 101 01100101 f 102 01100110 g 103 01100111 h 104 01101000 i 105 01101001 j 106 01101010 k 107 01101011 l 108 01101100 m 109 01101101 n 110 01101110 o 111 01101111 p 112 01110000 q 113 01110001 r 114 01110010 s 115 01110011 t 116 01110100 u 117 01110101 v 118 01110110 w 119 01110111 x 120 01111000 y 121 01111001 z 122 01111010 From the ASCII table…
You can write your name in binary… H a n n a h 010010000110000101101110011011100110000101001000
Every time you type a letter on your keyboard, the computer understands is as loads of 0s and 1s! Here are some other characters you might need from the ASCII table…
Symbol Decimal Binary Space 32 00100000 ! 33 00100001 " 34 00100010 # 35 00100011 $ 36 00100100 % 37 00100101 & 38 00100110 ' 39 00100111 ( 40 00101000 ) 41 00101001 * 42 00101010 + 43 00101011 , 44 00101100 - 45 00101101 . 46 00101110 / 47 00101111 : 58 00111010 ; 59 00111011 < 60 00111100 = 61 00111101 > 62 00111110 ? 63 00111111 Symbol Decimal Binary @ 64 01000000 [ 91 01011011 \ 92 01011100 ] 93 01011101 ^ 94 01011110 _ 95 01011111 ` 96 01100000 { 123 01111011 ¦ 124 01111100 } 125 01111101 ~ 126 01111110
Decode this message: 010010010110011000100000011110010110111101110101001000000110001101100001011011100010000001110010011001010110000101100100001000000111010001101000011010010111001100100000011110010110111101110101001000000110100001100001011101100110010100100000011000110111001001100001011000110110101101100101011001000010000001100010011010010110111001100001011100100111100100100001 Message reads: If you can read this you have cracked binary! Encode a personalised message here http://www.roubaixinteractive.com/PlayGround/Binary_Conversion/Binary_To_Text.asp