0% found this document useful (0 votes)
13 views35 pages

Data Represen Topic

The document covers various questions and answers related to number systems, data representation, and microprocessor operations, particularly focusing on binary, hexadecimal, and denary conversions. It includes examples of how time is represented in registers, how alarms are set and triggered, and how characters are stored in memory using ASCII values. Additionally, it discusses the implications of shifting binary values and the advantages of using hexadecimal for programming and debugging.
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)
13 views35 pages

Data Represen Topic

The document covers various questions and answers related to number systems, data representation, and microprocessor operations, particularly focusing on binary, hexadecimal, and denary conversions. It includes examples of how time is represented in registers, how alarms are set and triggered, and how characters are stored in memory using ASCII values. Additionally, it discusses the implications of shifting binary values and the advantages of using hexadecimal for programming and debugging.
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/ 35

Data representation topical

Saturday, July 29, 2023 4:34 PM

NUMBER SYSTEMS
Q. 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.
[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: [2] (Q8/11/M/J/15)

c) Describe how the microprocessor can determine when to sound the


clock alarm. [3] (Q8abc/11/M/J/15)
Ans.
a) hours: 18 minutes: 53
b) Hours (C)
00000111
Minutes (D)
00011110
c) Any three from:
– reads values in registers “C” and “D”
– and checks the values against those stored in registers “A” and “B”
(NOTE: the first two statements can be interchanged, i.e. “A” and “B”
read first)
– If values in corresponding registers are the same
– the microprocessor sends a signal to sound alarm/ring

Q. Draw a line to connect each question to the correct answer. [5]


(Q9/11/M/J/15)

2210 Page 1
Ans.
5/6 matches – 5 marks
4 matches – 4 marks
3 matches – 3 marks
2 matches – 2 marks
1 match – 1 mark

2210 Page 2
Q. Give the denary (base 10) value of the byte: 1 0 1 1 1 1 1 0 [1]
(Q5c/12/M/J/15)
Ans.
• 190

Q. 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]

2210 Page 3
b) An encryption system works by shifting the binary value for a letter one
place to the left. “A” then becomes:
11000010
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:
Hexadecimal
L: ⬜⬜⬜⬜⬜⬜⬜⬜ ..............................
G: ⬜⬜⬜⬜⬜⬜⬜⬜ .............................. [4]
(Q10/12/M/J/15)
Ans.
a) 1 mark for two correct lines, 2 marks for four correct lines

b) 1 mark for each correct binary value 1 mark for each correct
hexadecimal value

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] {from ch 10: Logic
circuits}
iii) Convert your answer in part (ii) into hexadecimal. [2] (Q4a/12/O/N/15)

2210 Page 4
iii) Convert your answer in part (ii) into hexadecimal. [2] (Q4a/12/O/N/15)
Ans.
i) For each hex number, 2 marks if all correct, 1 mark for 2 correct
conversions

ii) 2 marks if all correct, 1 mark for 2 correct conversions – Follow through
1 1 0 1 ⬜0 0 1 0 ⬜0 1 1 0
iii) 2 marks if all correct, 1 mark for 2 correct conversions – Follow through
D26

Q. A digital alarm clock is controlled by a microprocessor. It uses the 24-


hour clock system (i.e. 6 pm is 18:00). Each digit in a typical display is
represented by a 4-digit binary code.

a) What time is shown on the clock display if the 4-digit binary codes are:
[2]

b) What would be stored in the 4-digit binary codes if the clock display
time was: [4]

c) The clock alarm has been set at 08:00. Describe the actions of the
microprocessor which enable the alarm to sound at 08:00. [2]
(Q4/01/SP/16)
Ans.
a) 1 mark for hours; 1 mark for minutes
16 : 49
1 mark 1 mark
b) 1 mark for each digit
0 0 0 1 1st digit
0 1 1 1 2nd digit
0 0 1 0 3rd digit
1 0 0 1 4th digit

2210 Page 5
1 0 0 1 4th digit
c) Any two from:
– microprocessor compares present time with stored time
– if the values are the same
– sends signal to sound alarm

Q. When a key is pressed on the keyboard, the computer stores the ASCII
representation of the
character typed into main memory.
The ASCII representation for A is 65 (denary), for B is 66 (denary), etc.
There are two letters stored in the following memory locations:
Location 1: A
Location 2: C
a) i) Show the contents of Location 1 and Location 2 as binary using 8 bits.
Location 1 ⬜⬜⬜⬜⬜⬜⬜⬜
Location 2 ⬜⬜⬜⬜⬜⬜⬜⬜ [2]
ii) Show the contents of Location 1 and Location 2 as hexadecimal.
Location 1 .............................................
Location 2 ............................................. [2]
b) The following machine code instruction is stored in a location of main
memory:
1111101010010111
Convert this binary pattern into hexadecimal. [4]
c) Explain why a programmer would prefer to see the contents of the
locations displayed as hexadecimal rather than binary, when debugging
his program that reads the key presses. [2] (Q13/01/SP/16)
Ans.
a) i) Location 1 0 1 0 0 0 0 0 1
Location 2 0 1 0 0 0 0 1 1
ii) 41
43
b) FA97
c) – easier to identify values
– easier to spot errors

