0% found this document useful (0 votes)
9 views73 pages

Binary

The document covers data representation, focusing on number systems such as binary, denary, and hexadecimal. It includes exercises for converting between denary and binary, along with definitions of key terms like overflow and underflow. Additionally, it provides techniques for converting binary numbers to denary and vice versa, along with feedback on tasks completed.

Uploaded by

sm0004837
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views73 pages

Binary

The document covers data representation, focusing on number systems such as binary, denary, and hexadecimal. It includes exercises for converting between denary and binary, along with definitions of key terms like overflow and underflow. Additionally, it provides techniques for converting binary numbers to denary and vice versa, along with feedback on tasks completed.

Uploaded by

sm0004837
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 73

1.

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

Calculate the following 4 bit binary in to


denary..
Binary Denary
1011
1111
0110
Silen
Star t 0010
ter
Silent Starter 1
Calculate the following into 4 bit binary.
Number (Denary) Binary
10 1010
14 1110
8 1000
4 0100

Calculate the following 4 bit binary in to


denary..
Binary Denary
1011 11
1111 15
Prog 0110 6
ress
Chec 0010 2
k
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 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

s y ste m w h ich o nly


a ba se 2 n u mber
It is re p re sen t
uses 1 and 0 to
e r c o m bin a tio n s.
b
all possible num
sen ted a s 10102
, co u l d be repre
Ten

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

a t e ch n iqu e sim ilar


u w il l n e e d to us e
d er , y o n ds,
Useful remin sc h o ols math s – w ith T h ou s a
d in e a rly
to the one use
d reds , Ten s , U n its
Hun

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

Presentation How do you convert 1101 to decimal


Mode Needed (denary)
8 4 2 1
1 1 0 1
Technique – add all the numbers with a 1 underneath
them
8+4+1 1
=? 3
Teac
Expl her
anat
i on
Binary to Denary

Presentation How do you convert 10101110 to decimal


Mode Needed (denary)
12 64 32 16 8 4 2 1
8
1 0 1 0 1 1 1 0
128 + 32 + 8 + 4 17
+2= 4
Teac
Expl her
anat
i on
Binary to Denary

Presentation How do you convert 10101110 to decimal


Mode Needed (denary)
128 64 32 16 8 4 2 1
1 0 1 1 1 0 1 1

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.

Number to Convert Working Area Final Answer

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.

Number to Convert Working Area Final Answer

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.

Number to Convert Working Area Final Answer

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.

Number to Convert Working Area Final Answer

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.

Number to Convert Working Area Final Answer

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.

Number to Convert Working Area Final Answer

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.

Number to Convert Final Answer Number to Convert Final Answer

10012 101012
101010
11112
12
101001
00012
12
Task
10100011
100012
Feedback: Binary to Denary Tasks.

Number to Convert Final Answer Number to Convert Final Answer

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.

1. Convert the following denary numbers to binary. Truncate to 4 or 8 bits.

Number to Convert Final Answer Number to Convert Final Answer

27 0
16 13
12 20

Task
29 100
Feedback: Task 1

Number to Convert Final Answer Number to Convert Final Answer

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.

1. Convert the following denary numbers to binary.

Number to Convert Final Answer Number to Convert Final Answer

1232 5901
2109 6902
3012 7080

Task
4991 9533
Feedback: Task 2.

Number to Convert Final Answer Number to Convert Final Answer

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

Unit of How many bits / bytes Value in


Memory etc.??? Bytes
1 byte 8 bits
1000 bytes 1 Kilobyte (kb) 103
1000 kb 1 Megabytes (mb) 106
1000 mb 1 Gigabyte (gb) 108
1000 gb 1 Terabyte (tb) 1012
1000 tb 1 Petabyte (pb) 1015
1000 pb 1 Exabyte (eb) 1018
Teac
Expl her
anat
i on
Memory Sizes

Unit of How many bits / bytes Value in


