0% found this document useful (0 votes)
327 views96 pages

1.1 Data Representation Workbook by Inqilab Patel

Uploaded by

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

1.1 Data Representation Workbook by Inqilab Patel

Uploaded by

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

2|Page

3|Page

Syllabus content & assessment at a glance


Sections Topics
Section 1 Theory of Computer Science
1.1 Data representation
1.1.1 Binary systems
1.1.2 Hexadecimal
1.1.3 Data storage
1.2 Communication and Internet technologies
1.2.1 Data transmission
1.2.2 Security aspects
1.2.3 Internet principles of operation
1.3 Hardware and software
1.3.1 Logic gates
1.3.2Computer architecture and the fetch-execute cycle
1.3.3 Input devices
1.3.4 Output devices
1.3.5 Memory, storage devices and media
1.3.6 Operating systems
1.3.7High- and low-level languages and their translators
1.4 Security
1.5 Ethics
Section 2 Practical Problem-solving and Programming
2.1 Algorithm design and problem-solving
2.1.1 Problem-solving and design
2.1.2 Pseudocode and flowcharts
2.2 Programming
2.2.1 Programming concepts
2.2.2 Data structures; arrays
2.3 Databases

Assessment at a glance
Components Weighting
Paper 1 Theory 1 hour 45 minutes 60%
This written paper contains short-answer and structured questions. All
questions are compulsory.
No calculators are permitted in this paper. 75 marks
Externally assessed.
Paper 2 Problem-solving and Programming 1 hour 45 minutes 40%
This written paper contains short-answer and structured questions. All
questions are compulsory. 20 of the marks for this paper are from questions
set on the pre-release material. 1
No calculators are permitted in this paper. 50 marks
Externally assessed.
4|Page

About the developer of this workbook


Inqilab Patel is an O &A Level Computer Teacher. He has taught in many schools including
Yaqeen Model School, Karachi Cadet School, KN Academy, Beacon House and The City
School, PAF Chapter, Hexis A Level, Verge and Nakhlah Boys Campus Society.
Cambridge has selected him as a Member of Cambridge Editorial Review Board. He is
also associated with Aga Khan University Examination Board in the capacity of Chief
Examiner, Item Writer, E-Marker, Karachi Board of Secondary Education the capacity
of Deputy Head Examiner and Sindh Board of Technical Education.

His entire career path revolves around computer science; either he was a student or a
teacher. He got a chance to polish his skills of teaching and studying more about computers
at various levels which has given him great confidence in presenting himself for any senior
level position of transferring his knowledge to the youth.

He has not stopped, he is continuing with his education at the higher levels. It is his second
semester of MPhil computer studies from a well-known university of Pakistan; The Institute
of Business & Technology.

Inqilab Patel knows a lot of methods of teaching computers and has developed tutorial
notes, worksheets and assignments for my students. He also maintains a website
(www.inqilabpatel.com) which is specifically designed for the support of those who want to
excel in GCSE computer science. He also regularly contributes material to CIE teacher
support website, for which he receives appreciation from different people across the world.

He has also received various training in innovative and special methods of teaching this
subject.
5|Page

Disclaimer

This workbook is developed by combining different materials related to Cambridge IGCSE &
O Level Computer Science 0478 & 2210. It is combination of work developed by me and the
resources, which are available in different web sites, books, magazines, past papers and
guides, just to facilitate students and teachers in preparation for examinations.

Examination questions and marking schemes used in this workbook are taken from CIE
(Cambridge International Examinations)

Note

Study of at least one of the following books, is compulsory for solving this workbook.
6|Page

Testimonials
7|Page
8|Page
9|Page
10 | P a g e
11 | P a g e
12 | P a g e

yasir raza

Such a benevolent hearted teacher with extra-terrestrial professionalism and dedication. Perfect in his
profession and thing I like about him the most is the sea of knowledge He possesses. Illuminating our minds by
giving us his heart and hard work to ensure well being of his students. A classy, inch perfect and a shining star

in the world of teaching. HATS OFF Mr Inqilab Patel.


13 | P a g e

Awais Ahmed

One of the best teachers in the world i have ever witnessed.He show faith in me when i was totally weak.He is
the one of the most hardworking and most devoted teachers from my site.

Shabnam Manzoor

Azfar Gardezi
A dedicated and hardworking teacher with great vision. Sir surely helped me a lot in
becoming capable of scoring well in O Level Computer Science.

Gamonics

the most dedicated teacher ever . supporting and inspirational teacher that everycan can look upto as a role
model. would 10/10 recommend

Sudais Jawwad Mansoor

Sajid Salim

A great and dedicated teacher, a helping colleague

Sobia Atif Khan - 52668/TCHR/BLGTC

A very hardworking and dedicated teacher who is ever ready to help others.
14 | P a g e

Muhammad Noman

Excellent, self-motivated and dedicated teacher

Telingueur AWE

Just for the short time I’ve been in contact with Mr Patel and the computer teacher’s family ☺️, I can affirm
that I met a great man and the best computer science teacher so far. From your high standard you always

show humility and concern. Thanks a lot sir. You are our mentor.

Usman Imran
The user didn't write a review, and has left just a rating.

Kashif Ahmed

A wonderful human being and an excellent teacher of O and A levels. Who have very vast experience of

teaching O/A level. Hardworking and a very dedicated teacher. Strongly recommended.

syed rayyan

Sir inqilab Patel is a very dedicated and determined teacher.... the only teach from whom I could talk frankly ....

❤❤ The best teacher I met ❤❤ I wish he succeeds in this life and hereafter.

Syed Tahir Raza

An extra ordinary teacher , an excellent educationist , a truly legend and my computer science guru Mr. Inqilab
Patail. I would highly recommend to join him to excel in computing knowledge and grades.
15 | P a g e

Raaed Ali
Sir Inqilab has been a great teacher and is very qualified in his profession. To say that he is
a good teacher would ... More

Sadaf Yousuf

Excellent mentor.. always willing to share his knowledge with peers..

Sobia Zeeshan

Hammad Asif

On of the best teacher I have ever seen

Zarafshan Jabeen

Great mentor! Learned a lot from him!

Waheed Aslam

One of the best teacher and the best person I know

DR MUHAMMAD MUNEER Memon


16 | P a g e

block gamer

Syed Alay

Om Jagdish