Q. Each seat on a flight is uniquely identified on an LCD above the seat. For
example, seat 035C is shown as:
0 3 5 C
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:
8 4 2 1
0 0 0 0 0
C 1 1 0 0
a) Show how the 4-bit registers would store the remaining two characters,
3 and 5. [2]
3 ⬜⬜⬜⬜
5 ⬜⬜⬜⬜
b) Identify which seat is stored in the following 4-bit registers. [2]
(Q7/11/M/J/16)

2210 Page 6
Ans.
a) 1 mark for each correct binary value
3: 0 0 1 1
5: 0 1 0 1

b)

Q. 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]
⬜⬜⬜⬜ ⬜⬜⬜⬜ ⬜⬜⬜⬜ (Q12b/11/M/J/16)
Ans.

Q.
a) Convert the following hexadecimal number into 12-bit binary:
4 A F [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-bit registers.
The present register values are:
01101001 105 hours
00100000 32 minutes
00010100 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:
⬜⬜⬜⬜⬜⬜⬜⬜ hours
⬜⬜⬜⬜⬜⬜⬜⬜ minutes
⬜⬜⬜⬜⬜⬜⬜⬜ seconds [3]
ii) Write the hexadecimal value of the minutes register from part (b)(i).

2210 Page 7
ii) Write the hexadecimal value of the minutes register from part (b)(i).
[1] (Q3/12/M/J/16)
Ans.
a) 1 mark for each nibble
0100 1010 1111
b) i) 0 1 1 0 1 0 0 1 105 hours 1 mark
00011111 31 minutes 1 mark
00110010 50 seconds 1 mark
ii) 1F

Q. A computer uses an 8-bit register.The 8-bit register contains binary


integers.
a) Write the denary (base 10) value represented by: [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] (Q5/12/O/N/16)
Ans.
a) 112
b) 56
c) divided by 2 // value 112 was halved // multiplied by 0.5
d) i) 0 0 0 0 1 1 1 0
ii) 14
e) Any two from:
– run out of places to the right of register / at the end of register
– right-most 1 would be lost
– number would become 3 instead of 3.5
– loss of precision

Q. A security system is installed in a house. A hexadecimal number is


entered to activate or deactivate the alarm.
a) The alarm code is set to hexadecimal number 2 A F
Show how this number would be stored in a 12-bit binary register.

2210 Page 8
Show how this number would be stored in a 12-bit binary register.
⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜ [3] (Q11a/12/O/N/16)
Ans.
1 mark per nibble
0010 1010 1111

Q. A manufacturer of aeroplane engines assigns a denary identification


number (ID) to each engine. One engine has the ID: 0431
a) i) Convert this denary number to a 12-bit binary format. [2]
ii) Show how this number would be represented in hexadecimal. [3]
(Q10a/13/O/N/16)
Ans.
i) 2 marks for 3 correct binary conversions, 1 mark for 2 correct binary
conversions
000110101111
ii) A F

Q. The memory of a computer contains data and instructions in binary.The


following instruction is stored in a location of the memory.
0010100111111100
a) Convert the instruction into hexadecimal. [2]
b) Explain why a programmer might prefer to read the instruction in
hexadecimal rather than in binary. [2]
c) Give two other uses of hexadecimal. [2] (Q1/11/M/J/17)
Ans.
a) 1 mark for any two correct values, 2 marks for all 4 correct values.
29FC
b) Two from:
• Easier/quicker to understand/read
• Easier to debug/identify errors
• Fewer digits are used / shorter // takes up less space on screen // more
can be shown on screen / page
c) Two from:
• Notations for colour in HTML // HTML colour (codes)
• Error messages
• MAC address // IP address
• Locations in memory
• Memory dump

Q. 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]
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. [2]
d) A register in a computer contains binary digits.
00111010
The contents of the register represent a binary integer. Convert the
binary integer to hexadecimal. [1] (Q5/12/M/J/17)
Ans.

2210 Page 9
Q. A robot arm in a factory is programmed to move products.
The binary instructions to operate the robot arm are:

The instructions are entered as hexadecimal values.


An operator enters the values:
91C3F
Convert the values and write down the operation (e.g. RIGHT) carried
out by the robot arm.
9 .............................................................................
1 .............................................................................
C .............................................................................
3 .............................................................................
F .............................................................................[5] (Q1/12/O/N/17)
Ans.
1 mark per correct instruction:
9 – LEFT
1 – DOWN
C – OPEN

2210 Page 10
C – OPEN
3 – CLOSE
F – UP

Q. a) Explain the differences between the binary number system and the
denary number system. [4]
b) Explain the process of converting the binary number 1010 into a denary
number. [5] (Q3/12/O/N/17)
Ans.
a) Any four from (Max 2 per number system) :
• A binary number system is a base-2 system
• A denary number system is a base-10 system
• A binary number system uses 0 and 1 values
• A denary number system uses 0 to 9 values
• A binary number system has units/ placeholders/column headings that
increase by the power of 2
• A denary number system has units/ placeholders/column headings that
increase by the power of 10
• Binary has more digit for the same value// Denary has less digits for the
same value
b) Five from:
• Correct column headings / place holders by example
• Correctly place a 1 or a 0 for each column
• Identify the columns to be added
• Add together the (denary) values identified...
• ...this will give a total which is the denary number/answer
• Answer is 10

