Binary
Binary
Data Representation
1.1 Number Systems
Unit
Objectives
Silent Starter 1
n a r y Jo k e :
Famous Bi o f p e o pl e i n
a re 1 0 t y p e s
“There d e r st a n d
– t h o se t h a t u n
world t d o n ’ t ”
y a n d t h o s e t ha
binar
Answer: explain the joke below if you can:
Silen
Star t
ter
Silent Starter 1
Calculate the following into 4 bit binary.
Number (Denary) Binary
10
14
8
4
2 17500 no 0
Divide by Value Remainde Binary
2 no 0 2 r Value
2
2
2
2
2
2
2
2
2
2
2
2
2
Silen 2
Star t
ter 2
Silent Starter 2
Convert the denary number 35000 into a 16-bit binary
number
Divide by Value Remainde Binary
2 r Value
2 35000
2 17500 no 0
Divide by Value Remainde Binary
2 8750 no 0 2 r Value
2 68 no 0
2 4375 no 0
2 34 no 0
2 2187 yes 1
2 17 no 0
2 1093 yes 1
2 8 yes 1
2 546 yes 1
2 4 no 0
2 273 no 0
2 2 no 0
2 136 yes 1
2 1 no 0
Prog
ress 100010001011100 2 0 no 1
Chec
k 0
Keywords: Number Representation
Key Word Definition
Binary a system of numerical notation that has 2 rather than 10 as a base.
Denary less common term for decimal number system.
Hexadecimal relating to or using a system of numerical notation that has 16 rather than
10 as its base.
2’s is the most common method of representing signed integers on computers,
Complement and more generally, fixed point binary values. In this scheme, if the ...
Sign and Sign-magnitude notation is the simplest and one of the most common
Magnitude methods of representing positive and negative numbers either side of zero,
(0). If the sign bit is “0”, this means the number is positive in value. If the
sign bit is “1”, then the number is negative in value.
Underflow the generation of a number that is too small to be represented in the
device meant to store it.
Overflow An error, which can occur when a calculation is run but the computer is
unable to store the answer correctly.
Keyw
o rds
Denary
What is Denary?
Teac
Expl her
anat
i on
Denary
e p re s e nt ed a s 1 010
Te n, c o u ld b e r yste m , u se s 0 , 1, 2,
Denary is a b ase 10 number s bin a tions of
to create a ll c om
3, 4, 5, 6, 7, 8, 9
numbers.
Teac
Expl her
anat
i on
Binary
What is Binary?
Teac
Expl her
anat
i on
Binary
Teac
Expl her
anat
i on
Binary
fo rm s o f d a ta i n
d to re p re s en t al l
Binary - Use in g i s sav e d / t ra n sm i t te d
n a n y th
computers, whe em i t i s d o ne u sin g B i n a r y.
er s ys t
within a comput
Teac
Expl her
anat
i on
Binary to Denary
Th H T U
1000's 100's 10's 1's
5 1 6 7
Teac
Expl her
anat
i on
Binary to Denary
d ou ble to ge t th e next
ow 1, 2, 4 , 8…just
The ‘units’ a re n
number.
8 4 2 1
This is your
binary
number
1 1 0 1
Teac
Expl her
anat
i on
Binary to Denary
128 + 32 + 16 + 8 + 2 18
+1= 7
Teac
Expl her
anat
i on
Binary Bingo
Get your bingo sheets ready….
Task
Binary to Denary Tasks.
1. Convert the 4-bit numbers below into denary – you can use the working area
to help you. The first has been half-completed for you.
11012 8
1
4
1
2
0
1
1
11102 8 4 2 1
00112 8 4 2 1
Task 01102 8 4 2 1
Feedback: Binary to Denary Tasks.
11012 8
1
4
1
2
0
1
1
13
11102 8
1
4
1
2
1
1
0 14
00112 8
0
4
0
2
1
1
1
3
01102 8
0
4
1
2
1
1
0 6
Prog
ress
Chec
k
Binary to Denary Tasks 2a.
1. Convert the 8-bit numbers below into denary – you can use the working area
to help you. The first has been half-completed for you.
1101 12
8
6
4
3
2
1
6
8 4 2 1
01102
12 6 3 1
8 4 2 1
1010 4 2 6
8
11002 12
8
6
4
3
2
1
6
8 4 2 1
0110 12 6 3 1
Task 8 4 2 6
8 4 2 1
11012
Feedback: Binary to Denary Tasks.
1101
214
01102
1010
172
11002
0110
109
Prog
ress
11012
Chec
k
1010
Binary to Denary Tasks 2b.
1. Convert the 8-bit numbers below into denary – you can use the working area
to help you.
0001 12
8
6
4
3
2
1
6
8 4 2 1
01112
12 6 3 1
8 4 2 1
1110 4 2 6
8
10002 12
8
6
4
3
2
1
6
8 4 2 1
1111 12 6 3 1
Task 8 4 2 6
8 4 2 1
11112
Feedback: Binary to Denary Tasks.
0001
23
01112
1110
232
10002
1111
255
Prog
ress
11112
Chec
k
1111
Binary to Denary Tasks Unaided.
1. Convert the 8-bit numbers below into denary – there is no working area for you.
10012 101012
101010
11112
12
101001
00012
12
Task
10100011
100012
Feedback: Binary to Denary Tasks.
10012 9 101012 21
101010
11112 15 86
12
101001
00012 1 83
12
Prog
ress 10100011
Chec
k 100012 17 0
326
Binary to Denary
204
102 0
Presentation
Mode Needed e d e n ary n u m b e r b y 2. If there is a 51 0
Divide th
a in d e r w ri te d o w n 1 by the side. 25 1
rem
o n tin u e u n til z e ro. R ead off the 12 1
If not write a 0. C
rt in g w ith th e la st re mainder.
binary number sta 6 0
3 0
1 1
Always make sure there is a
0. 0 1
Teac
Expl her
anat
i on
Binary to Denary
506
Presentation
253 0
Mode Needed
Convert 506 to binary 126 1
63 0
31 1
1111110 15 1
10 7 1
3 1
1 1
0 1
Teac
Expl her
anat
i on
Binary to Denary
812
406 0
Presentation
Mode Needed 203 0
Convert 812 to binary 101 1
50 1
11001011 25 0
00 12 1
6 0
3 0
1 1
Teac 0 1
Expl her
anat
i on
Binary to Denary
812
406 0
Presentation
Mode Needed 203 0
Convert 812 to binary 101 1
50 1
11001011 25 0
00 12 1
6 0
3 0
1 1
Teac 0 1
Expl her
anat
i on
Task 1: Denary to Binary Tasks - Easy.
27 0
16 13
12 20
Task
29 100
Feedback: Task 1
0001
27 1011
0 0000
0001
16 0000
13 1101
0000 0001
12 1100
20 0100
Prog 0001 0110
Chec
ress
k 29 1101
100 0100
Task 2: Denary to Binary Tasks - Hard.
1232 5901
2109 6902
3012 7080
Task
4991 9533
Feedback: Task 2.
0001
0100 1101 0111
1232 0000 5901 0000
1101
0001
1000 0011 1010
2109 1101 6902 1111
Prog 0110
ress
Chec
k 0001
Binary
Why Binary?
The smallest unit of memory is 1 bit (this is one
binary digit either 1 or a 0)
Teac
Expl her
anat
i on
Binary
8 bits m a ke u p 1 by t e.
E g 1 0 1 0 1 1 0 0 = 1 b y t e
Teac
Expl her
anat
i on
Memory Sizes
Teac
Expl her
anat
i on
Memory Sizes
Teac
Expl her
anat
i on
Memory Sizes
0 0 0 0 0 b y t e s
10 1 0
6=
21 X 1 0 0 0 0 0 0 =
Teac
2 1 0 00 0 0 0
Expl her
anat
i on
Binary in Computers
in a r y h a s tw o u ses:
B
e a s u rin g m e m ory
• It is a way of m
p er form ed / stored in
s / p ro c e s s e s / d a ta are
• All calculation
binary.
r t h in k s in b in a ry only.
t e
Basically a compu
Teac
Expl her
anat
i on
Binary in Computers
1 byte ?? bits
?? bytes 1 kilobyte (kb)
1000 kb ?? Megabyte (mb)
?? mb 1 gigabyte (gb)
Task
1000 gb ?? Terabyte (tb)
Feedback: Task 3
1 byte 8 bits
1000 bytes 1 kilobyte (kb)
1000 kb 1 Megabyte (mb)
1000 mb 1 gigabyte (gb)
1000 gb 1 Terabyte (tb)
Prog
ress
Chec
k
Task 4: Units of Memory - Revisited
1. See how many units of memory and sizes you can remember. Complete all the ??, in the yellow boxes.
Task
Feedback: Task 4
Prog
ress
Chec
k
File Sizes KiB, MiB, GiB
Files sizes are dependant on the amount of data stored for each file, all file sizes
Decima
can be quotes in bits. To convert from bits to bytes you Hex
divide by 8 e.g.
Decimal Hex Decima Hex
Presentation l
l
Mode Needed 7989708900 1 bits
1 = 79897000 / 8 = 998713612.5 bytes.
10 A 19 13
2 2
11 B 20 14
After you have3 the calculated
3 the number of you can then divide by 1024 X times
(X = number of levels you want to12 go to.) C 21 15
4 4
998713612.5 /131024D= 975306.26 22 KiB
16
5 5
How could you 14have
andEdone this23easier? 17
6 6
7
975306.26
7
/
15 1024 F = 952.44 MiB
24 18
What is 88 324 234 bits in (88 324 234 / 8) * (1024 10.5 Mib
MiB ^ 2)
Prog
ress
Chec
k
File Sizes kb, mb, gb
Files sizes are dependant on the amount of data stored for each file,
Decima Hex all file sizes
Decimal
can be quotes in bits.Hex Decima
To convert from bitsHex
to bytes you divide by 8 e.g.
Presentation l
l
Mode Needed 1 1
19 13
798970002 bits
2
10 A
= 79897000 / 8 = 9987125 bytes.
11 B 20 14
3 3
After you have the calculated the 12 number of 21 15
C you can then divide by 1000 X times
(X = number 4of levels 4 you want to go to.) 22 16
13 D
5 5
23 17
9987125
6 How could6 / 1000
14 = E 9987.125
you have done this easier? MiB
24 18
15 and F
7 7
Or you could have just done
8 9987.125 8
16/ 1000 = 9.98 GiB
10
25 19
2. = 26 1A
9987125 / 1000
9 9 9.98
17 11
27 1B
18 12
Teac
Expl her
anat
GiB 28 1C
i on
Task 5b: File Sizes
Answer the file size questions below.
Task
Feedback: Task 5b
Prog
ress
Chec
k
Plenary Task 1
Presentation
u s Q u o te :
Mode Needed Famo o f p e o pl e i n
re 1 0 t y p e s
“There a d e r st a n d
t h o s e t h a t u n
world – t d o n ’ t ”
a n d t h o s e t ha
binary
10 is binary for 2
Plen
a ry
Plenary Task
2a
Presentation
Mode Needed
Plen
a ry
Plenary Task
2b
Presentation
Mode Needed
Plen
a ry
Plenary Feedback Task 2a+b
Prog
ress
Chec
k
Past Paper Question 1
Task
Feedback: Past Paper Q1
Prog
ress
Chec
k
Past Paper Question 2
Task
Feedback: Past Paper Q2
Prog
ress
Chec
k
Past Paper Question 3
Task
Feedback: Past Paper Q3
Prog
ress
Chec
k
Past Paper Question 4
Task
Feedback: Past Paper Q4
Prog
ress
Chec
k
Past Paper Question 5
Task
Feedback: Past Paper Q5
Prog
ress
Chec
k
Past Paper Question 6
Task
Feedback: Past Paper Q6
Prog
ress
Chec
k
Past Paper Question 7
Task
Feedback: Past Paper Q7
Prog
ress
Chec
k