Memory etc.??? bytes?
1 byte 8 bits
1024 bytes 1 Kibibyte (KiB) 210
1024 KiB 1 Mebibytes (MiB) 220
1024 MiB 1 Gibibyte (GiB) 230
1024 GiB 1 Tebibyte (TiB) 240
1024 TiB 1 Pebibyte (PiB) 250
1024 PiB 1 Exbibyte (EiB) 260
Teac
Expl her
anat
i on
Memory Sizes

How many bytes in 1


GibiByte?
30 = 10 7 3 7 4 1 8 2 4
2
bytes

Teac
Expl her
anat
i on
Memory Sizes

How many bytes in 5


GibiBytes?
10
30 = 7 3 7 4 1 8 2 4
2
bytes
0 3 7 7 4 1 8 24 =
5X1
9 1 2 0 b y tes
5 18 8 70
Teac
Expl her
anat
i on
Memory Sizes

How many bytes into 1


Terabyte?
0 0 0 0 0 0 0 0
12 =
10 1 00 0 0
bytes

Teac
Expl her
anat
i on
Memory Sizes

How many bytes into 21


Megabytes?

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

Exam board want you to be able to do 16 bits


max.
Teac
Expl her
anat
i on
Task 3: Units of Memory - Revisited
1. See how many units of memory and sizes you can remember. Complete all the ??, in the yellow boxes.

Unit of Memory Final Answer

1 byte ?? bits
?? bytes 1 kilobyte (kb)
1000 kb ?? Megabyte (mb)
?? mb 1 gigabyte (gb)
Task
1000 gb ?? Terabyte (tb)
Feedback: Task 3

Unit of Memory Final Answer

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.

Unit of How many bits / How many


Memory bytes etc.??? bytes?
1 byte ?? bits
?? bytes 1 Kibibyte (KiB) 210
1024 KiB ? Mebibyte (MiB) 2??
??? MiB 1 Gibibyte (GiB) 2??
1024 GiB ?? Tebibyte (Tib) 2??

Task
Feedback: Task 4

Unit of How many bits / How many


Memory bytes etc.??? bytes?
1 byte 8 bits
1024 bytes 1 Kibibyte (KiB) 210
1024 KiB 1 Mebibyte (MiB) 220
1024 MiB 1 Gibibyte (GiB) 230
1024 GiB 1 Tebibyte (Tib) 240

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

Or you could have just done


8 8
16 and 10
25 19
26 1A
9 952.44
998713612.5 / 1024 0.9
9 /
17 1024 11 = 0.9 Tib 3 =
27 1B
Teac 18 12
Expl her
anat
GiB 28 1C
i on
Task 5a: File Sizes
Answer the file size questions below.

Question Equation Used Answer

What is 80Gib in bytes?

What is 900MiB in KiBibytes?

What is 123456546 bytes in


Mib

What is 1TiB in kibibytes?

Task What is 324234 bits in MiB


Feedback: Task 5a
Question Equation Used Answer
85 899 345 920 bytes
What is 80Gib in bytes? 80 * (1024 ^ 3)

What is 900MiB in 921 600 KiBibytes


900 * 1024
KiBibytes?
What is 123 456 546 bytes (123 456 546 / 8) * 117.74 MiBibytes
in Mib 1024 ^ 2
1 048 576 KibiBytes
What is 1TiB in KiBibytes? 1 *(1024 ^ 3)

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.

Question Equation Used Answer


What is 80gb in bytes?

What is 900mb in kilobytes?


What is 123 456 546 bytes in
mb
What is 1Tb in kilobytes?

What is 88324234 bits in mb

Task
Feedback: Task 5b

Question Equation Used Answer


What is 80gb in bytes? 80 * (1000 ^ 3) 80 000 000 000 bytes

What is 900mb in kilobytes? 900 * 1000 900 000 kb


What is 123 456 546 bytes in
123 456 546 / (1000 ^ 2) 123.45 mb
mb
What is 1Tb in kilobytes? 1 * (1000 ^ 3) 1 000 000 000 kb

What is 88324234 bits in mb (88324234 / 8) / (1024 ^ 2) 10.5mb

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

You might also like