"""The best teacher in town... "" this dialogue you might have heard for every teacher but believe me this
dialogue suits. """" Sir Inqilab Patel """""" Gives you worksheets (absolutely free). Plans many different N
difficult test, clears your doubt any time you want.. This teacher has a separate fan base.. Have troubled him so
many times but this teacher has always corrected me. . ¤ Matlab yr teacher best hai at the end.. ¤ Thanks sir. .
P.S---: Aur sorry jitna bhi aap ko tang kiya. . Peecheye class mein aawazein nikalneye se late class mein
aaneye tak.. +++++++++ SORRY

Yousuf Shahzad

The best teacher of computer science I've had so far. Sir Inqilab teaches with immense dedication and has
such an abundance of knowledge that anybody will be awed by him in matter of days. Looking forward to more

years of being taught by him.

Umar Zubairi

An amazing teacher to cross paths with� 11/10, totally recommend.

The iDroid Channel

Sir Inqilab is the best computer science teacher I have ever got , thank you sir for teaching us so well
17 | P a g e

Munawar Khan

One of the most dedicated and Excellent teacher I have ever met... My mentor and inspiration... Sir Inqilab
Patel

poolite
18 | P a g e

Paper 1
Theory of Computer Science
19 | P a g e
Chapter 1

1.1 Data representation

Have Revised
Have Read
To Revise

Prepared
S No Learning Outcome

To Read
1.1.1: Binary systems
1 Recognize the use of binary numbers in computer systems
2 Denary-to-binary and binary-to- denary conversion
3 Concept of a byte and how the byte is used to measure memory size
Use binary in computer registers for a given application (such as in
4
robotics, digital instruments and counting systems)
1.1.2: Hexadecimal
5 Represent integers as hexadecimal numbers
6 Reasons for choosing hexadecimal to represent numbers
7 Convert positive hexadecimal integers to and from denary
8 Convert positive hexadecimal integers to and from binary
9 Represent numbers stored in registers and main memory as hexadecimal
Identify current uses of hexadecimal numbers in computing, such as
defining colours in Hypertext Markup Language (HTML), Media Access
10
Control (MAC) addresses, assembly languages and machine code,
debugging
1.1.3: Data storage
43 File formats sound (music), pictures, video, text and numbers
Identify and describe methods of error detection and correction, such as
44 parity checks, check digits, checksums and Automatic Repeat requests
(ARQ)
45 Concept of (MIDI) files, jpeg files, MP3 and MP4 files
File compression (lossless and lossy compression algorithms) applied to
46
music/video, photos and text files
20 | P a g e
Chapter at a glance:
The basic building block in all computers is the binary number system.
A binary digit is commonly referred to as a BIT; 8 bits are usually referred to as a BYTE.
The byte is the smallest unit of memory in a computer.
Binary-to-Decimal & Denary-to-Binary Conversion –use binary notation (place values) i.e.
128, 64, 32, 16, 8, 4, 2, 1.
For Binary-to-Hexadecimal conversion firstly groups of 4 bits are made from right to left and
each group is converted separately using 8, 4, 2, 1 notation.
For Hexadecimal-to-Binary conversion each hex digit is separated by other and then each hex
digit is converted separately using 8 4 2 1 notation.
For Denary-to-Hexadecimal conversion LCM of the denary number is taken.
For Hexadecimal-to-Denary conversion hexadecimal notation (place value) is used e.g. 4096
256 16 1
Memory Dump is display of memory contents and address in hexadecimal on screen or printed
on paper. It is powerful fault-tracing tool for expert programmers.
Hexadecimal are used in HTML to represent colour codes (RGB Model). For example: # ff0000
for bright red and #980000 for darker red.
MAC Addresses are unique number of NIC (Wi-Fi, Bluetooth. or wired connection i.e. Ethernet).
They are 48 bit long, but converted into 12 hexadecimal digits (in 6 pairs) making them short and
easier to understand. For 00-1C-2A-FF-01. 1st 3 pairs represent manufacturer while the other
represent serial number of product.
UAA (Universally Administered MAC Address) are most common. These are the MAC
addresses set by manufacturer
LAA (Locally Administered MAC Addresses) are changed locally to bypass firewall, or to
assign MAC address of specific format.
URL encoding: Web addresses can be written using hexadecimal rather than denary.
Hexadecimal codes are preceded by a % sign. For example, the word―www.ruknuddin.com” is
written as:%72%75%6B%6E%75%64%64%69%6E
Machine code and Assembly code are examples of low-level languages and are used by
software developers when producing, for example, computer games. They look difficult but they
have many advantages at the development stage of software writing (especially when trying to
locate errors in the code). Using hexadecimal makes it much easier, faster and less error prone
to write code compared to binary.
Character: Any text, number or symbol.
Compression: The method of reducing file size.
Lossy Compression: The file is reduced in size for transmission and storage; by permanently
removing some redundant information from the file
Lossless Compression: The file is reduced in size for transmission and storage; it is then put
back together again later producing a file identical to the original
MP3: File compression system for music which does not noticeably affect the quality of the
sound.This is done using file compression algorithms which use PERCEPTUAL MUSIC
SHAPING; this essentially removes sounds that the human ear can‘t hear properly.
JPEG: File compression format designed to make photo files smaller in size for storage and for
transmission.
MIDI: Standard adopted by the electronic music industry for controlling devices such as
21 | P a g e
synthesisers and sound cards
MP4: MPEG-4 (MP4) format allows the storage of multimedia files rather than just sound. Music,
videos, photos and animation can all be stored in the MP4 format. Videos, for example, could be
streamed over the internet using the MP4 format.
Algorithm: step-by-step set of instruction to solve a problem.
Register: Immediate access store in the processor. It can store small piece of data.
22 | P a g e
Number System:-
―The system of counting and calculating is called number system.‖
Number system is based on some characters called digits. The number of digits is known
as base or radix of the number system. For example binary number system uses two characters
0 and 1 and its base is 2.
Computer uses following four numbers:
i) Denary (Decimal) number system
ii) Binary number system
iii) Hexadecimal number system
Denary (Decimal) Number System:-
―The number system which is based on 10 characters from 0 to 9 is called denary
(decimal) system.‖
It is the most common number system. The digits of decimal system are 0, 1, 2, 3, 4, 5, 6,
7, 8, and 9. The value of each digit in a figure depends upon its weight. The weights are based on
power of 10.

The weights of digits according to their positions are given below:


Position 5th 4th 3rd 2nd 1st
10,000s 1,000s 100s 10s 1s
4 3 2
Weight(Decimal 10 =10000 10 =1000 10 =100 101=10 100=1
Notation)
For example 76854 can be expressed as:
76854 = 7 x 104 + 6 x 103 + 8 x 102 + 5 x 101 + 4 x 100
= 7 x 10000 + 6 x 1000 + 8 x 100 + 5 x 10 + 4 x 1
= 70000 + 6000 + 800 + 50 + 4
= 76854
1.1.1 Binary Number System:-

―The number system which is based on 2 characters 0 and 1 is called binary system.‖
Computer circuitry represents data in a pattern of ON and OFF states of electric current.
The state ON is represented by ‗1‘ and OFF is represented by ‗0‘. Binary system is used for
internal working of electronic computers.
The value of each digit in a figure depends upon its weight. The weights are based on power of 2.
Binary numbers are fundamental to the way that all modern computers work. They are used to
represent any data stored within a computer system.

Using only 0 and 1 makes it easier to design the electronic circuits that the computers will use.
This is because, if the computer wants to check a value in any part of the circuit, it only needs to
detect whether or not there is any electricity. If there is electricity, the value is 1, if there is no
electricity, the value is 0.

The weights of digits according to their positions are given below:


With the help of above chart we can derive a sequence of number, that sequence is known as
Binary Notation. The binary notation is a sequence of numbers are based on power of two and
arrange from right to left, as given below:
23 | P a g e

Position 5th 4th 3rd 2nd 1st


4
Weight 2 =16 23=8 22=4 21=2 20=1

Position 211 210 29 28 27 26 25 24 23 22 21 20


Binary 2048 1024 512 256 128 64 32 16 8 4 2 1
Notation

Binary notation is ….512 256 128 64 32 16 8 4 2 1


If a switch is on, it can represent the number 1. If it is off, it represents 0. These states can also
be interpreted as TRUE or FALSE. If you have enough switches, you can store all sorts of data.
You could ask a question such as ‗will you give me some money?‘ and you can get an answer in
binary digits:
0 = NO
1 = YES
This is making use of just 1 bit of data. Add another bit and you can say more:
00 = NO 10 = MAYBE
01 = NEXT WEEK 11 = YES
The more binary digits you have, the more information you can store and process. Most
computers store bits of data in memory in groups of eight. Eight bits stored at one location is
called a byte. Sometimes it is useful to work on just half a byte. Half a byte is called a nibble.

1 1 1 1 1 1 1 1
Bit bit bit bit bit bit bit bit
Nibble Nibble
Byte

Binary-to-Denary Conversion:

Binary notation is used to convert binary number into denary numbers.


For example 1001112 can be expressed as:
1001112
= 1 x 25 + 0 x 24 + 0 x 2 3 + 1 x 22 + 1 x 21 + 1 x 20
= 1 x 32 + 0 x 16 + 0 x 8 + 1 x 4 + 1 x 2 + 1 x 1
= 32 + 0 + 0 + 4 + 2 + 1
= 3910
Short-cut method
Binary Value 1 0 0 1 1 1
Binary Notation 32 16 8 4 2 1
Ignore notations under 0 bits 32 0 0 4 2 1
Add the remaining numbers 32+4+2+1
Equivalent denary number 39
24 | P a g e
Denary-to-Binary Conversion:
Binary notation is used to convert a denary number into binary numbers.
For example 12010 can be expressed as:
12010
Binary Notation:
=128 64 32 16 8 4 2 1
Put the 1 under notations which are required to find sum equals to the number and 0 in remaining
places as 64+32+16+8=120
= 128 64 32 16 8 4 2 1
= 0 1 1 1 1 0 0 0
Exercise

Convert the following denary numbers into Convert the following binary numbers into
binary denary

a) 75 a) 0 0 1 1 0 0 1 1

b) 0 1 1 1 1 1 1 1
b) 63

c) 1 0 0 1 1 0 0 1
c) 127

d) 0 1 1 1 0 1 0 0
d) 257

e) 1 1 1 1 1 1 1 1
e) 79
f) 0 0 0 0 1 1 1 1

f) 325
g) 1 0 0 0 1 1 1 1

g) 90
h) 1 1 1 1 0 0 0 0

h) 100

Answers:
Answers:
a)51. b)127. c)153.
a)1001011. b)111111.
d) 116. e) 255. f)15
c)1111111. d) 100000001.
g) 143. h) 240.
e) 1001111. f) 101000101.
g) 1011010 h) 1100100.
25 | P a g e
1.1.2 Hexadecimal Number System:-
―The number system which is based on 16 characters
from 0 to 9 and A, B, C, D, E & F is called Hexadecimal
system.‖

The reason for the common use of hexadecimal numbers


is the relationship between the numbers 2 and 16. Sixteen
is a power of 2 (16 = 24). Because of this relationship,
four digits in a binary number can be represented with a
single hexadecimal digit.
The weights of digits according to their positions are given below:

Position 5th 4th 3rd 2nd 1st


Place Value (Hexadecimal
164=65536 163=4096 162=256 161=16 160=1
Notation)

Binary Denary Hexadecimal


Zero 0 0 0
One 1 1 1
Two 10 2 2
Three 11 3 3
Four 100 4 4
Five 101 5 5
Six 110 6 6
Seven 111 7 7
Eight 1000 8 8
Nine 1001 9 9
Ten 1010 10 A
Eleven 1011 11 B
Twelve 1100 12 C
Thirteen 1101 13 D
Fourteen 1110 14 E
Fifteen 1111 15 F
Sixteen 10000 16 10
Seventeen 10001 17 11
26 | P a g e
Convert a binary number into a hexadecimal number
Divide into groups of 4 bits
Write down binary notation under each group
Ignore the numbers below 0s and add up the numbers below 1s
If sum any 4-bit group is 10 then write A as A represents 10 in hexadecimal. Apply the same in
case of 11 (B), 12 (C), 13 (D), 14 (E) and 15 (E)

For Example:
Convert the binary number 10110101 to a hexadecimal number

1 Conversion of Binary into Hexadecimal


0 Groups of 4 bits 1 0 1 1 0 1 0 1
1 4 bit binary notation 8 4 2 1 8 4 2 1
1
Calculation (Multiply each bit by its place 1x8+0x4+1x2+1x1 0x8+1x4+0x2+1x1
0 value and add them together. =8+0+2+1 =0+4+0+1
1 =11 =5
0 Hex-decimal Number B 5
1
2 = B516

Convert a hexadecimal number into a binary number


Write down binary notation under each hexadecimal digit
Find out the binary notations numbers total of which equals the hexadecimal digit and place 1s
below these numbers
Place 0s below remaining binary notation number.
For example: Convert the hex number 3A4F into binary
Conversion of Hexadecimal into Binary
3 A 4 F
Hexadecimal Number
3 10 4 15
4 Bit Binary Notation 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1
Calculation (Write 1s under 0 0 1 1 10 1 0 0 1 0 0 1 1 1 1
binary notation number total of
which equals the hexadecimal (2+1=3) (4+3+1=7) (4=4) (8+4+2+1= 15)
digit
Binary Numbers 0011 1010 01001111

3=2+1 so 1s are written below 2 and 1 and 0s are written below 8 & 4.
7=4+2+1 so 1s are written below 4, 2 and 1 and 0s are written below 8.
4=4 so 1 is written below 4 and 0s are written under 1, 2 & 8.
F=15=8+4+2+1 so 1s are written under all of them.

374F16 = 00110111010011112
27 | P a g e
Exercise

Convert the following binary numbers into Convert the following hexadecimal
hexadecimal numbers into binary

a) 1 0 1 1 0 0 1 1 0 0 1 1 a) 6 B

b) 0 1 1 0 0 0 0 1 0 1 0 1 1 1 1 b) 9 D

c) 1 0 0 1 1 0 0 1 0 1 0 1 0 1 c) A B C

d) 0 1 1 1 0 1 11001 1 1 1 0 d) 1 2 8

e) 1 1 1 1 1 1 1 1 01 1 0 1 1 1 0 00 e) A5 C3

f) 0 0 0 0 1 1 1 1 1 0 0 1 1 1 1 f) 9 6 F 8

g) 1 0 0 0 1 1 1 1 0 1 1 0 1 1 1 0 0 1 0 g) 7 8 E

h) 1 1 1 1 0 0 0 0 1 1 1 0 0 0 0 1 h) 0 0 7

Answers: Answers:
a)B33. b)30AF. c)2655. a)1101011. b)10011101.
d) 3B9E. e) 3FDB8. f) 7CF. c)101010111100. d) 100101000.
g) 47B72. h) F0E1. e) 1010010111000011.
f) 1001011011111000
g) 11110001110. h) 111.
28 | P a g e
Convert a hexadecimal number into a denary number
Method 1: Converting from hex to denary via binary
Separate the hex digits to find each equivalent in binary, and then piece them back together.
Worked example - What is the denary value of hex value 3A4F?
1. Separate the hex digits into 3, A, 4and F and find the equivalent binary numbers.
3 A 4 F
2. CHexadecimal Number
3 10 4 15
o
n4 Bit Binary Notation 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1
v Calculation (Write 1s under binary 0 0 1 1 10 1 0 0 1 0 0 1 1 1 1
enotation number total of which
r equals the hexadecimal digit (2+1=3) (4+3+1=7) (4=4) (8+4+2+1=
t 15)
Binary Numbers 0011 1010 01001111
b
inary number into denary
Binary
0 0 1 1 1 0 1 0 0 1 0 0 1 1 1 1
Value
Binary
32768 16384 8192 4096 2048 1024 512 256 128 64 32 16 8 4 2 1
Notation
Ignore
notations
0 0 8192 4096 2048 0 512 0 0 64 32 0 8 4 2 1
under 0
bits
Add the
remaining 8192+4096+2048+512+64+32+8+4+2+1
numbers
Equivalent
denary 14927
number

Method 2: Using base 16 place-value columns


Another method is to create base 16 place-value columns, and add the hex value to the
appropriate columns. You would then need to work out what the hex digits represent in denary,
and multiply this figure with the place-value. Finally, add all the values together.
The base 16 columns would be (161=16), (162=256), (163=4096), etc.
Worked example - What is the denary value of hex value 3A4F?
Place value 163=4096 162=256 161=16 160=1
3 A 4 F
Hex Digit
3 10 4 15
multiply hex digit with the place 3 x 4096 10 x 256 4 x 16 15 x 1
value =12288 = 2560 =64 =15
Add all the values together 12288+2560+64+15= 14927
29 | P a g e
Convert a denary number into hexadecimal number
Method 1: Converting from denary to hex via binary
1. Convert denary number to binary using binary notation place value:
Denary number: 28345
Place Value: 32768 16384 8192 4096 2048 1024 512 256 128 64 32 16 8 4 2 1
Binary Value: 0 110111010111001
2. Now convert this binary number into hexadecimal
Binary number: 0110111010111001
Place value: 842184218421 8421
Hexadecimal: 6EB 9

Method 2: Converting from denary to hex using LCM method


Conversion steps:
1. Divide the number by 16.
2. Get the integer quotient for the next iteration.
3. Get the remainder for the hex digit.
4. Repeat the steps until the quotient is equal to 0.

Example:
Convert denary 28345 to hex:
Working

Division Remainder
Quotient
by 16 (decimal)

28345 28345/16 1771 9

16 1771 9 1771/16 110 11

16 110 B 110/16 6 14

16 6 E 6/16 0 6

16 0 6

So 28345 = 6EB9

Convert 7562 to hex:

Division Remainder
Quotient
by 16 (decimal)

7562 7562/16 472 10

16 472 A 472/16 29 8

16 29 8 29/16 1 13

10 1 D 1/16 0 1

0 1
So 7562 = 1D8A
30 | P a g e
Exercise

Convert the following denary numbers into Convert the following hexadecimal
hexadecimal numbers into denary
a) 77 a) 5 F

b) 3 E D
b) 250

c) E E
c) 151

d) B B A
d) 357

e) 1 2 A E
e) 7079

f) 4 A 2 F

f) 15120

g) 2 D F 5

g) 826

h) F 9 A 8

h) 10000

Answers:
Answers:
a)95. b)1005. c)238.
a)4 D. b)F A. c)9 7.
d) 3002. e) 4782. f) 18991
d) 1 6 5. e) 1 B A 7. f) 3 B 1 0.
g) 11765. h) 63912.
g) 3 3 A h) 2 7 1 0.
31 | P a g e
Uses of Hexadecimal System:
Uses of Hexadecimal in HTML:
Hyper Text Mark-up Language is used to develop Websites. In HTML a colour is specified
according to the intensity of its Red, Green and Blue (RGB) components, each represented by
eight bits. Thus, there are 24 bits used to specify a web colour, and 16,777,216 colours that may
be so specified. It's easier for the human programmer to represent a 24-bit integer, often used for
32-bit colour values, as #FF0099 instead of 111111110000000010011001

BINARY (BITS) HEX


1 1 1 1 = F
RR
1 1 1 1 = F
0 0 0 0 = 0
GG
0 0 0 0 = 0
1 0 0 1 = 9
BB
1 0 0 0 = 8
111111110000000010011001 FF0099

HTML TAG Name


<font color="#FF0000">RED</font> (RED)
<font color="#00FF00">GREEN</font> (GREEN) LIME
<font color="#0000FF">BLUE</font> (BLUE)
<font color="#FFFF00">YELLOW</font> (YELLOW)
<font color="#FF00FF">MAGENTA</font> (MAGENTA) FUCHSIA
<font color="#00FFFF">CYAN</font> (CYAN) AQUA
Page | 32
Uses of Hexadecimal in MAC Address:
MAC address is unique identification number of NIC (network interface card). It is 48 bits long, so
281 billion MAC addresses can be assigned computers.
MAC addresses are 48 bit long so they are very difficult to read, write and understand for example
0000 0000 0001 1100 1011 0011 0100 1111 0010 0101. To make them shorter and easy to
understand they are shown in 12 hexadecimal digits in 6 groups, like 00 – 1C – B3 – 4F – 25 – FE.
First 6 numbers (i.e. 00-1C-B3) are manufacturer identity while last 6 numbers (i.e. 4F-25-FE) are
serial number of NIC.
There are two types of MAC address:
UAA (Universally administered MAC address) are the most common MAC address set by
manufacturers. These are not changed.
LAA(Locally administered MAC address): These are changed locally, but they must be unique.

There are a few reasons why the MAC address needs to be changed using LAA:
 Certain software used on mainframe systems needs all the MAC addresses of devices to fall
into a strict format; because of this, it may be necessary to change the MAC address of some
devices to ensure they follow the correct format.
 It may be necessary to bypass a MAC address filter on a router or a firewall; only 24 MAC
addresses with a certain format are allowed through, otherwise the devices will be blocked.
 To get past certain types of network restrictions it may be necessary to emulate unrestricted
MAC addresses; hence it may require the MAC address to be changed on certain devices
connected to the network.

Uses of Hexadecimal in Debugging:


Debugging allows programmers to detect, diagnose, and eliminate errors in a program. The
source debugger uses the hexadecimal values of the characters. Hex is often used in error
messages. The hex number refers to the memory location of the error. This helps programmers to
find and then fix problems.

Memory Dump
Contents of memory are in binary numbers. Binary numbers are
long and difficult to understand.
Memory dump is a hexadecimal view (on screen or paper) of
computer data, from RAM or from a file or storage device. As
memory dump uses hexadecimal number to show memory
contents, it become a powerful fault tracing tool but requires
expertise in computer architecture.

Uses of Hexadecimal in Assembly Language:


Machine codes are written in binary language which is very long and difficult to understand.
Hexadecimal numbers are easier, faster and less error prone to write code.
In assembly language codes are written in hexadecimal. This can have many advantages to
program developers or when carrying out troubleshooting.
For example:
LDD A750 (assemble language)
Page | 33
A5E4 FFA4 (machine code using hexadecimal values)
1010 0101 1110 0100 1111 1111 1010 0100 (machine code using binary)

URL encoding:
Web addresses can be written using hexadecimal rather than denary. Hexadecimal codes are
preceded by a % sign. For example, the word ―www.ruknuddin.com” is written as:
r u k n u d d i n
in hex %72 %75 %6B %6E %75 %64 %64 %69 %6E

w w w . r u k n u d d i n . c o m
%77 %77 %77 %2E %72 %75 %6B %6E %75 %64 %64 %69 %6E %2E %63 %6F %6D

Some characters are not allowed in URL. URL encoding converts characters into a format that can
be transmitted over the Internet.
For example
 %20 – is used in URL in place of <space> not allowed in a URL, %20 is the coding for a space
(32 in denary)
 ? – separates the URL from all parameters or variables
e.g. for query to search Inqilabpatel in Google
https://www.google.com.pk/search?q=inqilab%20patel
here “q” is variable for query ―?‖ separates it from URL
“https://www.google.com.pk/search”

while“%20”is used for the space between “inqilab” and “patel”

URL ?to separate %20 code for space


Variable from URL
Page | 34
Character Set:
Text and numbers can be encoded in a computer as patterns of binary digits. Hexadecimal is a
shortcut for representing binary. ASCII and Unicode are important character sets that are used as
standard.
ASCII (American Standard Code for Information Interchange)
The ASCII character set is a 7-bit set of codes that allows 128 different characters. That is enough
for every upper-case letter, lower-case letter, digit and punctuation mark on most keyboards. ASCII
is only used for the English language.
This table shows some examples of letters represented using the ASCII character set:

Character Denary Binary HEX Character Denary Binary HEX


Value Value Value Value
A 65 1000001 41 N 78 1001110 4E
B 66 1000010 42 O 79 1001111 4F
C 67 1000011 43 P 80 1010000 50
D 68 1000100 44 Q 81 1010001 51
E 69 1000101 45 R 82 1010010 52
F 70 1000110 46 S 83 1010011 53
G 71 1000111 47 T 84 1010100 54
H 72 1001000 48 U 85 1010101 55
I 73 1001001 49 V 86 1010110 56
J 74 1001010 4A W 87 1010111 57
K 75 1001011 4B X 88 1011000 58
L 76 1001100 4C Y 89 1011001 59
M 77 1001101 4D Z 90 1011010 5A
Extended ASCII
Extended ASCII code is an 8-bit character set that represents 256 different characters, making it
possible to use characters such as é or ©. Extended ASCII is useful for European languages.
Unicode
Unicode uses between 8 and 32 bits per character, so it can represent any characters from
languages from all around the world. It is commonly used across the internet. As it is larger than
ASCII, it might take up more storage space when saving documents.
Global companies, like Facebook and Google, would not use the ASCII character set because
their users communicate in many different languages.
Page | 35
ASCII Code
DEC HEX BIN Symbol DEC HEX BIN Symbol DEC HEX BIN Symbol
0 00 00000000 NUL 43 2B 00101011 + 86 56 01010110 V
1 01 00000001 SOH 44 2C 00101100 , 87 57 01010111 W
2 02 00000010 STX 45 2D 00101101 - 88 58 01011000 X
3 03 00000011 ETX 46 2E 00101110 . 89 59 01011001 Y
4 04 00000100 EOT 47 2F 00101111 / 90 5A 01011010 Z
5 05 00000101 ENQ 48 30 00110000 0 91 5B 01011011 [
6 06 00000110 ACK 49 31 00110001 1 92 5C 01011100 \
7 07 00000111 BEL 50 32 00110010 2 93 5D 01011101 ]
8 08 00001000 BS 51 33 00110011 3 94 5E 01011110 ^
9 09 00001001 HT 52 34 00110100 4 95 5F 01011111 _
10 0A 00001010 LF 53 35 00110101 5 96 60 01100000 `
11 0B 00001011 VT 54 36 00110110 6 97 61 01100001 a
12 0C 00001100 FF 55 37 00110111 7 98 62 01100010 b
13 0D 00001101 CR 56 38 00111000 8 99 63 01100011 c
14 0E 00001110 SO 57 39 00111001 9 100 64 01100100 d
15 0F 00001111 SI 58 3A 00111010 : 101 65 01100101 e
16 10 00010000 DLE 59 3B 00111011 ; 102 66 01100110 f
17 11 00010001 DC1 60 3C 00111100 < 103 67 01100111 g
18 12 00010010 DC2 61 3D 00111101 = 104 68 01101000 h
19 13 00010011 DC3 62 3E 00111110 > 105 69 01101001 i
20 14 00010100 DC4 63 3F 00111111 ? 106 6A 01101010 j
21 15 00010101 NAK 64 40 01000000 @ 107 6B 01101011 k
22 16 00010110 SYN 65 41 01000001 A 108 6C 01101100 l
23 17 00010111 ETB 66 42 01000010 B 109 6D 01101101 m
24 18 00011000 CAN 67 43 01000011 C 110 6E 01101110 n
25 19 00011001 EM 68 44 01000100 D 111 6F 01101111 o
26 1A 00011010 SUB 69 45 01000101 E 112 70 01110000 p
27 1B 00011011 ESC 70 46 01000110 F 113 71 01110001 q
28 1C 00011100 FS 71 47 01000111 G 114 72 01110010 r
29 1D 00011101 GS 72 48 01001000 H 115 73 01110011 s
30 1E 00011110 RS 73 49 01001001 I 116 74 01110100 t
31 1F 00011111 US 74 4A 01001010 J 117 75 01110101 u
32 20 00100000 75 4B 01001011 K 118 76 01110110 v
33 21 00100001 ! 76 4C 01001100 L 119 77 01110111 w
34 22 00100010 " 77 4D 01001101 M 120 78 01111000 x
35 23 00100011 # 78 4E 01001110 N 121 79 01111001 y
36 24 00100100 $ 79 4F 01001111 O 122 7A 01111010 z
37 25 00100101 % 80 50 01010000 P 123 7B 01111011 {
38 26 00100110 & 81 51 01010001 Q 124 7C 01111100 |
39 27 00100111 ' 82 52 01010010 R 125 7D 01111101 }
40 28 00101000 ( 83 53 01010011 S 126 7E 01111110 ~
41 29 00101001 ) 84 54 01010100 T 127 7F 01111111
42 2A 00101010 * 85 55 01010101 U
Page | 36
Memory Size Measurement
It should be pointed out here that there is some confusion in the naming of memory sizes.
The unit was established by the International Electro-technical Commission (IEC) in 1998, has
been accepted for use by all major standards organizations, and is part of the International System
of Quantities. The kibibyte was designed to replace the kilobyte in those computer science
contexts in which the term kilobyte is used to mean 1024 bytes. The interpretation of the kilobyte
to denote 1024 bytes, conflicting with the SI definition of the prefix kilo (1000), is still common,
mostly in informal computer science contexts.
The IEC convention is now adopted by some organisations. Manufacturers of storage devices
often use the denary system to measure storage size. For example:
1 kilobyte = 1000 byte
1 megabyte = 1000000 bytes
1 gigabyte = 1000000000 bytes
1 terabyte = 1000000000000 bytes and so on.
The IEC convention for computer internal memories (including RAM) becomes:
1 kibibyte (1 KiB) = 1024 bytes
1 mebibyte (1 MiB) = 1048576 bytes
1 gibibyte (1 GiB) = 1073741824 bytes
1 tebibyte (1 TiB) = 1099511627776 bytes and so on
Example Question: A company advertises its backup memory device as having 500 GB of
storage. A customer wishes to know how many 8 MB files could be stored on the device. The
company claimed that up to 62 500 files (assuming each file is 8 MB) could be stored. The
customer calculated that 64 000 files could be stored.
Explain the difference between these two storage values. Show any calculations you use in your
explanation.
............................................................................................................................................................
..............................................................................................................
–company calculation is based on 1 GByte = 1000 Mbyte – so (500 × 1000)/8 = 62 500 files
– customer calculation based on 1 GByte = 1024 Mbyte – so (500 × 1024)/8 = 64000 files
– giving the difference of 1500 files [3]
Page | 37
1.1.3 Data storage
File formats sound (music), pictures, video, text and numbers
Identify and describe methods of error detection and correction, such as
parity checks, check digits, checksums and Automatic Repeat requests
(ARQ)
Concept of (MIDI) files, jpeg files, MP3 and MP4 files
File compression (lossless and lossy compression algorithms) applied to
music/video, photos and text files

Following are different types of file formats available to be used in computers for example:
MIDI & MP3 for sound
MP4 for video
Jpeg for pictures
and DOC text and numbers

MIDI
Pronounced middy, an acronym for musical
instrument digital interface, a standard adopted by the
electronic music industry for controlling devices, such as
synthesizers and sound cards, which emit music.
A MIDI file consists of a list of commands that instruct a
device like an electronic organ, how to produce a particular
sound or musical note.
Examples of MIDI commands include:
 note on/off: this indicates that a key has been pressed/released to produce/stop producing
a musical note
 key pressure: this indicates how hard the key has been pressed (this could indicate
loudness of the music note or whether any vibrato has been used, and so on).
The whole piece of music will have been stored as a series of commands but no actual musical
notes. Their size, compared with an MP3 file, is considerably smaller. MIDI is essentially a
communications protocol that allows electronic musical instruments to interact with each other.
The MIDI protocol uses 8-bit serial transmission with one start bit and one stop bit, and is therefore
asynchronous.

MIDI is essentially a communications protocol that allows electronic musical instruments to interact
with each other.
Two additional bytes are required, a PITCH BYTE for note to play, and a VELOCITY BYTE for
loudness. However, to play back through an instrument such as
a guitar would need the use of SEQUENCER SOFTWARE.
MP3 (Moving Pictures Expert Group Audio Layer 3)
This has become the standard for distributing digital music files on the internet. It uses lossy
Page | 38
compression to reduce file sizes to about a tenth of the original.
The compression algorithm is intended to remove sounds that are generally beyond the limits of
most people‘s hearing and does not noticeably affect the quality of sound.
When using MP3 format, the size of the music track will be reduced by a factor of 10 (i.e. the size
is reduced by 90% and remaining file size is only 10% of original size).This is done using file
compression algorithms which use PERCEPTUAL MUSIC SHAPING; this essentially removes
sounds that the human ear can‘t hear properly.

For example, an 50 megabyte music CD can be reduced to 5 megabytes.


50 MB x 90/100= 45 MB reduced. 50 MB x 10/100=5 MB new file size.
The quality of MP3 files depends on the BIT RATE – this is the number of bits per
second used when creating the file. Bit rates are roughly between 80 and 320 kilobits
per second; usually 200 or higher gives a sound quality close to a normal CD.

MPEG-4 (MP4) files are slightly different to MP3 files. This format allows the
storage of multimedia files rather than just sound. Music, videos, photos and
animation can all be stored in the MP4 format. Videos, for example, could be
streamed over the internet using the MP4 format without losing any real discernable
quality.

MPEG (Moving Pictures Expert Group)


This is a set of standards designed to encode audio/visual information. It uses lossy compression
for both the sound and the visual components. Various versions of MPEG are used for digital
transmissions, such as via cable and satellite, as well as terrestrial digital channels. It is used to
encode DVD movies as well and can be decoded by most domestic DVD players.
Page | 39
Images:
Images are made of pixels. A Pixel (picture element) is the smallest addressable unit of data that
can be represented in an image.
More the number of pixels, higher the resolution of image.

Each pixel can represent a single, solid block of colour.


The more bits are used to represent each pixel, the more combinations of binary numbers are
possible, and so more colours are possible in the image. This is known as
Page | 40
Colour depth.
The number of bits used to represent the colour of a single pixel

Colour Depth Number of Colours Represented Working


1 bit 2 (0, 1) (e.g. black & white) 21=2
2 bit 4 (00, 01, 10, 11) 22=4
4 bit 16 (0000, 0001, 0010, 0011, 0100, 0101, 0110, 0111, 24=16
1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111 )
8 bit 256 28=256
16 bit 65,536 216=65,536
24 bit 16,777,216 224=16,777,216

Colour
1 bit 2 bit 4 bit
depth

Example

Mono-chrome, only stores stores 4 colours:


Stores limited colours
black and white
No of
colours 21=2 22=4 24=16
per pixel
Colour
8 bit 24 bit
depth

Example

hard to see any difference


close to reality
between reality
No of
colours 224=16777216
28=256
per pixel

JPG or JPEG (Joint Photographic Experts


Group)
JPEG is the file compression format

Uncompressed raw
image
Page | 41
designed to make photo files smaller in size for storage and for transmission. It uses lossy
compression and compresses a file between factor of 5 to 15.
For example 2000 pixels wide and 2000 pixels high image will have 2000 × 2000= 4,000,000
pixels. This is often referred to as a 4-megapixel image. A raw bitmap can often be referred to as a
TIFF or BMP image (file extension .TIF or .BMP). The file size of this image is determined by the
number of pixels. In the previous example, a 4-megapixel image would be 4 megapixels × 3
colours(RGB) =12 megabytes.
This image will be compressed at factor of 5 (12/5=2.5 mb) to factor of
15 (12/15= 0.8mb). Compressed image,
A raw bitmap can often be referred to as a after applying factor TIFF or BMP image (file
extension .TIF or .BMP). of 5

Vector Graphics
Vector images store set of instructions about HOW to draw each shape.
Vector graphics are created in graphics packages and consist of shapes called objects.
It is possible to edit each object separately, for example, change the shape, colour, size and
position.
The file size of a vector graphic is often very small.
Vector graphic is scalable – i.e. when you resize it, the entire image is redrawn and it doesn‘t lose
quality.
Bitmap Graphics
A bitmap or Raster image is a group of pixels. The
colour of each pixel is stored as a binary code. The
following picture could be represented as:

Since the computer has to store information about


every single pixel in the image, the file size of a
bitmap graphic is often quite large. When you
resize a bitmap graphic, it tends to lose quality.
Page | 42
Text and number file formats: Text and numbers are usually stored in an ASCII format.
Text files are also compressed. Lossless compression method is used for text and numbers.
These use complex algorithms that work on redundancy or repeated sections of words (e.g. OU in
yOUr, cOUntry or mOUntain).
The following section shows, in very simple terms, how this could work:

SECTION Repeated words, such as 1 SECTION


SHOWS YOU ‗THIS‘ could be put into a data S2S Y3 2 1
HOW THIS dictionary and be replaced by W3LD WORK
WOULD ‗1‘. Repeated word sections,
WORK‘ such as ‗HOW‘ and ‗OU‘ could
be replaced by the numbers
‗2‘ and ‗3‘. Our phrase then
becomes

PDF (Portable Document Format)


This is an open standard for exchanging documents. Text and graphics are displayed exactly as in
the original, with no need to have the software that created the document.
Many applications are capable of reading or creating PDF documents.

• Developed to transfer and read documents without having to print them—the ―paperless
office.‖
• Can represent both vector and bitmap graphics.
• Can also contain electronic document search and navigation features as well as hypertext
links.
• Can be created from almost any application.
• Document formatting, fonts, colors, etc. are maintained and appear identical across
platforms.

File compression
File compression is the process of encoding information using fewer bits so that the compressed
file size is smaller.
It is important for files transmitted over the Internet because if they are not compressed then there
would be considerably more data to transmit. This would result in more network traffic, slower
download times and delays in viewing web pages, particularly those with multimedia content.
Streaming audio and video would be impractical without file compression.
However, compressed data may be of lower quality (if using lossy compression) and must be
decompressed to be used. This extra processing may slow some applications and in the case of
video decompression, require dedicated hardware such as graphics cards for the video to be
viewed as it is actually being decompressed.
Page | 43

Lossless compression
This allows the original file to be re-created exactly from the compressed file. It works by searching
for patterns in the file so, instead of repeatedly storing a block of identical data; the data is stored
once and then indexed. Further occurrences are simply stored as the index number so the
decompression software can simply look up the data and place it back in the correct position.
Text files compress well because certain letters and words will often appear together in the same
pattern. Software files also compress well for similar reasons, they are made up of a relatively
small number of different instructions, often arranged in a set pattern.
In both cases, the larger the original file, the better the compression ratio as there are more likely
to be repeating patterns and each pattern will be repeated more frequently.
Lossy compression
Files that include a lot of unique information, such as bitmap graphics, sound or video files, cannot
be compressed much with lossless compression because there is so little repeated data.
Lossy compression works differently, it removes data that is not needed, either because a drop in
quality is acceptable or the difference cannot be detected by the human eye or ear.
Streaming audio and video is possible with lossy compression.
Page | 44
Quick Revision Questions
1 Convert the following number [6 marks]
a. denary 156 into binary
…………………………………………………………………………………………………………......…
………………………………………………………………………………………………………….…..
b. denary 756 into hexadecimal
………………………………………………………………………………………………………................
…………………………………………………………………………………………………………………
…………………………………………………………………………………………………………….…..
c. binary 101101100 into denary
……………………………………………………………………………………………………................…
…………………………………………………………………………………………………………………
………………………………………………………………………………………………………….…..
d. binary 100101001110000 into hexadecimal
……………………………………………………………………………………………………......………
…………………………………………………………………………………………………………….…..
e. hexadecimal C9F into denary
…………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………
……………………………………………………………………………………………………….…..
f. hexadecimal C9F into 12 bit binary
……………………………………………………………………………………………………......………
…………………………………………………………………………………………………………….…..
2 A 32-second sound clip will be recorded. The sound will be sampled 16000 times a second.
Each sample will be stored using 8 bits.
Calculate the file size. You must show all of your working. (March 2018 P12 (India) Q 9)

File Size .....................................................................................................B [3]


Write your answer in KB and MB
…………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………
……………………………………………………………………………………………………….….. [2]
Page | 45
Comments on Question
Many candidates provided a correct answer for this question. It would be helpful if candidates
clearly showed all the stages of their working in the work space. Some candidates scattered their
working around, outside of the provided answer space into other answer spaces, which has the
risk of being unseen by the examiner.
3 In the ASCII character set, the denary (base 10) character codes for the ‗A‘ is 65 and ‗B‘ is 66
while for ‗a‘ is 97 and ‗b‘ is 98.
(i) Write these denary numbers of ‗A‘ and ‗a‘in 8 bit binary numbers.
65:……................................................................................................................................................

............................................................................................................................................................

97: ……….………................................................................................................................................

...................................................................................................................................................... [2]

(ii) Predict the denary values for ‗I‘ and ‗i‘.

‗I‘:……..................................................................................................................................................

...........................................................................................................................................................

‗i‘: ……….………................................................................................................................................

..................................................................................................................................................... [2]

(iii) Write these denary numbers in 8 bit binary numbers.

‗I‘:……..................................................................................................................................................

...........................................................................................................................................................

‗i‘: ……….………...............................................................................................................................

..................................................................................................................................................... [2]

(iv) using the denary values of upper and lower case in part i and ii, suggest an easy way to find
the ASCII binary code of any small case letter if its upper case binary code is known, (e.g. ‗P‘)

............................................................................................................................................................

............................................................................................................................................................

............................................................................................................................................................

...................................................................................................................................................... [2]
Page | 46
(v) Write in Register X the binary number you would use with OR gates to convert the ASCII value
of upper case letter ‗A‘ to its lower case letter ‗a‘ binary value.
[1]

„A‟

Register X

OR logic operation

„a‟

Test the Register X to apply with the letter ‗I‘ to convert it into ‗i'
„I‟

Register
X

„i‟

4A process is devised for encoding letters using 16 bits. The process starts by giving each letter of
the alphabet a value: A = 1, B = 2, C = 3, ....., Z = 26.
(a) The value for each letter is represented using 16 bits. For the letter ‗V‘ write its 16-bit binary
value

(b) All the bits in the register are shifted one place to the left to convert a upper case letter into
small case letter
i. write down contents of 16-bit binary register after the bits have been moved to left to convert ‗V‘
into ‗v‘.

ii. convert this binary value for ‗V‘ and ‗v‘ in denary
‗V‘ …………………………………………………………………………………………………………...
…………………………………………………………………………………………………………….
‗v‘ …………………………………………………………………………………………………………...
……………………………………………………………………………………………………………. [2]
Page | 47
iii. State the effect the shift to the left had on the original denary number from part (bii).
…………………………………………………………………………………………………………………
….……………………………………………………………………………………………...………………
…………………………………………………………………………………………………………. [1]
iv. Predict what will be happened to a denary value when its binary values are moved 1 place to
right.
…………………………………………………………………………………………………………………
….……………………………………………………………………………………………...………………
…………………………………………………………………………………………………………. [1]

v. Predict the denary values for the following letters


‗i‘ …………………………………………………………………………………………………………...
…………………………………………………………………………………………………………….
‗p‘ …………………………………………………………………………………………………………...
…………………………………………………………………………………………………………. [2]
Examiner Report
In parts (a)) most candidates could provide a correct conversion from denary to binary.
In part (bii) many candidates could identify the effect that the shift had on the number. Some candidates were too
vague in their response stating the number had merely decreased.
In part (biii) most candidates could not accurately explain the effect of the shift. They were not able to express
that the right most bit would be lost from the register, making the number inaccurate.

5 Explain why and how hexadecimal notation is used rather than in binary. [6]
(i) MAC Address ………………………………..……………………………………………………
…………………………………………………………………………………………………………
………………………………………………………………………………………………………
Reason …….………………………………………………………………………………………
……………………………………………………………………………………………………..……
………………………………………………………………………………………………………
(ii) Memory Dump …..………………………………..………………………………………………
…………………………………………………………………………………………………………
………………………………………………………………………………………………………
Reason …….……………………………………………………………………………………
…………………………………………………………………………………………………..………
……………………………………………………………………………………………………
(iii) HTML ……………..………………………………..………………………………………………
Page | 48
…………………………………………………………………………………………………………
………………………………………………………………………………………………………
Reason …….………………………………………………………………………………………
……………………………………………………………………………………………………..……
………………………………………………………………………………………………………
6Characters can be represented in a computer by a numerical code. (2210/0478 Winter 2015 P11)
The following list shows 16 characters with their numerical codes in denary:
a = 97 d = 100 h = 104 m = 109 t = 116
b = 98 e = 101 i = 105 o = 111 u = 117
c = 99 g = 103 k = 107 r = 114 w = 119
. = 46 (code for the full stop)
Web addresses can be written using hexadecimal rather than denary. Hexadecimal codes are
preceded by a % sign. For example, the word ―c a g e‖ is written as:
either 99 97 103 101 (in denary)
or %63 %61 %67 %65 (in hexadecimal)
(a) Complete the conversion of the following web address into hexadecimal: [3]
w W W . c i e . o r g . u K
%77 %77 %77

b) Complete the web address from the given hexadecimal codes: [3]
%77 %77 %77 %2E %72 %6F %63 %6B %69 %63 %74 %2E %63 %6F %6D
w W W

7(a) 1A – 16 – C5 – 22 – FF – FF is an example of a MAC address.


(i) Identify what the first six and last six hexadecimal digits represent.
First six digits ....................................................................................................................................
...........................................................................................................................................................
Last six digits ....................................................................................................................................
............................................................................................................................................................
...................................................................................................................................................... [2]
(ii) State why MAC addresses are used.
............................................................................................................................................................
...................................................................................................................................................... [1]
Page | 49
(b) Explain the two parts of a MAC address

............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
....................................................................................................................................................... [2]
8 The information from seven sensors is sent to an engine management system in the car. The
status of each sensor is stored in an 8-bit register; a value of 1 indicates a fault condition.
(Q 5 Winter 2015 P13)

For example, a register showing 0 1 0 1 1 0 0 0 indicates:


• temperature too high
• fuel pressure too low
• voltage too low
(i) Identify the fault condition(s) that the following register indicates:

............................................................................................................................................................
............................................................................................................................................................
......................................................................................................................................................[2]
(ii) A car has a faulty airbag and the CO level is too high.
Write what should be contained in the 8-bit register.

(iii) Give the hexadecimal value of the binary number shown in part (iii).
............................................................................................................................................................
......................................................................................................................................................[1]
Page | 50
9Draw a line to connect each question to the correct answer.(2210/0478 summer 2015 P11 Q 9) [5]

Question Answer

What is the denary (base 10) equivalent to the


8
hexadecimal digit E?

If 1 GB = 2x then what is the value of X? 6

How many bits are there in one byte? 14

If the broadband data download rate is 40 megabits


per second, how many seconds will it take to 19
download a 60 MB file?

What is the denary (base 10) value of the binary


2
number 0 0 1 0 0 1 0 0 ?

What hexadecimal value is obtained when the two


36
hexadecimal digits C and D are added together?

The following binary pattern


1010011000111101 is stored in X bytes. 30
What is the value of X?

An array, Number[1:4], contains;


6
8
12
10
12
x ← Number [2]What is x?

Examiner’s Comments on Question 9


The full range of marks was awarded for this question. Many candidates gained full marks. The most common errors
were miscalculations for 30, 19 and 12.
Page | 51
10 Following flowchart is used to convert a denary number into octal (base 8)
The flowchart below inputs an integer. The predefined function DIV gives the value of the division,
for example Z ←11 DIV 3 gives the value Z = 3. The predefined function MOD gives the value of
the remainder, for example Z ←11 MOD 3 gives the value Z = 2. (Winter 2016 P22 Q
3)

Complete a trace table for each of the two input values 33 and 75. [4]
Trace table for input value 33
X A B OUTPUT
8 7 3 3
7 7

Trace table for input value 75


X A B OUTPUT
Page | 52
11 (a) This pseudo code inputs an integer. The predefined function DIV gives the value of the
division, e.g. Y 10 DIV 3 gives the value Y = 3. The predefined function MOD gives the value of the
remainder, e.g. Y 10 MOD 3 gives the value Y = 1.gives the value Y = 1. (Winter 2015 P23 Q 3)

Complete a trace table for each of the two input values 37


and 191.
Trace table for input value 37
X T1 T2 OUTPUT

Trace table for input value 191


X T1 T2 OUTPUT

(b) State the purpose of the pseudo code in part (a).


............................................................................................................................................................
......................................................................................................................................................[2]
Page | 53
12 (a) (i) Convert the following two hexadecimal numbers into binary: ( Winter 2015 P11)

[4]
(ii) Now perform the AND (logic) operation on each corresponding pair of binary bits in the two
numbers from part (i).

[2]
(iii) Convert your answer in part (ii) into hexadecimal.
............................................................................................................................................................
............................................................................................................................................................
[2]
(b) (i) The following code shows HTML ‗tag‘ pairs on either side of the text stating the colour that
each creates.
<font color ― # F F 0 0 0 0 ― > RED </font>
<font color ― # 0 0 F F 0 0 ― > GREEN </font>
<font color ― # 0 0 0 0 F F ― > BLUE </font>
<font color ― # X ― > YELLOW </font>
<font color ― # Y ― > MAGENTA </font>
<font color ― # Z ― > CYAN </font>
Yellow is a combination of red and green, magenta a combination of red and blue and cyan a
combination of green and blue.
State what 6-digit hexadecimal values should replace X, Y and Z in the above code.
X ........................................................................................................................................................
Y .......................................................................................................................................................
Z ..................................................................................................................................................[3]
(ii) Describe how other colours, such as a darker shade of blue, are created.
............................................................................................................................................................
.......................................................................................................................................................[2]
Examiners’ Comments Question 4(a) (b) and (c)
In part (a) most candidates were able to demonstrate a high level on knowledge in data representation and logic. Some candidates
made small errors but still gained later marks with follow through on their answers.
In part (b) some candidates were able to provide a correct response. Some candidates made an error in putting the two codes for
the two different colours, rather than combining the codes to create the colour requested.
In part (b)(ii) many candidates gave a vague response and did not describe that HTML codes are combined to create different
colours. Many candidates provided a minimum level answer, such as adding the colour black to blue. They did not add the
Page | 54
Computer Science aspect, that different HTML codes are combined to do this. Candidates need to make sure they are thinking
about the computer science aspect of the question in questions such as this one.
In part (c) many candidates did not recognise what information they needed to give. They provided conversions of the hex values
to denary or binary, rather than stating what the code actually represents.
Some candidates were too vague in stating what it represented, candidates need to be specific in their responses. In part (c)(ii)
some candidates were able to state that MAC addresses are a unique identifier for a device on a network. Many candidates were
not specific enough, stating that MAC addresses identified a device on a network, but not stating that the identification is unique.

13 Jane answers an examination question about computers and data correctly.


Six different words or numbers have been removed from her answer.
Complete the sentences in Jane‘s answer, using the list given. Not all items in the list need to be
used. (Summer 2018 P11)

•2 • 10 • 16 • analogue
• binary • denary • digital • hexadecimal
As humans, we process …………………………………… data, but a computer cannot process this
type of data. For a computer to be able to process data it needs to be converted to
…………………………………… data.
As humans, we mostly use a …………………………………… number system; this is a base
…………………………………… number system.
Computers use a …………………………………… number system; this is a base
…………………………………… number system. [6]
14 Abdullah wants to convert a denary number into hexadecimal. Write down the series of steps
for Abdullah.
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
....................................................................................................................................................... [4]
Page | 55
15 Abdullah also wants to convert a denary number into binary. Write down the series of steps for
Abdullah clearly so he can perform this conversion.
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
.................................................................................................................................................... [4]
16 a Integers can be represented in Binary Coded Decimal (BCD). In BCD each denary digit is
converted into 4 bit BCD separately, for example Denary 6 can be represented in BCD
8 4 2 1
6 = 0 1 1 0
(i) State BCD equivalent of 4 and 7.
8 4 2 1
4 =

8 4 2 1
7 =

(ii) State what denary number is represented by this 2-byte BCD number.
1 0 0 1 1 0 0 0 0 0 1 1 0 1 1 1

Denary …………………………………………… [1]


Page | 56
(ii) A second BCD 2-byte number has been copied incorrectly.
1 1 0 1 0 0 1 1 0 1 0 1 0 0 0 0

Without converting the whole pattern, how can you identify that this cannot be a validBCD
representation?
............................................................................................................................................................
............................................................................................................................................................
.[1]
(b) Binary Coded Decimal (BCD) is another way of representing numbers.
(i) Write the number 359 in BCD form.
..........................................................................................................................................................[
1]
(ii) Describe a use of BCD number representation.
............................................................................................................................................................
............................................................................................................................................................
.[2]
Page | 57
Memory Size Measurement
It should be pointed out here that there is some confusion in the naming of memory sizes.
The unit was established by the International Electrotechnical Commission (IEC) in 1998, has
been accepted for use by all major standards organizations, and is part of the International System
of Quantities. The kibibyte was designed to replace the kilobyte in those computer science
contexts in which the term kilobyte is used to mean 1024 bytes. The interpretation of the kilobyte
to denote 1024 bytes, conflicting with the SI definition of the prefix kilo (1000), is still common,
mostly in informal computer science contexts.
The IEC convention is now adopted by some organisations. Manufacturers of storage devices
often use the denary system to measure storage size. For example:
0 or 1 = 1 bit
4 bits = 1 Nibble
8 bits = 2 Nibbles = 1 byte
1 kilobyte = 1000 byte
1 megabyte = 1000000 bytes
1 gigabyte = 1000000000 bytes
1 terabyte = 1000000000000 bytes and so on.

The IEC convention for computer internal memories (including RAM) becomes:
1 kibibyte (1 KiB) = 1024 bytes
1 mebibyte (1 MiB) = 1048576 bytes
1 gibibyte (1 GiB) = 1073741824 bytes
1 tebibyte (1 TiB) = 1099511627776 bytes and so on
Example Question: A company advertises its backup memory device as having 500 GB of
storage. A customer wishes to know how many 8 MB files could be stored on the device. The
company claimed that up to 62 500 files (assuming each file is 8 MB) could be stored. The
customer calculated that 64 000 files could be stored.
Explain the difference between these two storage values. Show any calculations you use in your
explanation.
............................................................................................................................................................
..............................................................................................................
–company calculation is based on 1 GByte = 1000 Mbyte – so (500 × 1000)/8 = 62 500 files
– customer calculation based on 1 GByte = 1024 Mbyte – so (500 × 1024)/8 = 64000 files
– giving the difference of 1500 files [3]
Page | 58
16Different units of data can be used to represent the size of a file, as it changes in size.
Fill in the missing units of data, using the list given:
 byte
 gigabyte (GB)
 megabyte (MB)
 nibble
Smallest bit
……………………………………
……………………………………
Kilobyte (KB)
………………………………….
………………………………….
Largest Terabyte (TB)
( Summer 2018 P12)

17 Bytes, Kilobytes and Megabytes are units used for the amount of data stored in a computer.
(a) State which of these units is most appropriate for the following items of data.

A one page text document: ...............................................................................................................

A ten minute movie clip: ....................................................................................................................

A person‘s surname: .................................................................................................................. [3]

(b) A computer has a hard disk of 2 Terabytes.


How much is this in Gigabytes?
You must show your working.

............................................................................................................................................................

............................................................................................................................................................

............................................................................................................................................................

................................................................................................................................................. [2]
Page | 59
Candidate Example response

Examiner comment – high


In part (a) this candidate converted all four letters correctly
In part (b) this candidate managed to perform the bit shift correctly and converted the binary to
hexadecimal successfully.
Marks awarded for (a) = 2 out of 2
Marks awarded for (b) = 4 out of 4
Total mark awarded = 6 out of 6
Page | 60

Examiner comment – middle


In part (a) this candidate was not able to correctly convert any of the letters into binary.
In part (b) this candidate did manage to perform the bit shift correctly and converted the binary to
hexadecimal successfully. This was done on an initial incorrect binary value from part (a), but as
they could demonstrate the skill of a bit shift and convert those values in correct hexadecimal
values, they were awarded all four marks.
Marks awarded for (a) = 0 out of 2
Marks awarded for (b) = 4 out of 4
Total mark awarded = 4 out of 6
Page | 61

Examiner comment – low


In part (a) the candidate was able to convert two of the letters correctly for a mark.
In part (b) they did not manage to perform the bit shift correctly on either binary number, but they
could demonstrate enough skill for one mark in converting one of their binary values to the correct
hex value.
Marks awarded for (a) = 1 out of 2
Marks awarded for (b) = 1 out of 4
Total mark awarded = 2 out of 6
Page | 62
Topical Past Paper Questions

Q1) Summer 2015 P11


8 An alarm clock is controlled by a microprocessor. It uses the 24 hour clock. The hour is
represented by an 8-bit register, A, and the number of minutes is represented by another 8-bit
register, B.
(a) Identify what time is represented by the following two 8-bit registers.

Hours ............................................ Minutes ......................................... [2]


(b) An alarm has been set for 07:30. Two 8-bit registers, C and D, are used to represent the hours
and minutes of the alarm time.
Show how 07:30 would be represented by these two registers:

Hours Minutes [2]


(c) Describe how the microprocessor can determine when to sound the clock alarm.

............................................................................................................................................................

............................................................................................................................................................

............................................................................................................................................................

............................................................................................................................................................

............................................................................................................................................................

................................................................................................................................................. [3]
Page | 63
Q2) Summer 2015 P11
9 Draw a line to connect each question to the correct answer. [5]

Question Answer

What is the denary (base 10) equivalent


8
to the hexadecimal digit E?

If 1 GB = 2x then what is the value of


12
X?

How many bits are there in one byte? 14

If the broadband data download rate is


40 megabits per second, how many
19
seconds will it take to download a 60
MB file?

What is the denary (base 10) value of


30
the binary number 0 0 1 0 0 1 0 0 ?

What hexadecimal value is obtained


when the two hexadecimal digits C and 36
D are added together?

Examiner’s Comments on Question 9


The full range of marks was awarded for this question. Many candidates gained full marks. The most common errors were
miscalculations for 30, 19 and 12.
Page | 64
Q 3) Summer 2015 P12
10 Letters from the alphabet are represented in a computer by the following denary (base 10)
values:
A = 97 G = 103 I = 105 L = 108 N = 110
The word ―A L I G N‖ is stored as: 97 108 105 103 110
(a) Convert each of the five values to binary. The first one has been done for you. [2]
Letter Binary value
A (97): 0 1 1 0 0 0 0 1
L(108):
I (105):
G (103):
N (110):

(b) An encryption system works by shifting the binary value for a letter one place to the left. ―A‖
then becomes:

This binary value is then converted to hexadecimal; the hexadecimal value for ―A‖ will be:
C2
For the two letters ―L‖ and ―G‖, shift the binary values one place to the left and convert these
values into hexadecimal: [4]

Examiner’s comments on Questions 10(a) and 10(b)


Many candidates showed some knowledge of binary conversion in part (a) and could correctly convert the values. Some
candidates showed little knowledge and gave a random and incorrect response as a result.
In part (b) many candidates were able to correctly carry out the bit shift then covert the value to hex. Some candidates gained
marks for a correct bit shift but were unable to demonstrate the knowledge to convert the values to hex so gained two marks.
Candidates were awarded follow through marks if they had calculated the values incorrectly in part (a) for both their bit shift and
the hex conversion.
Page | 65
Q 4) Winter 2015 P11
4 (a) (i) Convert the following two hexadecimal numbers into binary:

[4]
(ii) Now perform the AND (logic) operation on each corresponding pair of binary bits in the two
numbers from part (i).

[2]
(iii) Convert your answer in part (ii) into hexadecimal.
............................................................................................................................................................
..................................................................................................................................................... [2]
(b) (i) The following code shows HTML ‗tag‘ pairs on either side of the text stating the colour that
each creates.
<font color ― # F F 0 0 0 0 ― > RED </font>
<font color ― # 0 0 F F 0 0 ― > GREEN </font>
<font color ― # 0 0 0 0 F F ― > BLUE </font>
<font color ― # X ― > YELLOW </font>
<font color ― # Y ― > MAGENTA </font>
<font color ― # Z ― > CYAN </font>
Yellow is a combination of red and green, magenta a combination of red and blue and cyan a
combination of green and blue.
State what 6-digit hexadecimal values should replace X, Y and Z in the above code.
X.......................................................................................................................................................
Y.........................................................................................................................................................
Z……………................................................................................................................................. [3]

(ii) Describe how other colours, such as a darker shade of blue, are created.

............................................................................................................................................................

............................................................................................................................................................

.................................................................................................................................................... [2]
Page | 66
(c) 1A – 16 – C5 – 22 – FF – FF is an example of a MAC address.
(i) Identify what the first six and last six hexadecimal digits represent.
First six digits.....................................................................................................................................
..........................................................................................................................................................
Last six digits ...................................................................................................................................
............................................................................................................................................................
..................................................................................................................................................... [2]
(ii) State why MAC addresses are used.
............................................................................................................................................................
..................................................................................................................................................... [1]
Examiners’ Comments Question 4(a) (b) and (c)
In part (a) most candidates were able to demonstrate a high level on knowledge in data representation and logic. Some candidates
made small errors but still gained later marks with follow through on their answers.
In part (b) some candidates were able to provide a correct response. Some candidates made an error in putting the two codes for
the two different colours, rather than combining the codes to create the colour requested.
In part (b)(ii) many candidates gave a vague response and did not describe that HTML codes are combined to create different
colours. Many candidates provided a minimum level answer, such as adding the colour black to blue. They did not add the
Computer Science aspect, that different HTML codes are combined to do this. Candidates need to make sure they are thinking
about the computer science aspect of the question in questions such as this one.
In part (c) many candidates did not recognise what information they needed to give. They provided conversions of the hex values
to denary or binary, rather than stating what the code actually represents.
Some candidates were too vague in stating what it represented, candidates need to be specific in their responses. In part (c)(ii)
some candidates were able to state that MAC addresses are a unique identifier for a device on a network. Many candidates were
not specific enough, stating that MAC addresses identified a device on a network, but not stating that the identification is unique.
Page | 67
Q 5) Winter 2015 P13
(b) The information from seven sensors is sent to an engine management system in the car. The
status of each sensor is stored in an 8-bit register; a value of 1 indicates a fault condition

For example, a register showing 0 1 0 1 1 0 0 0 indicates:


• temperature too high
• fuel pressure too low
• voltage too low

(i) Identify the fault condition(s) that the following register indicates:

............................................................................................................................................................
............................................................................................................................................................
.....................................................................................................................................................[2]
(ii) The system uses odd parity.
Write the correct parity bit in each register.

[2]

(iii) A car has a faulty airbag and the CO level is too high.
Write what should be contained in the 8-bit register.

(iv) Give the hexadecimal value of the binary number shown in part (iii).
............................................................................................................................................................
.....................................................................................................................................................[1]
Examiners’ Comments Question 2 (a) and (b)
Page | 68
In part (a) most candidates were able to gain some marks for a description of how sensors and the microprocessor would be used.
Some candidates missed naming the type of sensor that could be used. This would have gained further marks. Some candidates
were not specific in their answer, merely talking about comparing values, but specifically which values. Candidates need to make
sure they are specific to the question in their answer.
In part (b) many candidates were able to correctly identify the fault condition provided. Most were able to provide the correct
parity bit, and many were able to provide the correct vales in the register and convert this to hexadecimal. Candidates need to
make sure their answer is clear when providing hexadecimal and that it can be distinguished from any working.

Q 6) Winter 2015 P11


2 (a) Convert the hexadecimal number B5 into binary:
…………...........................................................................................................................................
Convert the binary number 1 1 1 1 0 1 1 0 into hexadecimal:
…………........................................................................................................................................[2]
(b) Give two examples where hexadecimal numbers are used in computer science.
1: ......................................................................................................................................................
2: .......................................................................................................................................................
.......................................................................................................................................................[2]
(c) State two benefits of using hexadecimal numbers in computer science.
1: .......................................................................................................................................................
...........................................................................................................................................................
2:.........................................................................................................................................................
.....................................................................................................................................................[2]
Examiners’ Comments Question 2(a) (b) and (c)
In part (a) many candidates were able to successfully carry out the conversions to gain both marks.
In part (b) candidates gave at least one suitable example. This was mainly for their use as codes for HTML colours. Some
candidates were able to provide a further example, such as MAC addresses.
In part (c) some candidates tried to name further examples, not understanding the question was asking for benefits. Some
candidates were able to gain a mark for stating that hexadecimal numbers can be easier to read than binary. Many candidates were
not able to provide a second benefit.
Page | 69
Q 7) Winter 2015 P11

10 Characters can be represented in a computer by a numerical code.


The following list shows 16 characters with their numerical codes in denary:
a = 97 d = 100 h = 104 m = 109 t = 116
b = 98 e = 101 i = 105 o = 111 u = 117
c = 99 g = 103 k = 107 r = 114 w = 119
. = 46 (code for the full stop)
Web addresses can be written using hexadecimal rather than denary. Hexadecimal codes are
preceded by a % sign. For example, the word ―c a g e‖ is written as:
either 99 97 103 101 (in denary)
or %63 %61 %67 %65 (in hexadecimal)
(a) Complete the conversion of the following web address into hexadecimal: [3]
w w W . c i e . o r g . u K
%77 %77 %77

b) Complete the web address from the given hexadecimal codes: [3]
%77 %77 %77 %2E %72 %6F %63 %6B %69 %63 %74 %2E %63 %6F %6D

w w W
Examiners’ Comments Question 10(a) and (b)
Some candidates were able to carry out the conversions with great accuracy. Some candidates had clearly not read the question in
full and were missing detail in their answer as a result, for example the code for a full stop (.). Candidates need to make sure they
read the whole of a question before writing their response, to make sure they do not miss any important details.
Page | 70
Q 7) Summer 2016 P11 & P13
7 Each seat on a flight is uniquely identified on an LCD above the seat. For example, seat 035C is
shown as:

The first three characters are digits that represent the row.
The fourth character is the seat position in that row. This is a single letter, A to F, that is stored as
a hexadecimal value.
Each of the four display characters can be stored in a 4-bit register. For example, 0 and C would
be represented as:

(a) Show how the 4-bit registers would store the remaining two characters, 3 and 5. [2]

(b) Identify which seat is stored in the following 4-bit registers.

Examiner Report Question 7 (a) and (b)


In part (a) most candidates were able to provide the correct binary values.
In part (b) most candidates could correctly convert the first three binary digits to 194. Some candidates could convert the final
binary value to E, but many candidates provided 14 as an answer to this, and did not fully convert this to the correct hexadecimal
value of E.
Page | 71
Q 8) Summer 2016 P11 & P13
12 (a) Name the following type of barcode:

....................................................................................................................................................[1]
(b) The barcode in part (a) contains the denary value 2 6 4 0
Convert this value to hexadecimal.
............................................................................................................................................................
.........................................................................................................................................................
Write the value as a 12-bit binary number. [4]

(c) An airport uses the type of barcode shown in part (a) to advertise local places of interest.
Describe how a visitor landing at the airport could use these barcodes to help plan their visit.
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
................................................................................................................................................[3]
Examiner Report Question 12(a), (b) and (c)
In part (a) many candidates were able to identify the type of barcode.
In part (b) some candidates were able to carry out the correct calculation and conversions. This calculation did prove challenging
to many candidates.
In part (c) many candidates were able to describe the process of a person scanning the QR code with their mobile device, this
linking to a website that would provide details about local tourist information. Some candidates were too vague in their
description, stating the barcode would be scanned, or scanning the phone with an app., but not explaining this would be done with
a mobile device.
Page | 72
Q 9) Summer 2016 P12
3 (a) Convert the following hexadecimal number into 12-bit binary:

4AF [3]

(b) The 2016 Olympic Games will be held in Rio de Janeiro. A timer that counts down to the
opening of the Games is shown on a microprocessor-controlled display.
The number of hours, minutes and seconds until the Games open are held in three 8-bitregisters.
The present register values are:
0 1 1 0 1 0 0 1 105 Hours

0 0 1 0 0 0 0 0 32 Minutes

0 0 0 1 0 1 0 0 20 Seconds

The timer will count down in seconds.


(i) Show the values in each 8-bit register 30 seconds after the time shown above:[3]

(ii) Write the hexadecimal value of the minutes register from part (b)(i).
.......................................................................................................................................[1]
Examiner Report Question 3(a), (b)(i) and (ii)
In part (a) most candidates made a correct conversion to binary.
In part (b)(i) some candidates were able to provide the correct three binary registers. A number of candidates did not fully
understand the question and added on the time, rather than deducting it. This gave them the wrong value for the minute’s register.
In part (b)(ii) most candidates were able to provide a correct hexadecimal conversion, either from the correct binary register, or as
a follow through answer.
Page | 73
Q 10) Winter 2016 P12
5 A computer uses an 8-bit register.
The 8-bit register contains binary integers.
(a) Write the denary (base 10) value represented by:

128 64 32 16 8 4 2 1
0 1 1 1 0 0 0 0

...............................................................................................................................................[1]
(b) All the bits in the register are shifted one place to the right as shown below.

Write the denary number that is represented after this shift.


...............................................................................................................................................[1]
(c) State the effect the shift to the right had on the original denary number from part (a).
...............................................................................................................................................[1]
(d) The original number in part (a) is shifted three places to the right.
(i) Show the new binary number: [1]

(ii) Write the equivalent denary number.


.......................................................................................................................................[1]
(e) Describe the problems that could be caused if the original binary number in part (a) is shifted
five places to the right.
............................................................................................................................................................

............................................................................................................................................................

.................................................................................................................................................... [2]

Examiner Report
In parts (a) and (b) most candidates could provide a correct conversion from binary to denary.
In part (c) many candidates could identify the effect that the shift had on the number. Some candidates were too
vague in their response stating the number had merely decreased.
In parts (c) and (d) most candidates could perform the shift and convert it to the correct denary value.
In part (e) most candidates could not accurately explain the effect of the shift. They were not able to express
that the right most bit would be lost from the register, making the number inaccurate.
Page | 74
Q 11) Winter 2016 P11& 13
10 (a) A manufacturer of aeroplane engines assigns a denary identification number (ID) to each
engine. One engine has the ID: 0431
(i) Convert this denary number to a 12-bit binary format. [2]

(ii) Show how this number would be represented in hexadecimal.


...........................................................................................................................................
........................................................................................................................................... [3]
(b) The current status of the engine is sent to a computer in the aeroplane.
Each piece of data collected is 8 bytes in size. Data collection occurs every 30 seconds.
Calculate the number of kilobytes that would be needed to store the data collected during a
10-hour flight. Show your working
................................................................................................................................................
...............................................................................................................................................
................................................. kilobytes [3]
(c) At the end of the flight, all of the data are sent to the aeroplane engine manufacturer using the
Internet. The computer in the aeroplane has a MAC address and an IP address.
State what is meant by these two terms.
MAC address ....................................................................................................................................
...........................................................................................................................................................
IP address .........................................................................................................................................
............................................................................................................................................................
.................................................................................................................................................... [2]
(d) When sending this data, security is very important. Data are sent over the Internet using
Transport Layer Security (TLS) protocol. Name the two layers that make up TLS.
1 ......................................................................................................................................................
2 ................................................................................................................................................. [2]
Examiner Report
In part (a)(i) many candidates incorrectly transcribed the value 431 as though it was a hexadecimal value. Candidates
must read the question to correctly establish what the value is, in this case it was a denary value.
In part (a)(ii) most candidates could correctly provide a hexadecimal conversion, some from follow through from part
(a)(i).
In part (b) some candidates could provide a full answer gaining 3 marks. Some candidates did not provide any
working out, so could not gain full marks. Candidates are reminded to provide full working out when the question asks
to show working.
In part (c) most candidates could provide the full version of the acronym for MAC and IP. Some candidates gained
marks by explaining what a MAC address or an IP address is.
In part (d) very few candidates could correctly identify either layer of TLS.
Page | 75
Q 12) March 2017 India
8 A register in a computer contains binary digits.

0 0 1 1 0 1 1 1

(a) The contents of the register could represent a binary integer.


Convert the binary integer to denary and hexadecimal.
Denary ......................................................................................................................................
Hexadecimal ............................................................................................................................. [2]
(b) The contents of the register could represent the ASCII value for the single denary digit ‗7‘.
Write down the ASCII value for ‗9‘ in binary, denary and hexadecimal.
Binary .......................................................................................................................................
Denary ......................................................................................................................................
Hexadecimal ............................................................................................................................. [3]
(c) Write in Register X the binary number you would use with AND gates to convert the ASCII
value of ‗7‘ to its binary integer value. [1]

0 0 1 1 0 1 1 1 ASCII

Register
X

Examiner Report
(a) This was generally well answered.
(b) Some candidates gave the contents of the register correctly in all three number systems. Common errors included
incorrectly stating the binary for the integer value of 9 rather than the binary value of the ASCII value for 9.
(c) Better candidates correctly identified the binary number required. A common error was not to mask out the two
ones for the ASCII code.

Q 13) Summer 2017 P11


1 The memory of a computer contains data and instructions in binary.
The following instruction is stored in a location of the memory.
0 0 1 0 1 0 0 1 1 1 1 1 1 1 0 0
(a) Convert the instruction into hexadecimal.
............................................................................................................................................................
............................................................................................................................................................
................................................................................................................................................... [2]
(b) Explain why a programmer might prefer to read the instruction in hexadecimal rather than in
Page | 76
binary.
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
.................................................................................................................................................. [2]
(c) Give two other uses of hexadecimal.
Use 1 ..............................................................................................................................................
..........................................................................................................................................................
Use 2 ...............................................................................................................................................
..................................................................................................................................................... [2]
Examiner’s Comments Question 1(a)
Many candidates correctly identified all four hexadecimal characters. Some candidates wrote 15 and 12 in place of F
and C. Candidates are reminded that they must fully convert binary to hexadecimal values to be awarded the marks.
1(b)
Many candidates provided accurate reasons for why hexadecimal is used. The most common answers given being
that it is easier to read and easier to identify errors. Some candidates made the error of stating that it is used as it will
take up less space in memory. Candidates must recognise this is incorrect as it will be stored as binary.
1(c)
Some candidates correctly identified at least one additional use of hexadecimal. The most common correct answer
given was a MAC address. Some candidates accurately stated it is used for colour codes in HTML, other candidates
gave a vague reference to this, e.g. colour in websites. Candidates must be accurate in their description and make
sure they fully describe the additional use.

Q 14) Summer 2017 P11


3 Steffi has a number of files of different sizes that contain her work. [4]
Tick to show whether each statement is true or false.
Statement True False
47KB is larger than 10MB.
250bytes is smaller than 0.5MB.
50GB is larger than 100MB.
1TB is smaller than 4GB.
Examiner Comment on Q 3
Most candidates correctly identified which statement was true or false. The most common incorrect answer given was
‘true’ given for 47 KB is larger than 10 MB. It was apparent that some candidates understood a KB to be larger than a
MB. Candidates are reminded to follow the instruction given and tick () the appropriate box. Some candidates used
crosses () instead or a mixture of both.
Page | 77
Q 15) Summer 2017 P12
5 (a) The denary number 57 is to be stored in two different computer registers.
Convert 57 from denary to binary and show your working.
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
...................................................................................................................................................[2]
(b) Show the binary number from part (a) as it would be stored in the following registers. [2]

Register 1

Register 2

(c) A binary number stored in a register can have many different uses, for example an address in
main memory.
Give two other uses for a binary number stored in a register.
Use 1 ...............................................................................................................................................
Use 2 .......................................................................................................................................... [2]
(d) A register in a computer contains binary digits.
0 0 1 1 1 0 1 0

The contents of the register represent a binary integer.


Convert the binary integer to hexadecimal.
............................................................................................................................................................
.....................................................................................................................................................[1]
Examiner Comment on Q 5(a)
Many candidates provided a correct binary value and demonstrated their working.
Examiner Comment on Q 5(b)
Many candidates correctly represented the value in the two different registers.
Examiner Comment on Q 5(c)
Some candidates identified two correct examples, but some candidates misunderstood the question. Candidates were
required to provide two further examples of what could be stored as a binary value in a register.
Examiner Comment on Q 5(d)
Most candidates provided a correct conversion to hexadecimal.
Page | 78
Q 16) Winter 2017 P12
1 A robot arm in a factory is programmed to move products.
The binary instructions to operate the robot arm are:

Operation Binary Instruction


UP 1 1 1 1

Down 0 0 0 1

Left 1 0 0 1

Right 0 1 1 0

Open 1 1 0 0

Close 0 0 1 1

Convert the values and write down the operation (e.g. RIGHT) carried out by the robot arm.
9 .............................................................................
1 .............................................................................
C .............................................................................
3 .............................................................................
F ............................................................................. [5]

Q 17) Winter 2017 P12


3 (a) Explain the differences between the binary number system and the denary number system.
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................... [4]
Page | 79
(b) Explain the process of converting the binary number 1010 into a denary number.
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................. [5]

Q 18) Winter 2017 P12


8 (a) A computer has 2048MB of RAM.
How many GB of RAM does the computer have?
Show your working.
............................................................................................................................................................
............................................................................................................................................................
......................................................................................................................................GB [2]
(b) Describe one item that is stored in RAM.
............................................................................................................................................................
............................................................................................................................................................
....................................................................................................................................................[2]
(c) Explain three ways that RAM is different to ROM.
1 .......................................................................................................................................................
............................................................................................................................................................
.........................................................................................................................................................
2 .......................................................................................................................................................
............................................................................................................................................................
.........................................................................................................................................................
3 ........................................................................................................................................................
............................................................................................................................................................
.................................................................................................................................................... [3]
Page | 80
Q 19) Winter 2017 P13
1 A washing machine has a small display screen built into it.
One use of the display screen is to show an error code when a problem has occurred with a
washing cycle.
(a) State whether the display screen is an input, output or storage device.
.................................................................................................................................................. [1]
(b) The display screen shows a hexadecimal error code:
E04
This error code means that the water will not empty out of the washing machine.
Convert this error code to binary.

(c) State why hexadecimal is used to display the error code.


............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
....................................................................................................................................................[1]
(d) Identify three sensors that could be used in the washing machine.
State what each sensor could be used for.
Sensor 1............................................................................................................................................
Use ...................................................................................................................................................
..........................................................................................................................................................
Sensor 2 ..........................................................................................................................................
Use ..................................................................................................................................................
.........................................................................................................................................................
Sensor 3 .........................................................................................................................................
Use .................................................................................................................................................
.................................................................................................................................................... [6]
Page | 81
Q 20) Winter 2017 P13

2 Data files are stored in different file formats.


Complete the table by providing a suitable file format for each file type. The first one has been
done for you. [3]

File type File format


Pictures .JPEG
Text
Sound
Video

Q 21) March 2018 P12 (India)


5 The IP address of a computer is stored as a set of four 8-bit binary numbers.
The network administrator converts each binary number into hexadecimal.
(a) Complete the table to show the hexadecimal equivalent of the binary IP address.
The first number has already been converted.

Binary IP address [3]


11000100 00010000 11111110 00001001
Hexadecimal
C4

(b) Explain why the network administrator uses hexadecimal.


............................................................................................................................................................

............................................................................................................................................................

............................................................................................................................................................

................................................................................................................................................... [2]

Comments on Question 5
(a) Many candidates answered this question well. Two common errors were not providing the full
register values for the last register. Some candidates only gave 9 as the value, but the values for
the whole register should have been provided, for example 09. It would be helpful if candidates
Page | 82
understood that even if they are asked to convert the whole register, any 0 value should also be
given.
Some candidates converted the value again for the first register. They should have provided the
response 10, but treated this as a denary value and further converted it giving an answer of A. It
would be helpful if candidates understood that the initial values from the conversion were
hexadecimal values and not a denary value of 10.
(b)Many candidates provided a good response for this question. The most common responses
were that it would make it easier to read and that fewer errors may be made.

Q 22) March 2018 P12 (India)


9 A 32-second sound clip will be recorded. The sound will be sampled 16000 times a second.
Each sample will be stored using 8 bits.
Calculate the file size in kilobytes. You must show all of your working.

File Size ..................................................................................................... kB [3]


Comments on Question 9
Many candidates provided a correct answer for this question. It would be helpful if candidates
clearly showed all the stages of their working in the work space. Some candidates scattered their
working around, outside of the provided answer space into other answer spaces, which has the
risk of being unseen by the examiner.
Page | 83
Q 23) Summer 2018 P11
1 Jane answers an examination question about computers and data correctly.
Six different words or numbers have been removed from her answer.
Complete the sentences in Jane‘s answer, using the list given. Not all items in the list need to be
used.
•2
• 10
• 16
• analogue
• binary
• denary
• digital
• hexadecimal
As humans, we process …………………………………… data, but a computer cannot process this
type of data. For a computer to be able to process data it needs to be converted to
…………………………………… data.
As humans, we mostly use a …………………………………… number system; this is a base
…………………………………… number system.
Computers use a …………………………………… number system; this is a base
…………………………………… number system. [6]

Q 24) Summer 2018 P11


2 Dheeraj identifies three hexadecimal numbers.
Write the denary number for each of the three hexadecimal numbers:
2A ....................................................................................................
101 ...................................................................................................
21E .................................................................................................. [3]
Working Space
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
....................................................................................................................................................
Page | 84
Q 25) Summer 2018 P12
1 Different units of data can be used to represent the size of a file, as it changes in size.
Fill in the missing units of data, using the list given:
 byte
 gigabyte (GB)
 megabyte (MB)
 nibble
Smallest bit
……………………………………
……………………………………
Kilobyte (KB)
………………………………….
………………………………….
Largest Terabyte (TB)
Page | 85
Q 26) Summer 2018 P12
3 A stopwatch uses six digits to display hours, minutes and seconds.
The stopwatch is stopped at:

An 8-bit register is used to store each pair of digits.


(a) Write the 8-bit binary numbers that are currently stored for the Hours, Minutes and Seconds.
[3]

(b) The stopwatch is started again and then stopped.

Write the denary values that will now be shown on the stopwatch. [3]

Q 27) Summer 2018 P12


4 Jafar is using the Internet when he gets the message:
―D03, page is not available‖
Jafar remembers that hexadecimal is often used to represent binary values in error codes.
Convert the hexadecimal number in the error message into 12-bit binary. [3]
Page | 86
Q 28) Winter 2018 P12
1 Computers use a character set to convert text into binary.
One character set that can be used is ASCII.
Each letter in ASCII can also be represented as a denary value.
(a) The word BUS has the denary values:
B U S
66 85 83
Convert the denary values into 8-bit binary. [3]

(b) Each letter in ASCII can also be represented as a hexadecimal value.


The word KEY has the 8-bit binary values:
K E Y
01001011 01000101 01011001
(i) Convert the three 8-bit binary values into hexadecimal.
01001011 ...............................................
01000101 ...............................................
01011001 ............................................... [3]
(ii) Give three other uses of hexadecimal notation in computer science.
1 ......................................................................................................................................................
2 ......................................................................................................................................................
3 ................................................................................................................................................ [3]

(iii) State two benefits of using hexadecimal notation to represent binary values.
Benefit 1 ..........................................................................................................................................
..........................................................................................................................................................
Benefit 2 ...........................................................................................................................................
.......................................................................................................................................................[2]
Page | 87
Q 29) Winter 2018 P13
4 The MAC address of a device is represented using hexadecimal. A section of a MAC address is
shown. Each pair of hexadecimal digits is stored using 8-bit binary.
(a) Complete the table to show the 8-bit binary equivalents for the section of MAC address. The
first number has already been converted. 6A FF 08 93 01101010 [3]

(b) Explain why data is stored as binary in computers.


............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
................................................................................................................................................. [2]

Q 30) March 2019 P12


1 (a) Elle has a file stored on her computer that is 20 MB in size. Jordan has a file that is 10GB in
size.
Tick () to show which is the larger file. [1]

File size Tick ()


20MB
10GB

(b) Bob has a file stored on his computer that is 3500kB in size. Gerty has a file that is 3MB in
size.
Tick () to show which is the larger file. [1]
File size Tick ()
3500kB
3MB
3 (a) A long distance running race uses an electronic counter that counts each competitor who
finishes the race.
The count is stored as binary in a 12-bit register.
A denary value of the count is displayed on a screen above the finish line.
(i) The screen currently displays:

0039
State the binary value that is currently stored to display the count shown.
............................................................................................................................................................
....................................................................................................................................................... [2]
Page | 88

(ii) More competitors cross the finish line and the screen now displays:

0350

State the binary value that is currently stored to display the count shown.
............................................................................................................................................................
...................................................................................................................................................... [2]
(iii) At the end of the race the binary value stored is:
011011000111
Give the denary value that would be displayed on the screen at the end of the race.
Show your working.
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
.........................................................................................................................................................

[2]

Q 1.31) Summer 2019 P11


1 Hexadecimal is used for MAC addresses.
Part of a MAC address is given:
97 – 5C – E1
Each pair of digits is stored as binary in an 8-bit register.
(a) Show what the binary register stores for each pair of the given digits. [6]
97

5C

E1

(b) Explain what is meant by a MAC address.


............................................................................................................................................................
Page | 89
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
....................................................................................................................................................... [4]
(c) Give two other examples where hexadecimal can be used.
Example 1 ..........................................................................................................................................
............................................................................................................................................................
Example 2 .........................................................................................................................................
....................................................................................................................................................... [2]
5 The following text is stored as a text file:

She sells sea shells on the seashore. The shells that she sells are sea shells I am sure.
Explain how lossless compression would compress this file.
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
............................................................................................................................................................
...................................................................................................................................................... [5]
90 | P a g e
Q 3) Summer 2015 P12
Q1) Summer 2015 P11

Q 4) Winter 2015 P11

Q2) Summer 2015 P11


Page | 91
Q 5) Winter 2015 P13 Q 7) Summer 2016 P11 & P13

Q 8) Summer 2016 P11 & P13

Q 6) Winter 2015 P11

Q 9) Summer 2016 P12

Q 7) Winter 2015 P11

Q 10) Winter 2016 P12


Page | 92
Q 11) Winter 2016 P11 & 13 Q 14) Summer 2017 P11

Q 15) Summer 2017 P12

Q 12) March 2017 India

Q 16) Winter 2017 P12

Q 13) Summer 2017 P11

Q 17) Winter 2017 P12

Q 18) Winter 2017 P12


Page | 93
Q 19) Winter 2017 P13 Q 23) Summer 2018 P11

Q 24) Summer 2018 P11

Q 20) Winter 2017 P13

Q 25) Summer 2018 P12

Q 21) March 2018 P12 (India)

Q 26) Summer 2018 P12

Q 22) March 2018 P12 (India)


Q 27) Summer 2018 P12
94 | P a g e

Q 28) Winter 2018 P12

Q 29) Winter 2018 P13


Page | 95

Q 30) March 2019 P12

Q 1.31) Summer 2019 P11


Page | 96

You might also like