Q. 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.
⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜ [3]
c) State why hexadecimal is used to display the error code. [1]
(Q1bc/13/O/N/17)
Ans.
b) 1 mark for each nibble
1110 0000 0100
c) Any one from:
– Hexadecimal codes can fit in a smaller display rather than a full text
based message
– Smaller amount of memory needed to store the hex error messages
than text based

Q. 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

2210 Page 11
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]
(Q1/11/M/J/18)
Ans.
1 mark for each correct answer, in the given order:
− analogue
− digital
− denary
− 10
− binary
−2

Q. Dheeraj identifies three hexadecimal numbers.Write the denary number


for each of the three hexadecimal numbers: [3] (Q2/11/M/J/18)
• 2A
• 101
• 21E
Ans
− 42
− 257
− 542

Q. A stopwatch uses six digits to display hours, minutes and seconds.


The stopwatch is stopped at:
02 31 58
Hours Minutes Seconds
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]
Hours ⬜⬜⬜⬜⬜⬜⬜⬜
Minutes ⬜⬜⬜⬜⬜⬜⬜⬜
Seconds ⬜⬜⬜⬜⬜⬜⬜⬜
b) The stopwatch is started again and then stopped. When the watch is
stopped, the 8-bit binary registers show:
Hours 0 0 0 0 0 1 0 1
Minutes 0 0 0 1 1 0 1 0
Seconds 0 0 1 1 0 1 1 1
Write the denary values that will now be shown on the stopwatch. [3]
(Q3/12/M/J/18)

Ans.
a) 1 mark for each correct register
Hours 0 0 0 0 0 0 1 0
Minutes 0 0 0 1 1 1 1 1
Seconds 0 0 1 1 1 0 1 0
b) One mark per section
Hours: 05
Minutes: 26

2210 Page 12
Minutes: 26
Seconds: 55

Q. 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] (Q4/12/M/J/18)
⬜⬜⬜⬜ ⬜⬜⬜⬜ ⬜⬜⬜⬜
Ans.
One mark per nibble
1101 0000 0011

Q. 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]
66 ⬜⬜⬜⬜⬜⬜⬜⬜
85 ⬜⬜⬜⬜⬜⬜⬜⬜
83 ⬜⬜⬜⬜⬜⬜⬜⬜
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.
[3]
iii) State two benefits of using hexadecimal notation to represent binary
values. [2] (Q1/12/O/N/18)
Ans.
a) 1 mark for each correct 8-bit binary number
66 0 1 0 0 0 0 1 0
85 0 1 0 1 0 1 0 1
83 0 1 0 1 0 0 1 1
b) i) 1 mark for each correct hexadecimal number
4B
45
59
ii) Three from:
• (HTML) colour codes
• Error messages
• MAC addresses
• IP addresses
• Assembly language
• Memory dump
• Locations in memory
iii) Two from:
• Easier to read/write/understand (for humans)
• Easier to remember (for humans)
• Short way to represent binary // Uses less screen/display space

2210 Page 13
• Short way to represent binary // Uses less screen/display space
• Fewer errors made (in data transcription)
• Easier to debug (for humans)

Q. 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. [3]

b) Explain why data is stored as binary in computers. [2] (Q4/13/O/N/18)


Ans.
a) 1 mark for each correct conversion
01101010 | 11111111 | 00001000 | 10010011
b) • Computers use switches / logic gates
• Only uses 2 states / On or Off / 1 or 0

A. The library has a website that customers can use to search for a book.
i) The website has a background colour with the hexadecimal colour code
#F92A10 The colour code is stored in two 12-bit binary registers. Show
how the colour code would be stored in the registers.
• F92 ⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜
• A10 ⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜
[6] (q1c(i)/13/O/N/19)
Ans.

Q. 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.
• 97
• 5C
• E1 [6]
(Q1/11/M/J/19)
Ans.

2210 Page 14
a)

Q. The data from a sensor must be converted from analogue to digital to


be processed by a computer.
a) State what is meant by analogue data. [1]
b) State what is meant by digital data . [1] (Q3/12/O/N/19)
Ans.
a) One from:
• Continuous data // by description
• Non-discrete data // by description
• By example, e.g. data such as a sound wave
b) One from:
• Discrete data that has only two values
• By example, e.g. binary data / 1’s and 0’s

Q. An 8-bit binary register contains the value:


00110100
a) Convert the binary value to denary. [1]
b) The contents of the register shifted one place to the right would give the
result:
00011010
The contents of the register shown at the start of question 4 are shifted
two places to the left. Show the contents of the register after this shift
has taken place.
⬜⬜⬜⬜⬜⬜⬜⬜ [1]
c) State the effect this shift has on the denary value in part (a). [1]
(Q4/12/O/N/19)
Ans.
a) 52
b) 1 1 0 1 0 0 0 0
c) It is multipled by four

Q. A low-level language needs to be converted to binary before it can be


processed by a computer.
i) Give the 8-bit binary value of the two denary values:
180 ..........................................................................................................
201 ..........................................................................................................
[2]
ii) Give the 12-bit binary value of the denary value 250. [1]
iii) Binary can be represented as hexadecimal to make it easier to read.
Give the hexadecimal values of the 8-bit binary values:
10010011

