Teaching Computing at KS3 Session 2 Sue Sentance and Sophie Baker
From the CAS curriculum KEY STAGE 2 Introduction to binary representation [representing names, objects or ideas as sequences of 0s and 1s]. KEY STAGE 3 Introduction to binary manipulation. Representations of unsigned integers
Today’s session 5:00 – 6:00 Binary numbers – converting between denary and binary 6.00 – 7.00 Programming in Scratch
Storing Binary Numbers Inside the computer each binary digit is stored in a unit called a bit. A series of 8 bits is called a byte. A bit can take the values 0 and 1
What is meant by? 1 byte ? 1 nibble ? 1 kilobyte ? 1 megabyte ? 1 gigabyte ? 1 terabyte ?
Storing data 1 byte = 8 bits 1 nibble = 4 bits 1 kilobyte = 1024 bytes = 2 10 bytes 1 megabyte = 2 20 bytes = 2 10 kilobytes 1 gigabyte = 2 30 bytes = 2 10 megabytes 1 terabyte = 2 40 bytes = 2 10 gigabytes 1 byte 1 nibble 1 kilobyte 1 megabyte 1 gigabyte 1 terabyte
Learning binary numbers Converting binary to denary Converting denary to binary
Number Bases Base 10 (Denary) 10 different symbols to represent values: Values greater than 9 are represented using the place value convention: 100s 10s 1s = 3x x10 + 7x1 ie. Three hundred and fifty seven Base 2 (Binary) 2 different symbols to represent values: 0 1 Values greater than 1 are represented using the place value convention: 8s 4s 2s 1s = 1x8 + 1x4 + 0x2 + 1x1 =Thirteen
Binary numbers 0
1
Activity Binary counting exercise
How to convert Binary Numbers to denary = 10 in Denary Place values
How to convert Binary Numbers to denary = 155 in Denary Place values
Converting binary to denary Convert the binary number into denary: Answer = = 183
Conversion Exercise Convert the following binary numbers into denary:
Conversion Exercise Convert the following binary numbers into denary: Answers in red:
Teaching binary Holding cards up activity Finger binary Cisco binary game Cisco binary game CS Unplugged actitivies CS Unplugged actitivies
Converting Denary to Binary Write down the column headings for the binary number: Process each column from left to right. If the denary number to be translated is greater than or equal to the column heading, place a 1 in the column and subtract the value of the column from the denary value. If the denary value is smaller than the column heading, place a 0 in the column.
Example Convert 27: 27 < 64, so 0 into 64-column < 32, so 0 into 32-column 0 27 > 16, so 1 into 16-column, new value = 27 – 16 = > 8, so 1 into 8-column, new value = 11 – 8 = < 4, so 0 into 4-column 0 3 > 2, so 1 into 2-column, new value = 3 – 2 = = 1, so 1 into 1-column 1
Storing Numbers - Binary EXAMPLE Convert the denary number 227 into binary:
Convert to Binary
Convert to Binary
Summary – why teach binary? Binary is a set of instructions used to control the computer, and works with 1s and 0s The computer understands them as on or off signals. If the decimal system were used, there would need to be 10 different voltages, in which case there'd be more room for error with resistors etc., and therefore more room for corruption of data. Today, the elementary building block for all modern computer systems is the transistor. A transistor is simply a switch, much like the light switch mentioned earlier. A transistor can be in an off state, which does not allow electricity to flow, or in an on state, in which electricity can pass unimpeded. A transistor is a solid-state device that has no mechanical or moving parts. The switching of a transistor from the off state to the on state, or vice versa, is done electronically rather than mechanically. This allows it to be fast as well as extremely small. So learning binary helps students to understand how a computer works