T1 Units and binary numbers
T1 Units and binary numbers
Starter
• What is this symbol?
• What numbers is it
made from?
• How many states does
it control?
Storage units and binary numbers
Unit 2 Data
Understanding binary
• Computers understand only two states: power on, or
power off
• This is represented by
switches, and computers
are essentially calculators
made up of billions
of switches
• Power on = 1
• Power off = 0
Storage units and binary numbers
Unit 2 Data
Creating a circuit
• Computers comprise billions of switches to turn
current on and off
Storage units and binary numbers
Unit 2 Data
Circuits
• Use the keywords below to explain how this
electrical circuit works:
+
_
Units
• One suggestion
• Kites – kilo
• Make - mega
• Great – giga
• Toys – tera
Storage units and binary numbers
Unit 2 Data
A sense of scale
File Size
One character of text 1 byte
A full page of text 30 KiB
One small digital colour photograph 3 MiB
Music CD capacity 650 MiB
DVD capacity 4.5 GiB
Hard disk capacity 1 TiB
Storage units and binary numbers
Unit 2 Data
Binary representation
• How many combinations or states can each of the
number of switches given produce?
Number of Switches (Bits) Possible combinations or states
1 2
2 4
3
4
5
6
7
8
Storage units and binary numbers
Unit 2 Data
Binary representation
Number of Switches (Bits) Possible combinations or states
1 2
2 4
3 8
4 16
5 32
6 64
7 128
8 256
Storage units and binary numbers
Unit 2 Data
1000 100 10 1
2 7 0 3
2x1000 + 7x100 + 0x10 + 3x1 = 2703
Storage units and binary numbers
Unit 2 Data
128 64 32 16 8 4 2 1
1 0 0 1 0 1 1 0
1x128 + 1x16 + 1x4 + 1x2 =?
Storage units and binary numbers
Unit 2 Data
128 64 32 16 8 4 2 1
0 0 1 1 1 0 0 1
Storage units and binary numbers
Unit 2 Data
128 64 32 16 8 4 2 1
1 0 0 1 1 1 0 1
Storage units and binary numbers
Unit 2 Data
Representing values
• Consider the same byte value 0011 1001
• This is represented in denary as 57
• As an electrical circuit this could be represented as:
0 0 1 1 1 0 0 1
Storage units and binary numbers
Unit 2 Data
Worksheet 1
• Complete Task 1 on Worksheet 1
Storage units and binary numbers
Unit 2 Data
Denary to binary
• How do you convert 28 to binary?
• Method
• Working right to left, write out the numbers 1, 2, 4, 8 and so
on, doubling each time to 128
128 64 32 16 8 4 2 1
0 0 0 1 1 1 0 0
• 128, 64 and 32 are all greater than 28, so put a zero for these
• Put a 1 in the 16 column, 28-16=12
• Put a 1 in the 8 column, 12-8 = 4
• Put a 1 in the 4 column, 4-4=0 so put zero in other columns
Storage units and binary numbers
Unit 2 Data
28 – 1 = 255
• What is the largest number that can be held in 16 bits?
• What is the largest number that can be held in 32 bits?
Storage units and binary numbers
Unit 2 Data
Larger numbers
• The largest number that can be held with 16 bits is:
• 216 – 1 =
• 65 536 – 1 =
• 65 535
• (The range of numbers from 0 to 65 535 can be stored in a
16 bit number)
• The largest number that can be held with 32 bits is:
• 232 – 1 =
• 4 294 967 296 – 1 =
• 4 294 967 295
Storage units and binary numbers
Unit 2 Data
Worksheet 1
• Complete Task 2 on Worksheet 1
Storage units and binary numbers
Unit 2 Data
Plenary
• In pairs:
• Which numbers are stored in one bit?
• How many bits are there in a nibble and a byte?
• What are the units after a kibibyte?
• What is zero in binary?
• What is 255 in binary?
• What is 39 in binary?
Storage units and binary numbers
Unit 2 Data
Plenary
• In pairs:
• Which numbers are stored in one bit? 0 and 1
• How many bits are there in a nibble and a byte?
Nibble = 4 bits, byte = 8 bits
• What are the units after a kibibyte?
mebibyte, gibibyte, tebibyte
• What is zero as an 8 bit binary number? 0000 0000
• What is 255 in binary? 1111 1111
• What is 39 as an 8 bit binary number? 0010 0111
Storage units and binary numbers
Unit 2 Data
Copyright
This unit and all the worksheets, PowerPoint presentations, teaching guides and other associated files
distributed with it are supplied to you by PG Online Limited under licence and may be used and copied by you
only in accordance with the terms of the licence. Except as expressly permitted by the licence, no part of the
materials distributed with this unit may be used, reproduced, stored in a retrieval system, or transmitted, in any
form or by any means, electronic or otherwise, without the prior written permission of PG Online Limited.
Licence agreement
This is a legal agreement between you, the end user, and PG Online Limited. This unit and all the worksheets,
PowerPoint presentations, teaching guides and other associated files distributed with it is licensed, not sold, to
you by PG Online Limited for use under the terms of the licence.
The materials distributed with this unit may be freely copied and used by members of a single institution on a
single site only. You are not permitted to share in any way any of the materials or part of the materials with any
third party, including users on another site or individuals who are members of a separate institution. You
acknowledge that the materials must remain with you, the licencing institution, and no part of the materials may
be transferred to another institution. You also agree not to procure, authorise, encourage, facilitate or enable any
third party to reproduce these materials in whole or in part without the prior permission of PG Online Limited.