2210 Page 15
10010011
00011101 .[2] (Q9d/11/M/J/20)
Ans.

Q. (a) Give the denary value of each of the three 12-bit binary values.
i) 000000001100
.............................................................................................. [1]
ii) 000011000110
.............................................................................................. [1]
iii) 010011000001
.............................................................................................. [1]
b) 12-bit binary values can also be represented as hexadecimal values.
Give the hexadecimal value of the 12-bit binary value. 000011101001 [3]
(Q7/12/M/J/20)
Ans.

Q. Benedict has a computer that is assigned an Internet Protocol (IP)


address. The IP address is:198.167.214.0The IP address is represented as
denary values.
a) Convert the denary values 167 and 214 from the IP address to 8-bit
binary. [2] (Q1a/11/M/J/21)
Ans. One mark per each correct register.
• 10100111
• 11010110

Q. The hexadecimal colour code #43B7F0 is stored in three 8-bit registers.


Give the 8-bit binary values for each part of the hexadecimal code.
43 ⬜⬜⬜⬜⬜⬜⬜⬜
B7 ⬜⬜⬜⬜⬜⬜⬜⬜
F0 ⬜⬜⬜⬜⬜⬜⬜⬜[6] (Q1bii/12/O/N/20)
Ans.
One mark per each nibble:
43 0 1 0 0 0 0 1 1
B7 1 0 1 1 0 1 1 1
F0 1 1 1 1 0 0 0 0

Q. a Four denary to 8 bit binary conversions are given. Tic to show if


each denary to 8 bit binary conversion is Correct or Incorrect.

2210 Page 16
b) Convert the 12-bit binary number into hexadecimal.
1 1 0 0 0 1 0 0 0 0 0 0 [3] (Q3/13/O/N/20)
Ans.

Q. A denary value can be converted into hexadecimal and binary.


a) Complete the table to show the hexadecimal and 8-bit binary values of
the given denary values. [6]

b) Give two benefits, to users, of converting binary values to hexadecimal.


[2]
c) Hexadecimal is used to represent Hypertext Markup Language (HTML)
colour codes in computer science. Identify three other ways that
hexadecimal is used in computer science. [3] (Q1/12/M/J/21)
Ans.

2210 Page 17
Q. a)Denary is a number system that is used by programmers. Tick (✓) one
box to show whether denary is a base-2, base-10 or base-16 number
system.
Tick (✓)
⬜Base-2
⬜Base-10
⬜Base-16 [1]
b) Hexadecimal values can be used to represent denary values. Convert
these four hexadecimal values into denary values.
05 ......................................................
20 ......................................................
1A ......................................................
AB ......................................................[4]
c) Hexadecimal values can also be converted to binary values. Tick (✓) one
box to show the correct 8-bit binary value for each hexadecimal value.
(i) Hexadecimal value 25
Tick (✓)
00011001
00100101
10100001 [1]
(ii) Hexadecimal value 1B
Tick (✓)
⬜00011011
⬜10110001

2210 Page 18
⬜10110001
⬜00011010 [1]
d) (i) Give one way that hexadecimal is used in website development. [1]
(ii) Give one way that hexadecimal is used in low-level programming. [1]
(Q1/12/O/N/21)
Ans.

Q. A computer is used to record how many people have entered a concert.


This value is stored using 10-bit binary.The current binary value stored
is: 0001110111
a) Convert this binary value to denary. [1]
b) When the concert starts, 314 people have entered. State the binary
value that will be stored in the computer. [2]
c) Convert the denary number 314 to hexadecimal. [3]
(Q10/3175/12/M/J/21)
Ans.

Q. All data needs to be converted to binary data so that it can be processed

2210 Page 19
Q. All data needs to be converted to binary data so that it can be processed
by a computer.
a) Explain why a computer can only process binary data. [2]
b) The denary values 64, 101 and 242 are converted to 8-bit binary values.
Give the 8-bit binary value for each denary value. [3]
c) The hexadecimal values 42 and CE are converted to binary.
Give the binary value for each hexadecimal value. [4]
(Q4/11/M/J/22)
Ans.
a)
• Computer consist of transistors / logic circuits/gates …
• … that can only store/process data in two states / high-low / on-off / 1
and 0
b)
• 01000000
• 01100101
• 11110010
c)
• 0100 (1 mark) 0010 (1 mark)
• 1100 (1 mark) 1110 (1 mark)

Q. Denary values are converted to binary values to be processed by a


computer.
Draw one line from each denary value to the correctly converted 8-bit
binary value.

Working space
................................................................................................................
................................................................................................................
................................................................................................................
................................................................................................................
................................................................................................................
.................................. [3]
b) Binary values can also be converted to denary values. Give the correct
denary value for the 12-bit binary value 000101010111 Show all your
working. [2] (Q1/12/M/J/22)

Q. Hexadecimal is used for Hypertext Markup Language (HTML) colour


codes.An HTML colour code is: #2F15D6
Each pair of digits is stored as binary in an 8-bit register.(a) Give the

2210 Page 20
Each pair of digits is stored as binary in an 8-bit register.(a) Give the
8-bit binary value that would be stored for each pair of hexadecimal
digits.
2F ⬜⬜⬜⬜⬜⬜⬜⬜
15 ⬜⬜⬜⬜⬜⬜⬜⬜
D6 ⬜⬜⬜⬜⬜⬜⬜⬜
Working space
................................................................................................................
................................................................................................................
................................................................................................................
................................................................................................................
................................................................................................................
.................................. [6] (Q2a/12/M/J/22)

Q. The computer uses 12-bit binary registers to store data whilst it is being
processed. Customers are given a denary ticket number.
i) Give the 12-bit binary value that is stored in the register for each denary
ticket number.
100..........................................................................................
235..........................................................................................
301 .......................................................................................... [3]
ii) Show the denary ticket number that would be given to the customer for
each 12-bit binary value.
000000010110 .........................................................................................
000001110111 .........................................................................................
001101011001 .........................................................................................
[3]
iii) Binary values can also be represented as hexadecimal values. Show the
hexadecimal value that represents each of the two 12-bit binary values.
000010010101 .........................................................................................
101011010001 .........................................................................................
[4] (Q1f/12/O/N/22)
Ans.
i) 000001100100
• 000011101011
• 000100101101
ii) 22
• 119
• 857
iii) One mark for two correct characters in the correct place, two marks for
three
• 095
• AD1

Q. Denary values are converted to binary values to be processed by a


computer.
a) Draw one line from each denary value to the correctly converted 8-bit
binary value. [3]

2210 Page 21
b) Binary values can be converted to hexadecimal values. Give the
hexadecimal value for the 16-bit binary value 0000100110101110 [3]
(Q2/13/O/N/22)
Ans.

a)

b) One mark for two correct characters, two marks for three correct
characters, three marks for four correct characters, in the
correct place
• 09AE

Q. A school network has several computers.


Each computer in the network has a media access control (MAC)
address.
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) Complete the binary register for these two pairs of digits.
• 97 ⬜⬜⬜⬜⬜⬜⬜⬜
• 5C ⬜⬜⬜⬜⬜⬜⬜⬜ [4]
d) Another value is stored as binary in a register. 0 1 0 1 0 0 1 0
i) A logical left shift of two places is performed on the binary value.
Complete the binary register to show its contents after this logical left
shift. ⬜⬜⬜⬜⬜⬜⬜⬜ [1]

2210 Page 22
shift. ⬜⬜⬜⬜⬜⬜⬜⬜ [1]
ii) State one effect this logical shift has on the binary value. [1]
e) Negative denary numbers can also be represented as binary using two’s
complement. Complete the binary register for the denary value −54.
You must show all your working. [2]
Working space: .......................................................................................
................................................................................................................
................................................................................................................
................................................................................................................
.......................................................................
Register: ⬜⬜⬜⬜⬜⬜⬜⬜ (Q1ade/01/SP/23)
Ans.
a) One mark per each correct four bits
• 97 1 0 0 1 0 1 1 1
• 5C 0 1 0 1 1 1 0 0
d) 0 1 0 0 1 0 0 0
ii) The value becomes incorrect because the left most bits are lost
e) One mark for method, e.g. conversion to binary then flipping and
adding 1.One mark for correct answer.
11001010

Q. Hexadecimal is used for MAC addresses.


c) Give two other examples where hexadecimal can be used. [2]
(Q1c/11/M/J/19)
Ans. Two from e.g:
• Colour codes // colour in HTML / CSS
• Error messages
• Location in memory
• Memory dump // debugging
• ASCII // Unicode
• Assembly language
• IP address
• URL

Q. HTML colour codes and Media Access Control (MAC) addresses are two
examples of where hexadecimal is used in Computer Science. Give two
other examples of where hexadecimal can be used in Computer Science.
[2] (Q2b/12/M/J/22)
Ans. Any two from:
• IP address
• Memory dump
• Error messages/codes
• Assembly language // low-level language
• URL // web address
• Location in memory

Q. A school network has several computers. Each computer in the network


has a media access control (MAC) address. Hexadecimal is used for MAC
addresses.
c) Give two other uses of hexadecimal in computer science. [2]
(Q1c/01/SP/23)
Ans. Any two from:
• colour codes // colour in HTML/CSS
• error messages
• Locations in memory
• memory dump // debugging
• IP(v6) address

2210 Page 23
• IP(v6) address
• ASCII // Unicode
• assembly language
• URL.
___________________________________
CALCULATION OF FILE STORAGE
Q. Each image taken requires 1 MB of storage. If the camera captures an
image every 5 seconds over a 24 hour period, how much storage is
required? Give your answer in gigabytes and show all your working. [2]
(Q5b/12/O/N/15)
Ans.
1 mark for correct calculation, 1 mark for correct answer
– number of photos = 12 × 60 × 24 = 17,280
memory requirement = 17280/1024 = 16.875 16.9 (16.875)
– (17280/1000 = 17.28 is acceptable or 17.28/17.3

Q. A security system records video footage. One minute of video requires


180 MB of storage. The recording system can store several hours of
video footage.
b) Calculate how much storage would be needed for 2 hours of video
footage. Show your working and give the answer in Gigabytes (GB). [2]
(Q5b/13/O/N/15)
Ans.
2 hours = 120 minutes
120 × 180 = 21,600
21600/ 102or 21600/ 1000) = 21.14 GB (or 21.6GB) (1 mark for correct
answer and 1 mark for correct calculation)

Q. MP3 file compression reduces the size of a music file by 90%.


a) A music track is 80 MB in size. Calculate the file size after compression.
................................................................................................................
How many MP3 files of the size calculated above could be stored on an
800 MB CD?
................................................................................................................
[2] (Q9a/13/O/N/15)
Ans.
a) 8 MB
100

Q. Computer memories are measured in terms of the number of bytes. (a)


i) What is meant by the term byte? [1]
ii) The number of bytes in a Gigabyte can be written as 2^x What is the
value of x? [1] (Q8a/01/SP/16)
Ans.
i) Any one from:
– unit of data/memory
– 8 bits
– used to represent a character
ii) 30

Q. 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. [3] (Q10b/13/O/N/16)
Ans.
2 marks for working + 1 mark for correct answer
Working – 1200 × 8 = 9600

2210 Page 24
Working – 1200 × 8 = 9600
– 9600/1024 (or 9600/1000)
Answer
– 9.4 or 9.6 kilobytes

Q. te has a number of les of di erent si es that contain her wor . Tic


to show whether each statement is true or false.
3 11 J 17

Ans.

Q. A computer has 2048MB of RAM.


How many GB of RAM does the computer have?
Show your working [2] (Q8a/12/O/N/17)
Ans.
1 mark for correct calculation method, 1 mark for correct answer: •
2048/1024 (or 1024 × 2)
• 2 GB

Q. Kamil wants to store a 16-bit colour image file. The image size is 1000
pixels. Calculate the size of the file. Give your answer in bytes. Show
your working. [2] (Q9b/13/O/N/17)
Ans.
1 mark for calculation, 1 mark for correct answer:
– 1000 × 16
– 16000/8
– Answer is 2000 bytes

Q. 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)

2210 Page 25
• megabyte (MB)
• nibble
The units of data increase in size from smallest to largest. [4]
(Q1/12/M/J/18)

Ans.
1 mark for each unit, in the given order:
– nibble
– byte
– megabyte (MB)
– gigabyte (GB)

A. Marley also needs to store ten 8-bit colour images in a file for his
project. Each image is 500 pixels wide and 300 pixels high. Calculate the
total file size in megabytes (MB) for all Marley’s images. Show all your
working. [3] (Q4bi/12/M/J/19)
Ans. 2 marks for any two correct stages of
working, one mark for correct
answer.
• 500 * 300 * 10 // 150 000 *10
• 8 then ÷ 8 (anywhere in the process)
• 1 500 000 ÷ 1024÷ 1024 // 1 500 000 ÷ 1 048 576
• = 1.43 MB

Q. Computer memory size is measured in multiples of bytes.Four


statements about computer memory sizes are given in the table.Tick (✓)
to show if the statement is True or False. [4] (Q1/12/O/N/19)

Ans.

2210 Page 26
Q. An image is to be stored electronically. The image is 1024 pixels wide by
100 pixels high. The image has a 32-bit colour depth.
a) Calculate the file size in kilobytes of the image. You must show all of
your workings. [2] (Q8a/12/M/J/21)
Ans.
One mark for correct answer:− 400 kB
One mark for one correct stage of working e.g.:
− 1024 * 100 = 102400
− 102400*32 = 3276800
− 3276800 / 8 = 409600
− 409600 / 1024

A. An image is stored on a computer. The image is 16-bit colour and is 100


pixels high and 150 pixels wide.Calculate the file size of the image in
bytes. Show all your working. [3] (Q5/11/M/J/22)
Ans. Two marks for two correct stages of
working, one mark for correct final
answer.
• 100 × 150
• 15,000 × 16 // 15,000 × 2
• 240,000/8
• 30,000

Q. Jessica wants to store a large number of small thumbnail images on a


USB flash memory drive.
Each thumbnail image is 16-bit colour and is 100 pixels wide and 100
pixels high.
She has 5MB of storage space available on her USB flash memory drive.
Calculate how many images she can store in the 5MB of storage space.
Show all your working. [4] (Q3/13/O/N/22)
Ans. One mark for the correct answer
• 262 // 250
Three marks for three stages of working
• 100 × 100
• 10 000 * 16 then / 8 // 10 000 *2
• 20 000 / 1024 or 1000 = 1000 19.5 kB // 20 kB
• 5 × 1024 = 1024 5120 // 5 × 1000 = 1000 5000
• 5120 / 19.5 // 5000 / 20
___________________________________

FILE COMPRESSION
2210 Page 27
FILE COMPRESSION
Q. Seven computer terms and seven descriptions are shown below. Draw a
line to link each computer term to its most appropriate description. [6]
(Q2/12/O/N/15) {includes terms from chapter 4: software}

Ans.

2210 Page 28
Q. MP3 file compression reduces the size of a music file by 90%.
b) i) Explain how MP3 files retain most of the original music quality. [2]
ii) State the type of file compression used in MP3 files. [1]
iii) Name another file compression format. [1] (Q9b/13/O/N/15)
Ans.
i) Any two from:
– removes sounds human ear can’t hear very well
– if two sounds played at same time, softer sound removed
– uses perceptual music shaping
ii) Lossy
iii) One from, for example:
– jpeg
– MP4
– zip
– gif

Q. Nigel wants to send a large text file electronically to Mashuda.


a) Describe how the size of the text file can be reduced. [3]
(Q4a/12/M/J/16)
Ans.
Any three from:
– The file can be compressed
– The compression that is used is lossless (not lossy)
– use of a compression algorithm
– repeated words can be indexed
– repeated word sections (e.g. “OU”) can be replaced by a numerical

2210 Page 29
– repeated word sections (e.g. “OU”) can be replaced by a numerical
value
– reference to zip files
– save file as a pdf/convert to pdf

a) Gurdeep wants to send a large file to Jennifer over the Internet. State
two benefits of compressing the file to send it. [2]
b) Two types of compression are lossy and lossless. Choose the most
suitable type of compression for the following and explain your choice.
i) Downloading the code for a computer program [3]
ii) Streaming a video file [3] (Q13/11/M/J/17)
Ans.
a) Two from:
• Smaller file to transmit
• The file is transmitted quicker
• Uses / requires less bandwidth
b) i) • Lossless (compression)...
• ..it is important the code must be (exactly) the same as the original file
• ... If it does not match the original file it will not work
ii) • Lossy (compression)...
• ...It would make the file smaller than lossless compression / the file
would stream faster than lossless compression
•... The quality of the video can be reduced but it can still be viewed

Q. Michele wants to email a file to Elsa. The file is too large so it must be
compressed.
a) Name two types of compression that Michele could use. [2]
b) The file Michele is sending contains the source code for a large
computer program. Identify which type of compression would be most
suitable for Michele to use. Explain your choice. [4] (Q4/11/M/J/18)
Ans.
a) 1 mark for each correct answer:
Lossy (compression)
Lossless (compression)
b) 1 mark for correct compression, 3 marks for description:
− Lossless (compression)
Any three from:
− The file can be restored/decompressed to the exact same state it was
before compression/ to original
− (It is a computer program so) no data can be lost // Lossy would
remove data
− Will not run correctly (with any other compression)
− (Lossless) will give repeating words/sections of word a value// RLE is
used // Other valid examples of methods of lossless compression
− Value is recorded in an index

Q. Nancy wants to email the photos to Nadia. Many of the photos are very
large files, so Nancy needs to reduce their file size as much as possible.
Identify which type of compression would be most suitable for Nancy to
use. Explain your choice. [4] (Q2b/12/M/J/18)
Ans.
1 mark for correct compression, 3 marks for explanation:
– Lossy
Any three from:
– Lossy would reduce the file size more (than lossless)
– The redundant data can be removed from the files // by example (must
be about redundant data)
– Images can still be a similar quality

2210 Page 30
– Images can still be a similar quality
– There is no requirement for the files to be exactly the same as original
file
– Photos can be sent quicker // faster to upload // faster to download

Q. Audrey wants to send a sound file to Nico using email.


The file is too large to attach to an email so Audrey decides to compress
the file.
She uses lossy compression to reduce the size of the sound file.
a) Describe how lossy compression reduces the size of the sound file. [4]
b) Nico asks Audrey why she used lossy compression rather than lossless.
i) State one advantage Audrey could give of using lossy rather than
lossless to compress the sound file. [1]
ii) State one disadvantage Nico could give of using lossy rather than
lossless to compress the sound file. [1] (Q5ab/12/O/N/19)
Ans.
a) Four from:
• A compression algorithm is used
• Discards any unnecessary sounds
«
• « using perceptual musical shaping
• « such as removing background noise / sounds humans can’t hear // or
other suitable example
• Reduces sample size / resolution // by example
• Reduces sample rate // by example
• Sound is clipped
• The data is permanently removed
b) One from:
• The file size will be smaller than lossless
• Requires less storage space
• Requires less time to transmit
c) One from:
• The quality of the sound will be reduced
• The original file cannot be restored

A. David needs to send a large section of the programming code as an


email attachment. He uses lossless compression to reduce the file size.
Explain how the file size is reduced. [3] (Q7c/13/O/N/18)
Ans.
Three from:
• Uses compression algorithm / by example e.g. RLE
• Repeating words / phrases / patterns identified
«
• « replaced with value
• File / dictionary / index of phrases created
• Index will store word/phrase with value

A. Videos on the library website show customers which books the library
will soon have in stock.
The library wants the file size of a video to be as small as possible.
Identify and describe a method the library could use to reduce the file
size of a video as much as possible. [4] (q1cii/13/O/N/19)
Ans. One mark for correct identification
• Compression
Three from e.g
• Best compression would be lossy
• Use compression algorithm
• This would remove all the unnecessary data from the file // removes

2210 Page 31
• This would remove all the unnecessary data from the file // removes
detail/sound that the human eye/ear may not see/hear
• Reduce colour pallete...
• ...so each pixel requires fewer bits
• Reduce resolution
• Only store what changes between frames // temporal redundancy

Q. 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]
(Q5/11/M/J/19)
Ans. Five from:
• A (compression) algorithm is used
• No data is removed in the process // original file can be restored
• Repeated words (are identified) // Patterns in the data (are identified)
• ...and are indexed/put into a table // by example
• ...and are replaced with their index // by example
• ...and their positions are stored (in the table) // by example
• ...and the number of times the word/pattern appears is stored (in the
table) // by example
NOTE: Other valid methods of lossless compression can be awarded
marks.

Q. Carla wants to reduce the file size of the photos she has transferred to
her computer. She does not want the quality of the photos to be
reduced, so she uses lossless compression. Describe how lossless
compression reduces the file size of the photos. [4] (Q3c/11/M/J/20)
Ans.
− A compression algorithm is used
− No data is removed in the compression process
− An index/dictionary of pixels is created
− The number of times a pixel is repeated in a row is stored

Q. ii)She wants to compress the recording to make sure that the file is as
small as possible for the website. Identify which type of compression
she should use and describe how this would compress the file for the
website. [4]
iii) Give two benefits of compressing the file for the website. [2]
(Q1cii,iii/12/O/N/20)
Ans.
ii) One from:
− Lossy (compression)
Any three from:
− A (compression) algorithm is used
− Removes redundant/unnecessary data from the file
− Removes sounds that cannot be heard by the human ear/background
noise
− Reduces sample rate
− Reduces sample resolution
− Data is permanently removed // original file cannot be re-instated
− Perceptual music shaping is used
NOTE: If lossless given, marks can be awarded for a correct description of
lossless as follow through.
Any three from (lossless):
− A (compression) algorithm is used
− Repeating patterns are identified
− … are replaced with a value

2210 Page 32
− … are replaced with a value
− … and indexed
− No data is permanently removed // original file can be re-instated
− Suitable example of a lossless algorithm
iii) Any two from:
− Quicker for her to upload
− Quicker for users to download
− Won’t slow website down as much when loading
− Takes up less storage space

Q. A music company has a website that allows users to stream music. The
music is stored in sound files.
a) The sound files are compressed using lossless compression.
i) Describe how the sound files are compressed using lossless
compression. [4]
ii) State one reason why the music company would compress the sound
files using lossless, rather than lossy, compression. [1]
iii) Give one benefit, to the user, of the music company compressing the
sound files. [1]
iv) Give one drawback of the music company using lossless, rather than
lossy, compression for the sound files. [2] (Q7a/11/M/J/21)
Ans.

iv)
Two from:
− Streaming speed may be slower
− … and may affect listening experience // buffering may occur
− User may need more bandwidth to stream
− … that could be more expensive
− It would be a larger file size
− … so may take longer to upload
− … so will take up more storage space …
− … on webserver

Q. b) Sammi creates videos for the finance company website that give
customers advice about their finances. He uses lossy compression to
reduce the file size of the videos for the website.
(i) Give three ways that lossy compression can reduce the file size of the
videos. [3]
(ii) Give one drawback of using lossy compression to reduce the file size
of the videos. [1]
c) Sammi could have used lossless compression to compress the videos for
the website.

2210 Page 33
the website.
(i) Give one reason why he would use lossless compression, rather than
lossy compression, for the videos. [1]
(ii) Give two disadvantages of Sammi using lossless compression, rather
than lossy compression, for the videos. [2] (Q5bc/12/O/N/21)
Ans.

ii) Any two from:


− Takes more time to transmit file // Takes more time to upload to web
server // Takes more time to download to
customer // Web page will load slower
− Takes up more storage space
− Data usage would be increased
− Uses more bandwidth

Q. The image is to be compressed. Describe how lossless compression


could reduce the file size of the image. [3] (Q8b/3175/12/M/J/21)
Ans.
Any three from:
− Uses a (compression) algorithm
− No data will be removed
− Repeating pixels are identified
− … and indexes them
− Example of lossless method e.g. RLE
− Stores the colour difference between pixels

A. Jack has an MP3 file stored on his computer.


a) i Tic to show which type of data is stored in an 3 le.
Video ⬜
Sound ⬜
Image ⬜ [1]
ii) Tick (3) to show whether the MP3 file is a lossy compressed file or a
lossless compressed file or not a
compressed file.
Lossy compressed file ⬜
Lossless compressed file ⬜
Not a compressed file ⬜ [1] (Q1/11/M/J/22)
Ans.
i) Sound
ii) Lossy compressed sound

Q. Tick (✓) to show whether the videos are MP3 files, MP4 files or MIDI
files.
MP3 files ⬜
MP4 files ⬜
MIDI files ⬜ [1]
c) The video files are compressed using lossy compression. Give two
benefits of using lossy compression to compress the video files. [2]

2210 Page 34
benefits of using lossy compression to compress the video files. [2]
(Q6bc/13/O/N/22)
Ans.
b) MP4
c) Any two from:
• Reduces the size of the file
• Takes up less storage space
• Quicker to transmit to device
• Use less bandwidth
• Less buffering

Q. The website hosts videos that users can stream. The company uploads
new videos to the website.
i) The videos are compressed before they are uploaded to the website.
Tick ( ) one box to show which statement is a benefit of compressing
the videos.
A. Data is encrypted. ⬜
B. Duration of each video will be reduced. ⬜
C. Less storage space on the web server is required. ⬜
D. More bandwidth is required when viewing the videos. ⬜ [1]
ii) Give two methods of compression that could be used to compress the
videos. [2] (Q2bi,ii/01/SP/23)
Ans.
i) C
ii) Lossy , lossless

2210 Page 35

You might also like