Mak As
Mak As
1. Number System-----------------------------2
2. Sounds | Images | Compression--------34
3. Assembly language----------------------114
4. Monitoring and Controlling System---192
5. Internet Communications--------------210
6. Input Output Devices--------------------273
7. Von Neumann and OS-------------------297
8. Database---------------------------------- 387
9. Security-------------------------------------507
10. Memory------------------------------------ 556
11. IP-------------------------------------------- 582
12. Ethics---------------------------------------599
13. Translators---------------------------------639
14. Error Check--------------------------------662
15. IDE------------------------------------------ 671
16. AI--------------------------------------------679
1|Page
1. Number System
Convert the following binary number into hexadecimal. 1 0 1 1 1 0 0 0:
B8
Convert the following denary number into BCD format. 9 7:
10010111
Using two’s complement, show how the following denary numbers could be stored in an 8-bit
register:
114: 0 1 1 1 0 0 1 0
– 93: 1 0 1 0 0 0 1 1
Using two’s complement, show how the following denary numbers could be stored in an 8-bit
register: 124: 0 1 1 1 1 1 0 0
–77: 1 0 1 1 0 0 1 1
Convert the two numbers in part (a) (i) into hexadecimal
124: 7 C
–77: B 3
Write the number 359 in BCD form
001101011001
Describe a use of BCD number representation.
• when denary numbers need to be electronically coded
• e.g. to operate displays on a calculator where each digit is represented
• decimal fractions can be accurately represented
Give the hexadecimal value of the memory contents for U: 0100 0110 1100
46C
Convert the denary number 40 into binary: 0000 1011 0100
101000
Convert the following denary integer into 8-bit binary. 55
00110111
Convert the following Binary Coded Decimal (BCD) number into denary. 10000011
83
Convert the following denary integer into 8-bit two’s complement.
-102
2|Page
10011010
Convert the following hexadecimal number into denary. 4E
78
Convert the following 8-bit binary integer into denary. 01001101
77
Convert the following denary number into Binary Coded Decimal (BCD). 82
1000 0010
Convert the following two’s complement integer number into denary. 11001011
−53
Convert the following denary number into hexadecimal. Show your working. 198
C6
• Working e.g. 198 / 16 = 12, 198 − (12*16) = 6
Convert the denary number 46 to an 8-bit binary integer.
00101110
Convert the denary integer – 46 to an 8-bit two’s complement form
11010010
Convert the denary number 46 into hexadecimal.
2E
Describe how denary integers larger than 9 can be converted into BCD. Give an example in
your answer
• Each denary digit is written as a 4-bit binary number
• Example: 46 = 0100 0110
Describe how an 8-bit BCD representation can be converted into a denary integer. Give an
example in your answer.
• Binary number is split up into groups of 4 bits (starting from the right)
// Each group of 4 bits is converted to a denary digit
• Example: 0011 0111 = 37
The program used the ASCII coding system for character codes. An alternative coding system
is Unicode.
(i) Give two disadvantages of using ASCII code.
• Only 128 / 256 characters can be represented
3|Page
• Uses values 0 to 127 (or 255 if extended form) / one byte
• Many characters used in other languages cannot be represented
• In extended ASCII the characters from 128 to 255 may be coded differently in different
systems
Describe how Unicode is designed to overcome the disadvantages of ASCII
• Uses 16, 24 or 32 bits / two, three or four bytes
• Unicode is designed to be a superset of ASCII
• Designed so that most characters (in other languages) can be represented
Write the hexadecimal representation for this instruction:
0000011111000010
07 C2
Write the hexadecimal representation for the following instruction.
0001010001011110
14 5E
Hexadecimal, Binary Coded Decimal (BCD) and binary values are shown below.
4|Page
State the denary value.
0111 0111: 119
1000 1000: –120
Express the following integer in two’s complement form.
-17
11101111
State in denary, the range of integer values that it is possible to represent in two’s
complement integers using a single byte
Lowest value: −128
Highest value: +127
Convert the following denary integer into Binary Coded Decimal (BCD).
653
0110 0101 0011
5|Page
A 3-digit BCD representation has been incorrectly copied. It is shown as:
010011100010
State how you can recognise that this is not a valid BCD representation.
The second block of four binary digits represents a digit larger than 9 // 14
Describe a practical application where BCD is used
A string of digits on any electronic device displaying numeric values
Use the following instruction set to write the numbers for A and
A – 1110 0110 0110 1000
B – E6 68
X is a register. The current contents of X are:
10000111
The current contents of register X represent an unsigned binary integer.
Convert the value in X into denary
135
The current contents of register X represent a Binary Coded Decimal.
Convert the value in X into denary
87
The current contents of register X stores a two’s complement binary integer.
Convert the value in X into denary
–121
The Accumulator is a register. The current contents of the Accumulator are:
11011011
The current contents of the Accumulator represent an unsigned binary integer.
Convert the value in the Accumulator into denary.
219
Convert the value in the Accumulator into hexadecimal.
6|Page
DB
The current contents of the Accumulator represent a two’s complement binary integer.
Convert the value in the Accumulator into denary.
−37
Define the term character set.
• The symbols that the computer recognises/uses
• A list of characters recognised by the computer hardware and
Software
Explain the differences between the ASCII and Unicode character sets.
Answer: 5A16
H is a register. The current contents of H are:
11000001
The current contents of register H represent an unsigned binary integer.
Convert the value in register H into denary
193
7|Page
Convert the value in register H into hexadecimal.
C1
The current contents of register H represent a two’s complement binary integer.
Convert the value in register H into denary
− 63
State why register H does not currently contain a Binary Coded Decimal (BCD).
The first 4 bits / first nibble (would give 12 which) is > 9 / 2 digits (which is not valid
for BCD)
The current contents of a general purpose register (X) are:
X10111010
The contents of X represent an unsigned binary integer.
Convert the value in X into denary.
186
The contents of X represent an unsigned binary integer.
Convert the value in X into hexadecimal.
BA
The contents of X represent a two’s complement binary integer.
Convert the value in X into denary.
–70
The current contents of a general purpose register (X) are:
X11000001
The contents of X represent an unsigned binary integer.
Convert the value in X into denary.
193
The contents of X represent an unsigned binary integer.
Convert the value in X into hexadecimal.
C1
The contents of X represent a two’s complement binary integer.
Convert the value in X into denary.
8|Page
–63
The current contents of a general purpose register (X) are:
X11110010
The contents of X represent an unsigned binary integer.
Convert the value in X into denary.
242
The contents of X represent an unsigned binary integer.
Convert the value in X into hexadecimal
F2
The contents of X represent a two’s complement binary integer.
Convert the value in X into denary.
–14
Show the result on the general purpose register (X) after the following instruction is run.
INC X
11110011
The ASCII character code for ‘A’ is 65 in denary.
Convert the denary ASCII character code for ‘A’ into 8-bit binary
0100 0001
Convert the denary ASCII character code for ‘A’ into hexadecimal.
41
The Unicode character code for ‘G’ is 0047 in hexadecimal.
State, in hexadecimal, the Unicode character code for ‘D’
0044
One binary colour is represented by 0100 1110
Convert the unsigned binary number 0100 1110 into denary.
78
Convert the denary number −194 into 12-bit two’s complement
1111 0011 1110
Convert the Binary Coded Decimal (BCD) value 0110 1001 into denary.
69
9|Page
Identify one practical application where BCD is used
Any scenario where a single digit needs to be transmitted / displayed
e.g. calculator / digital clock
One example of a character set used by computers is ASCII.
Describe how one character is represented in a character set.
• Each character is represented by a unique
• « denary / hexadecimal / binary number
Convert the unsigned binary number 0101 1111 1100 into denary
1532
Convert the denary number −239 into 12-bit two’s complement.
1111 0001 0001
Convert the two’s complement number 0110 0101 into denary.
101
Convert the Binary Coded Decimal (BCD) value 0110 0101 into denary
65
Convert the denary number 222 into hexadecimal.
DE
Give the 8-bit binary value for the ASCII character ‘b’.
0110 0010
Complete the table by writing the ASCII denary value for the character ‘t’ and its
hexadecimal equivalent.
10 | P a g e
The assembler translates assembly code into machine code.
The table shows the denary values for three assembler op codes
Convert the denary value for the op code LDD into 8‑bit binary
11000010
Convert the denary value for the op code STO into hexadecimal
CD
State why the denary value for the op code ADD cannot be represented in 8‑bit two’s
complement form. Justify your answer.
• The maximum range for an 8-bit two's complement binary number is −128
to +127
• … 200 is outside of the maximum range
The hexadecimal colour value of the background of Xiaoming’s website is:
913C8E
Complete the following table by converting each hexadecimal value to denary value.
Convert the following denary number into a 12-bit two’s complement binary form.
-245
1111 0000 1011
Convert the following hexadecimal number into denary.
F0
240
11 | P a g e
Convert the following unsigned binary integer into denary.
10101111
175
Convert the following Binary Coded Decimal (BCD) into denary.
100001010011
853
Different types of data can be represented in a computer system
Numeric is one type of data.
Convert the following denary number into Binary Coded Decimal (BCD).
105
0001 0000 0101
Convert the following two’s complement binary integer into denary.
10111111
–65
Convert the following hexadecimal number into denary.
AB
171
Character is another type of data.
The following tables show part of the ASCII code character set.
12 | P a g e
Bed
66 101 100
Give the denary ASCII code for the following character.
H
72
The current contents of a general-purpose register X are:
X11001010
The contents of X represent an unsigned binary integer.
Convert the contents of X into denary
202
The contents of X represent a two’s complement binary integer.
Convert the contents of X into denary
–54
State why the binary number in X cannot represent a Binary Coded Decimal (BCD).
Both nibbles are binary numbers representing denary numbers greater than 9
Each instruction in the assembly language program is encoded in 16 bits (8-bit op code
followed by an 8-bit operand).
The instruction CMP 201 has the operand 201.
Convert the operand 201 into 8-bit binary.
1100 1001
Each instruction in the assembly language program is encoded in 16 bits (8-bit op code
followed by an 8-bit operand).
The instruction JPE 59 has the operand 59.
Convert the operand 59 into 8-bit binary
0011 1011
Convert the denary value 59 into hexadecimal.
3B
An 8-bit binary number can be interpreted in many ways
State the number of different values that an 8-bit unsigned binary integer can represent.
256
13 | P a g e
Give the smallest and largest denary values that an 8-bit two’s complement integer can
Represent
Smallest: −128
Largest: +127
One of the colours used in the image has the hexadecimal colour code:
#FC238A
FC is the amount of red, 23 is the amount of green and 8A is the amount of blue in the colour.
Convert the hexadecimal code FC into denary.
252
The amount of green in binary is 00100011. This has the denary number 15 added to it
to create a second colour.
Add the denary number 15 to the binary number 00100011 and give your answer in
binary.
Perform the addition in binary. Show your working.
14 | P a g e
The contents of memory address 300 represent an unsigned binary integer.
Write the denary value of the unsigned binary integer in memory address 300.
102
A computer uses the ASCII character set
State the number of characters that can be represented by the ASCII character set and the
extended ASCII character set.
ASCII = 128 // 2^7
Extended ASCII = 256 // 2^8
Explain how a word such as ‘HOUSE’ is represented by the ASCII character set
• Each character has its own unique code
• Each character in the word is replaced by its code
• The codes are stored in the order in the word
Unicode is a different character set
The Unicode value for the character ‘1’ is denary value 49.
Write the hexadecimal value for the Unicode character ‘1
31
Write the denary value for the Unicode character ‘5’.
53
Draw one line from each binary value to its equivalent (same) value on the right
15 | P a g e
Perform the following binary addition. Show your working.
State how an overflow can occur when adding two binary integers.
The result is a larger number than can be stored in the given number of bits.
// The result is greater than 255
Convert the hexadecimal value F0 into denary.
240
An 8-bit binary number can be interpreted in many ways.
State the number of different values that an 8-bit unsigned binary integer can represent.
256
Give the smallest and largest denary values that an 8-bit two’s complement integer can
represent.
Smallest: −128
16 | P a g e
Largest: +127
Computers store data in binary form.
State the difference between a tebibyte and a terabyte
one tebibyte is 1024 gibibytes and one terabyte is 1000 gigabytes
Convert the signed denary value –100 into an 8-bit two’s complement binary integer.
1001 1100
Convert the denary number 251 into hexadecimal. Show your working
Dividing by 16 // converting to binary (11111011)
FB
Add the following unsigned binary integers.
1000 1110
Convert the following positive binary integer into hexadecimal.
01111110
7E
Convert the denary numbers 127 and 12 to 8-bit binary and then perform the subtraction
12 − 127 in binary.
Show your working.
Correct conversion to binary 01111111 (127) and 00001100 (12)
Working e.g. turning 01111111 into two's complement 10000001
Answer: 1000 110
Convert the unsigned binary integer into denary.
00100111
39
Convert the Binary Coded Decimal (BCD) into denary.
00100111
27
Convert the 8-bit two’s complement binary integer into denary.
17 | P a g e
11100111
−25
Perform the following binary subtraction. Show your working.
Give one similarity and two differences between the ASCII and Unicode character sets
Similarity:
• both can use 8 bits
• both represent each character using a unique code
• Unicode will contain all the characters that ASCII contains // ASCII is a
subset of Unicode
Differences:
• Unicode can go up to 32 bits per character whereas ASCII is 7 or 8 bits
Unicode can represent a wider range of characters than ASCII
• different languages are represented using Unicode, ASCII is only for one
Language
Convert the two’s complement binary integer into denary.
10010110
–106
18 | P a g e
Convert the unsigned binary integer into hexadecimal.
10010110
96
Convert the unsigned binary integer into Binary Coded Decimal (BCD). Show your
working.
10010101
• 149 decimal
• 0001 0100 1001
Perform the following binary addition
1101 0010
The computer stores data in binary form.
State the difference between a kibibyte and a kilobyte
Kibibyte is 1024 bytes and kilobyte is 1000 bytes
Kibibyte is binary prefix and kilobyte is denary prefix
Convert the denary number 964 into Binary Coded Decimal (BCD).
1001 0110 0100
Convert the positive binary integer 11110010 into hexadecimal.
F2
Give the smallest and largest two’s complement binary number that can be represented
using 8 bits.
Smallest: 10000000
Largest: 01111111
Add the following two binary integers using binary addition. Show your working.
Show the result of a 3‑place right logical shift on the binary number:
19 | P a g e
11001100
00011001
Data in a computer is stored in binary form.
State the number of unique binary values that can be represented in 16 bits
2^16 // 65536
Give the 8‑bit one’s complement representation of the denary number −120.
Show your working
Working: +120 = 0111 1000
Answer: 1000 0111
20 | P a g e
865
Convert the unsigned binary integer into denary.
000111010110
470
Identify one practical application of BCD and justify why BCD is used in this application.
• An application that performs financial / banking calculations
• ... because it is difficult to represent decimal values exactly in normal
binary and financial transactions use only two decimal places and must
be accurate, no accumulating errors
Or
• Electronic displays, e.g. calculators, digital clocks
• ... because visual displays only need to show individual digits
• ... because conversion between denary and BCD is easier
Or
• The storage of the date and time in the BIOS of a PC
• ... because conversion with denary is easier
Complete the binary addition. Show your working.
21 | P a g e
Convert the hexadecimal number C0F into denary.
Show your working.
1100 0000 1111 // 2048 + 1024 + 8 + 4 + 2 + 1
// (12 * 16^2) + 15 // (12 * 16 * 16) + 15 // 3072 + 15
3087
Complete the following description
A kibibyte has a binary prefix. Three kibibytes is the same as 3072 bytes.
A megabyte has a decimal/denary prefix. Two terabytes is the same as 2000
gigabytes.
Convert the denary number 241 to hexadecimal
F1
State what is meant by an overflow in binary addition
The answer is too long to be represented in the same number of bits as the
binary numbers being added
22 | P a g e
Computers use character sets when representing characters in binary.
Complete the table by identifying the number of bits each of the character sets allocates
to each character.
23 | P a g e
State one reason why binary addition and subtraction can result in overflow.
• The answer cannot be represented in the number of bits available
• The answer is larger than the maximum positive number that can be
stored in the register
• The answer is smaller than the most negative number that can be stored
in the register
A computer system stores text, images and sound.
A character set is used to represent characters in a computer.
Identify and describe one character set.
• ASCII
• 7/8 bits per character // represents 128/256 characters // represents all
characters from Latin alphabet
• UNICODE
• 8/16/32 bits per character // represents 256/65536+ characters //
represents all characters in all languages
Convert the hexadecimal number 1FAB into denary.
Denary value: 8107
Explain how to convert the two’s complement integer 10011111 into denary. Give the denary
value after conversion.
24 | P a g e
• Flip each bit then add 1 …
• … method of converting the new binary number into denary
• Most significant 1 bit is treated as the corresponding negative
denary value …
• … add the other positive corresponding denary values
Denary value: −97
25 | P a g e
• bigger files/occupies more memory/storage
• longer to transmit data/download music
• greater processing power needed
Describe two typical features found in software for editing sound files.
• edit start time, stop time and duration of any sound/timeline
• extract/delete/save part of a clip • frequency, amplitude, pitch alteration
• fade in/out of a clip
• mix/merge multiple sound sources/tracks
• combine different sources at various volume levels
• pan between tracks/channels
• use of filters
• playback to speakers, processors or recording medium
• conversion between different audio file formats
Explain the difference between lossless and lossy data compression techniques.
• lossless designed to lose none of the original detail/lossless allows original file to be recreated
exactly
• lossless technique based on some form of replacement
• mention of type of replacement, for example RLE, FLAC etc.
• by example: e.g. 000–1111–222222–333 = 3–0, 4–1, 6–2, 3–3 etc.
• maximum compression about 50%
• lossy may result in loss of detail compared to original file/lossy does not allow original file to be
re-created exactly
• lossy techniques make decision about what parts of sound/sound file are important and
discards other information
• only keeps sounds human ear can process/discards sounds most people cannot hear
• ... then applies lossless technique, for further reduction
• lossy compression can reduce to about 10% • an example of jpeg, mp3 or other correct
examples of compressed formats.
Six computer graphics terms and seven descriptions are shown below:
Bitmap graphic: Image made up of rows and columns of picture elements
Image file header: Specifies the image size, number of colours, and other data needed to
display an image
26 | P a g e
Image resolution: Measured in dots per inch (dpi); this value determines the amount of detail an
image has
Pixel: Picture element
Screen resolution: Value quoted for a monitor specification, such as 1024 × 768; the larger the
numbers, the more picture elements will be displayed
Vector graphic: Image made up of drawing objects; the properties of each object determine its
shape and appearance
A black and white image is 512 pixels by 256 pixels. Calculate the file size of this image in
kilobytes (KB) (1 KB = 1024 bytes). Show your working
27 | P a g e
Sampling rate
– number of times that the amplitude of (analogue) sound wave is taken/measured
– per unit time/per second
– higher sampling rate results in more accurate digital representation
The following information refers to a music track being recorded on a CD:
• music is sampled 44 100 times per second
• each sample is 16 bits
• each track requires sampling for left and right speakers
(i) Calculate the number of bytes required to store one second of sampled music.
Show your working.
A particular track is four minutes long. Describe how you would calculate the number of
megabytes required to store this track.
When storing music tracks in a computer, the MP3 format is often used. This reduces file size
by about 90%.
Explain how the music quality is apparently retained
– mp3 is a lossy compressed format
– uses psycho-acoustic modelling
– and perceptual music/noise shaping
– certain parts of the music can be eliminated without significantly degrading the listener’s
experience
– removes sound that the human ear can’t hear
– only keeps sounds human ear can hear better than others
– discards softer sound if two sounds played together
28 | P a g e
Describe how sampling is used to record the sound clips.
• The height/amplitude of the (sound) wave is determined.
• At set (time) intervals // by example of sensible time period.
• To get an approximation of the sound wave
• And encoded as a sequence of binary numbers // and converted to a digital signal.
• Increasing the sampling rate will improve the accuracy of the recording.
The students use software to compress the sound clips before emailing them.
Lossy
• The human ear will not notice that the decompressed stream will not be identical to
the original (file) / that parts of the original data have been discarded / removed / deleted.
• File size reduction is greater than using lossless.
• Email has limits on file sizes (on attachments) / a smaller file will take less time to transmit.
• The file may not need to be of high precision / accuracy.
• The producer has requested an mp3 file.
Lossless
• The file needs to be high precision / accuracy.
• None of the original data is lost / the decompressed file will be identical to the original.
• The producer has requested a flac file
Explain what is meant by run-length encoding.
• Lossless method of compression.
• Reduces (the physical size of) a string of adjacent, identical characters/pixels / bytes etc..
• The repeating string (a run) is encoded into two values.
• One value represents the number of (identical) characters in the run (the run count).
• The other value is the code of the character / colour code of pixel etc. in the run (the
run value).
• The run value and run count combination may be preceded by a control character.
• Any valid example given.
29 | P a g e
Row 1: 153 10 255 3 153 3
Row 2: 153 9 255 6 153 1
Row 3: 153 7 255 9
Alternative correct answer:
Row 1: 153 9 255 2 153 2
Row 2: 153 8 255 5 153 0
Row 3: 153 6 255 8
The images contained in the magazines are produced using either bitmap or vector graphics
software.
Give four differences between bitmap and vector graphics
• Bitmap is made up of pixels
// Vector graphic store a set of instructions about how to draw the shape
• Bitmap files are usually bigger than vector graphics files // Take up more memory space
• Enlarging a bitmap can mean the image is pixelated
// vector graphic can be enlarged without the image becoming pixelated
30 | P a g e
• Bitmap images can be compressed (with significant reduction in file size)
// Vector graphic images do not compress well
• Bitmaps are suitable for photographs / scanned images
// Vector graphics are suitable for more geometric shapes
• Bitmap graphics use less processing power than vector graphics
• Individual elements of a bitmap cannot be grouped
// Individual elements of a vector graphic can be grouped
• Vector graphics need to be ‘rasterised’ in order to display or prin
When recording a video, state what is meant by frame rate
The number of images / frames recorded per second / unit time.
//The frequency with which the images/frames are recorded.
31 | P a g e
A second picture has width 2048 pixels and height 512 pixels. It is saved as a 256-colour image.
Calculate the file size in kilobytes
• Number of pixels is 2048 × 512
• One pixel will be stored as one byte
• Number of kilobytes = (2048 × 512) / 1024
Number of kilobytes = 1024 KB
State another data item that the bitmap file stores in addition to the pixel data.
• Confirmation that the file is a BMP
• File size
• Location/offset of image data within the file
• Dimensions of the image in pixels // image resolution
• Colour depth (bits per pixel)
• Type of compression used, if any
Define the term sampling resolution. Explain how the sampling resolution will affect the
accuracy of the digitised sound.
• The number of distinct values available to encode/represent each
sample
• Specified by the number of bits used to encode the data for one
sample
• Sometimes referred to as bit depth
• A larger sampling resolution will mean there are more values available to
store each sample
• A larger sampling resolution will improve the accuracy of the digitised sound
// A larger sampling resolution will decrease the distortion of the sound
• Increased sampling resolution means a smaller quantization error
Define the term image resolution.
• The number of pixels per unit measurement
• The number of pixels in an image
• The number of pixels wide by the number of pixels high
• Number of pixels per row by the number of rows
32 | P a g e
A picture is drawn and is saved as a 16-colour bitmap image. State how many bits are used to
encode the data for one pixel
4
A second picture has width 8192 pixels and height 256 pixels. It is saved as a 256-colour
bitmap.
Calculate the file size in kilobytes.
• Number of pixels is 8192 × 256
• One pixel will be stored as one byte
• Number of kilobytes = (8192 × 256) / 1024
Number of kilobytes = 2048 KB
The actual bitmap file size will be larger than your calculated value as a bitmap file has a file
header.
State two items of data that are stored in the file header.
• Confirmation that the file is a BMP
• File size
• Location/offset of image data within the file
• Dimensions of the image (in pixels) // image resolution
• Colour depth (bits per pixel, 1, 4, 8, 16, 24 or 32)
• Type of compression used, if any
Define the term sampling resolution. Explain how the sampling resolution will affect the
accuracy of the digitised sound.
• The number of distinct values available to encode/represent each
sample
• Specified by the number of bits used to encode the data for one
sample
• Sometimes referred to as bit depth
• A larger sampling resolution will mean there are more values available to
store each sample
• A larger sampling resolution will improve the accuracy of the digitised sound
// A larger sampling resolution will decrease the distortion of the sound
• Increased sampling resolution means a smaller quantization error
33 | P a g e
Define the term image resolution.
• The number of pixels per unit measurement
• The number of pixels in an image
• The number of pixels wide by the number of pixels high
• Number of pixels per row by the number of rows
A picture is drawn and is saved as a 16-colour bitmap image. State how many bits are used to
encode the data for one pixel
4
A second picture has width 2048 pixels and height 512 pixels. It is saved as a 256-
colournimage.
Calculate the file size in kilobytes
• Number of pixels is 2048 × 512
• One pixel will be stored as one byte
• Number of kilobytes = (2048 × 512) / 1024
Number of kilobytes = 1024 KB
The actual bitmap file size will be larger than your calculated value.
State another data item that the bitmap file stores in addition to the pixel data.
• Confirmation that the file is a BMP
• File size
• Location/offset of image data within the file
• Dimensions of the image in pixels // image resolution
• Colour depth (bits per pixel)
• Type of compression used, if any
Describe what is meant by a bitmap image.
• Made up of pixels
• Each pixel has one colour
• Colour of each pixel stored as a binary number
A black and white bitmap image is shown.
34 | P a g e
Explain how a computer can store this bitmap image.
• Each pixel requires only one bit (as there are only two colours)
• Black represented by 1 and white by 0 (or vice versa)
• Bits are stored for each pixel in sequence
• 11111 01010 01010 01010 01010
The image is compressed before it is attached to an email.
Explain how run-length encoding (RLE) will compress the image.
• Stores the colour and the number of times it occurs
• An example from the bitmap given e.g. B5, W1, B1 and so on
The finished logo is 500 pixels by 1000 pixels and uses 35 different colours.
Estimate the file size for the logo. Give your answer in kilobytes. Show your working.
• Number of pixels 500*1000 (= 500 000)
• 35 colours require 6 bits per pixel
• Number of bytes (500 000 * 6) / 8 = 3 000 000 / 8 (= 375 000)
• = 375 Kb
State two benefits of a vector graphic compared to a bitmap image. Give a reason for each
Benefit
• Can resize it without pixilation
• Image is redrawn/recalculated with each adjustment
• Smaller file size
• Storing points/equations/commands etc., not individual pixels
Explain how an analogue sound wave is sampled to convert it into digital format.
• Amplitude (of the sound wave) measured
35 | P a g e
• At set / regular time intervals / per time unit / time period
• Value of the sample is recorded as a binary number
Explain the effects of increasing the sampling resolution on the sound file
• (Increasing the sampling resolution means) more bits per sample //
larger range of values
• Larger file size
• More accurate representation of sound
The original sound was sampled at 44.1kHz. The sample rate is changed to 22.05kHz.
Explain the effects of this change on the sound file.
• Fewer samples (per unit time)
• File size will decrease
• Larger gaps / spaces between samples // Greater quantization errors
• Sound accuracy will reduce // not as close to original sound
The student uses sound editing software to edit the sound file.
Name two features of sound editing software the student can use to edit the sound file.
Describe the purpose of each feature.
36 | P a g e
State the minimum number of bits needed to represent each pixel in this image
1
Run-length encoding (RLE) is used to store the image with the following colour codes.
Colour Code
Black 1A
White 3B
Show how run-length encoding is used to store the image.
• 3B9 1A3 3B3 1A2 3B1 1A2 3B2
• 1A1 3B3 1A1 3B2 1A2 3B1 1A2 3B3 1A3 3B9
An image has 30 different colours.
State the minimum number of bits needed to represent each pixel in the 30-colour image.
5
When the image is saved, a header is added to the file.
State the purpose of the file header. Give two examples of the file header contents.
• Stores data about the file contents/image/metadata
• Confirmation that the file is a BMP // confirmation of file type
• File size
• Location / offset of image data within the file
• Dimensions of the image (in pixels) // image resolution
• Colour depth (bits per pixel, 1, 4, 8, 16, 24 or 32)
• Type of compression used (if any)
Graphics software is used to edit a digital photograph.
Give three features of graphics software that can be used to edit the photograph.
Describe the effect each has on the photograph.
• Resize
• Increase / decrease the size of the image
• Crop
• Remove part of the image
• Blur
• Reduce the focus
37 | P a g e
• Red eye reduction
• Reduces red (light reflected from human eyes)
An analogue-to-digital converter uses sampling to encode the sound.
Explain how different sampling resolutions affect the sound file and the sound it represents.
38 | P a g e
State what is meant by multimedia container format
• A meta file / wrapper
• Contains various different types of data
State the minimum number of bits needed to represent each pixel in the image in part (a)
2
Calculate the minimum file size of the image shown in part (a). Show your working
• Number of pixels: 6 × 6 // 36
• Number of bits: Number of pixels (36) × 2 «
• « = 72 bits // 9 bytes
The company takes a photograph of their office to put on the website. The photograph has
a resolution of 1000 pixels by 1000 pixels. Two bytes per pixel are used to represent the
colours.
Estimate the file size of the photograph in megabytes. Show your working.
• Number of pixels: 1000 × 1000 // 1 000 000
• Number of bytes: Number of pixels (1 000 000) × 2 // 2 000 000 //
Number of bits: Number of pixels (1 000 000) × 16 // 16 000 000
• Conversion to megabytes
• 2 (MB) // 1.91 (MB)
39 | P a g e
The file size of the photograph needs to be reduced before it is placed on the website.
Draw lines to link each method of reducing the file size of the image to:
The company has created a logo for the website. The logo is a vector graphic.
Describe two reasons why a vector graphic is a sensible choice for the logo
• Smaller file size
• Can be transferred quicker/downloaded quicker
• Enlarges without pixilation
• Needs to be used on different screens / devices / resolutions
State the minimum number of bits needed to represent each pixel in the image in part (a).
3
40 | P a g e
Calculate the minimum file size of the image shown in part (a). Show your working
• Number of pixels: 6 × 6 = 36
• Number of bits: Number of pixels (36) × 3
• 108 bits / 13.5 bytes
The designer takes a photograph to put on the poster. The photograph has a resolution of
50000 pixels by 50000 pixels. The colours are represented using 4 bytes per pixel.
Estimate the file size of the photograph in gigabytes. Show your working.
• Number of pixels: 50 000 × 50 000 = 2 500 000 000
• Number of bytes: Number of pixels (2 500 000 000) × 4 //
10 000 000 000 //
Number of bits: Number of pixels (2 500 000 000) × 32 //
80 000 000 000
• Conversion to gigabytes
• 10 GB / 9.3 GB
The photograph needs to be sent by email but the file size is too big. It needs to be
compressed.
The table lists several methods of making an image file size smaller.
Explain how run-length encoding would compress the image in part (a)
• Looks for runs of consecutive pixel of the same colour
• Stores the colour value once and the number of times it occurs
• Lossless method of compression
• Reference to the given image in context
A recording of a concert is stored as a file. The file is compressed using lossy compression
41 | P a g e
before it is streamed to users.
State why this file needs to be compressed.
• The data files are very large
• It would take a long time to send the uncompressed file // Compressed
files will download faster
• A higher bandwidth would be needed to transmit the uncompressed file
Define the term lossy compression.
• Data is lost
• The decompressed file is not the same as the original
The file could be compressed using lossless compression. Explain why lossy compression is a
more appropriate compression technique than lossless for this file.
• Lossy creates a smaller file than lossless // lossy compresses further
than lossless
• The recording of the concert is a large file size and needs significant
reduction in size
• Lossy removes detail which can be lost without people noticing
• By example e.g. reduction in sound quality will not be noticed
The recording uses interlaced encoding.
Describe interlaced encoding
• The data from a single frame is split into two separate fields
• One field has data for the odd numbered rows/lines and the other field
has data for the even numbered rows/lines
• Odd numbered line fields alternate with even numbered line fields
• The viewer sees data from two frames simultaneously
State one benefit of using interlaced encoding compared to progressive encoding.
• Produces what appears to be a higher refresh rate
• Lower bandwidth needed // Halves the bandwidth requirements
42 | P a g e
• Records only the differences between the frames
Describe how a computer encodes the sound track.
• The amplitude of the wave is measured /sound wave is sampled
• At set/regular time intervals
• Each sample is stored as a binary number
• Samples are stored in order in a file
Explain how the sampling rate and sampling resolution affect the file size of the sound
track.
Sample rate:
• Increasing the sample rate means more samples per second hence
more bits per second and larger file size
• Decreasing the sample rate means fewer samples per second hence
fewer bits per second and smaller file size
Sample resolution:
• A higher sampling resolution means more bits per sample and a larger
file size
• A lower sampling resolution means fewer bits per sample. a smaller file
Size
The video is recorded using progressive encoding.
Describe progressive encoding.
• Stores all the scan lines for an entire frame // displays / records all the
frame data at the same time // not split into fields
• Complete frames are displayed in sequence
• The rate of picture display is the same as the frame rate.
The images are bitmap images. A bitmap image can be made up of any number of colours.
Each colour is represented by a unique binary number.
Draw one line from each box on the left, to the correct box on the right to identify the minimum
number of bits needed to store each maximum number of colours.
43 | P a g e
State what is meant by 40fps
40 images or frames are displayed/recorded each second
One video uses interlaced encoding, and a second video uses progressive encoding.
Describe two differences between interlaced and progressive encoding
• Progressive – each frame contains (all the lines for) the complete
image
• Interlaced – each frame contains half the (number of lines) of the
complete image
• Progressive – frames are not divided into fields
The sound track has a sampling rate of 88.2kHz and a sampling resolution of 32 bits.
State what is meant by a sampling rate of 88.2kHz and a sampling resolution of 32 bits
88.2 kHz
• The sound wave is sampled 88200 times per second
44 | P a g e
32 bits
• Each sample is stored as a 32-bit binary number
The bit depth of an image dictates how many different colours can be represented by each
Pixel
State the number of different colours that can be represented by a bit depth of 8 bits.
256
Data can be compressed using either lossy or lossless compression.
Tick (✓) one box in each scenario to identify whether lossy or lossless compression should
be used. Justify your choice.
A program written in a high-level language.
Lossless:
• All the data is needed // the original file is fully restored
• If any data is lost, the program will not run
• Probably does not require significant reduction in file size // a program
written in a high-level language is just text, so does not need much
reduction in size
A photograph that needs to be emailed to a friend.
Lossy:
• All the data is not required
• The number of colours / resolution can be reduced without the user
noticing
• Email requires a significantly smaller file size // takes less time to
transmit
Lossless:
• A high quality image may be needed
• All of the data is needed // cannot afford to lose any data // the original
file is fully restored
You need to upload a video that you have created to a website.
Lossy:
• Some loss of quality will not be noticed // high quality video not needed
45 | P a g e
on the website
• A more significant reduction may be needed
• Takes a shorter time to upload / download // requires less bandwidth
Lossless:
• A high quality video may be needed
• Might only be a short video clip
• All of the data is needed // cannot afford to lose any data // the original
file is fully restored
Dominic’s tablet captures a video of Dominic to send to other people. The video is made of a
sequence of images and a sound file.
Describe how the images and sound are encoded into a digital form.
Images
• The images are stored as bitmaps
• Each image is made up of pixels
• « each pixel is of a single colour
• Each colour has a unique binary number
• Store the sequence of binary numbers for each image / frame // store the
binary value of each pixel
Sound
• Measure the height/amplitude of the sound wave
• A set number of times per second // at regular time intervals
• Each amplitude has a unique binary number
• Store the sequence of binary numbers for each sample
A digital camera takes a bitmap image. The image is 2000 pixels wide by 1000 pixels high with
a
colour depth of 24-bits.
Calculate an estimate of the file size for the image. Give your answer in megabytes. Show
your working.
• 2000 * 1000 * 24 = 48 000 000 bits
• 48 000 000 / 8 / 1024 / 1024
46 | P a g e
• = 6 MB or 5.7 MB
A second image is taken, this time in black and white. It has the same number of pixels, but
the file size is smaller.
Explain why the file size is smaller.
• Only 1 bit needed to store the colour of each pixel ...
• ... so number of pixels * bit depth is 2000 * 1000 * 1 (rather than 2000 *
1000 * 24)
• ... so the calculation (in part 4(a)) results in smaller figure for file size
Describe how sound sampling is used by the mobile phone to encode the sound.
• The amplitude of the wave is measured
• « at set, regular time intervals
• The value is stored as a binary number
Leonardo records his voice twice. Each recording is the same length and has the same
sampling resolution.
The first recording has a sampling rate of 44100Hz. The second recording has a
sampling rate of 21000Hz.
Describe how the different sampling rates will affect the recording and the sound file.
• Sampling resolution of 44100 Hz takes more samples per second, so
the file size will be larger // Sampling resolution of 21000 Hz takes fewer
samples per second, so the file size will be smaller
• At a resolution of 44100 Hz, the sound recording is a closer / more
accurate representation of Leonardo's voice // At a resolution of 21000
Hz, the sound recording is a less accurate representation of Leonardo's
Voice
Leonardo transfers the recordings to his laptop computer. He uses sound editing
software to delete some sections of the recordings, and copy and paste to replicate other
sections.
Describe two other features of sound editing software Leonardo can use to edit the
recordings.
• Amplify
47 | P a g e
• ... Increase the volume of a section of sound
• Change pitch
• ... Increase/decrease frequency of section(s)
• Change sampling resolution
• « to change the accuracy of the sound / file size
File compression is one example of a utility program.
Tick (✓) one box on each row to indicate whether the action is an example of lossy
compression or lossless compression.
Samira uses a computer to draw a logo for her hotel and saves it as a vector graphic. The
logo will be placed on the multimedia presentation and elsewhere, such as on signs at the
entrance of the hotel.
Samira emails the logo to a company that prints signs, and other documentation for the hotel.
Describe how the logo is represented by the computer.
• It is a series of (geometric) shapes / lines / objects
• Stored coordinates
• Contains a drawing list
• Commands / formulae for creating each individual object
• and the attributes/property for that object
• E.g. the colour, thickness of line etc.
State two reasons why the hotel logo is saved as a vector graphic instead of a bitmapped
Graphic
• Needs to be large for the signs without becoming pixelated.
• Smaller file size means faster transfer rates are possible.
48 | P a g e
• Smaller file size reduces storage requirements when stored many times
(on multiple documents).
Amir has created a sound file using his desktop computer.
Complete the table by writing the missing definitions and term about sound.
The file is too large to be emailed and the file size needs to be reduced
Name one lossless compression technique that can be used to reduce the size of the
sound file.
• Run-length encoding
• Huffman Coding
• Any other valid encoding method
Describe one lossy compression technique that can be used to reduce the size of the
sound file.
• Reduce sampling rate
• ... fewer samples taken per second means less data is being stored
Or
• Reduce sample resolution
• ... fewer bits are used to represent each sample, so less data is stored
Wei wants to compress the source code to transport it to another computer.
Identify the most appropriate compression technique he should use.
• Lossless does not lose any data
• Any lost data will mean the program will not work
49 | P a g e
logo.
• Colour select
• Select all pixels of the same colour
• Add text
• To show the name of the company
• Resize the star shape
• To fit the space available in the box
• Fill an area with colour
• To shade the side of the box
• Select
• ‘Grab’ a number of pixels to perform a task with/to
• Copy
• Replicate a number of pixels
The finished logo is 160 pixels wide and 160 pixels high. The image has a colour depth of
3 bytes per pixel.
Calculate an estimate of the file size for the logo. Give your answer in kilobytes. Show your
Working
• 160 * 160 (= 25600 pixels)
• 25600 * 3 (= 76800 bytes)
• 75 KB (divide by 1024) or 76.8 KB (divide by 1000)
Xiaoming needs to use his logo on his business card, on his website and on large display
boards. He is told that he should have created a vector graphic logo instead of a bitmapped
graphic logo.
Describe one benefit of creating a vector graphic logo instead of a bitmapped graphic logo.
• The logo can be enlarged without becoming pixelated
• because the instructions to create the logo are stored
or
• (Usually) smaller file size
• only coordinates and calculations stored instead of individual pixels
The video of the concert is made up of a sound track and multiple images.
50 | P a g e
Two successive frames of one section of the video are shown. The pixel colours are
Explain the way in which progressive encoding can be used to transmit Frames 1 and 2.
• Each complete frame is transmitted/scanned each time
• All the pixels in frame 1 will be transmitted
• Then all the pixels in frame 2 will be transmitted
Explain, using Frames 1 and 2 as an example, the way in which temporal redundancy
can be used to compress a video.
• If a pixel in frame 2 has the same colour value as the pixel in the same
position in frame 1 then
• …it is not necessary to send the pixel again
• For example, the first row is / rows 1, 3, 5 and 6 on both frames are the
same // only rows 2 and 4 change
• … so does not need to be replicated // only rows 2 and 4 need to be
Resent
Give another type of redundancy technique that can be used to compress a video
Spatial redundancy
MP4, WMV and AVI are all examples of a type of format that combines sound and image
components into a video.
Identify the type of format that combines the sound and image components into a video.
Multimedia container format
Anne is downloading a sound file from a web server. She had the choice of a sampling rate of
44.1kHz or 98kHz before she downloaded the sound file.
51 | P a g e
Explain the differences between the two sound files stored on the server
• 98 kHz has a larger file size
• …because it is recording more samples per second
• …meaning more binary values being stored per second
• ...will take more time to download
• 98 kHz – Sound will be closer to the original
• …because the samples will be closer together
• …because of smaller quantization errors
Describe, using an example, how a text file is compressed using RLE.
• Instead of storing each repeated sequence of characters individually
• … the character is stored and the number of consecutive occurrences
• instead of storing aaaa , store a4
Explain why run-length encoding will sometimes increase the size of a text file.
• Repeated sequences of characters rarely occur in text files // Most
characters are used only once in any sequence
• The character code and the fact that it is stored once will both be stored,
which will use as much if not more space
Four terms about videos are given with six descriptions.
Draw one line from each term relating to videos to its correct description.
52 | P a g e
Wilbur uses vector graphics to create a logo for his company.
53 | P a g e
• Exact dimensions are not stored // a calculation for proportional size is
stored
• Objects are created using mathematical calculations
Wilbur scans a hand drawn image. The scanned image uses 8 bits to store the colour for
each pixel. The image is 2048 pixels wide by 1024 pixels high
Calculate an estimate of the file size of the scanned image. Give your answer rounded to
the nearest MB.
Show your working
1024 × 2048 = 2 097 152 pixels
= 2 097 152 bytes (8 bits per pixel)
= 2 097 152 / 1024 = 2048 KB
= 2048 / 1024 MB
Answer: 2 MB
Wilbur wants to compress the scanned image before emailing it to his colleague.
Describe one lossy compression technique that Wilbur can use to compress this image.
• Reduce the colour depth
• … reduce the number of bits per colour
• … each pixel has fewer bits
• Reducing the resolution
• … fewer pixels per unit measurement
• … fewer pixels / binary numbers are stored
Zak designs a logo for his company. He uses vector graphics software to create the logo.
54 | P a g e
One of the drawing objects in the logo is a circle.
Identify four properties of the circle
• The position/coordinate of the centre of the circle
• Radius
• Line width
• Line colour
• Line style
• Fill colour
55 | P a g e
• …because each pixel would need to be edited separately
The game generates a story which is stored as a text file.
Jay compresses the text file using lossless compression before sending it by email to his
friend.
Identify two reasons for compressing the text file.
• To reduce the storage space required to store the file
• To reduce the time it would take to transmit the file
• Because they have to email it and have limited file sizes for
sending/receiving
Explain the reasons why Jay compresses the text file with lossless compression instead
of lossy compression.
• All of the original data needs to be retained/recoverable
• … because otherwise the file contents would not make sense
The images are stored as bitmap files.
Identify four items that will be stored in the header of a bitmap file.
• Vertical height in pixels
• Horizontal width in pixels
• Bit depth/number of bits per pixel
• Total file size in bytes
• Offset in bytes where the image data is located
• Type of compression used
The bitmap images are compressed for use on a website.
Tick one box to select the most appropriate type of compression for the images used on
the website and justify your answer.
Lossy:
• Lossy compression will achieve a much higher compression ratio (than
lossless) for photographic images...
• ...so the images will load faster
• There will be little identifiable change to the viewed images
56 | P a g e
• It may not be important that the originals are not recoverable
Lossless:
• Images may be required in their original form // may need to be
recovered completely
• Images may already be a small file size so major reduction in file size is
not needed...
• ...as the files will load quickly
An image can be either a bitmap image or a vector graphic.
Vector graphics are made up of drawing objects and their properties.
State what is meant by a drawing object.
An individual shape (in a vector graphic)
// a shape defined using mathematics/geometry
// a distinct element within an image
// possible to alter without affecting the other objects within the image
Identify four properties of a drawing object.
• Line colour
• Line width
• Fill colour
• Shape
• Outline style
• Dimensions / size
• Position
Identify three items that are stored in a bitmap file header.
57 | P a g e
• Image resolution
• Colour palette
A bitmap image needs to be compressed before it can be sent by email.
Describe one lossy and one lossless method of compressing the image.
Lossy
• Reduce the resolution
• …fewer pixels per unit measurement
• …fewer pixels / binary numbers are stored
• Reduce the colour depth
• …reduce the number of bits per colour
• …each pixel has fewer bits
Lossless
• RLE (Run Length Encoding)
• ...looks for runs of consecutive pixels of the same colour
• ...stores the colour value once and the number of times it occurs
Joanne wants to record sound files and videos for uploading to a social media website.
The following table contains terms about sound representation and encoding.
Complete the table by writing the definitions for each term.
58 | P a g e
• One containing the data for the even numbered rows / lines and the other
has the data for the odd numbered rows / lines
• The image is rendered by alternating between the even field and the odd
field (of each successive frame)
• The viewer sees data from two frames simultaneously
• The rate of picture display (the field rate) is twice the rate of image frame
display (the frame rate)
• Produces what appears to the eye to be a high refresh rate
• Halves the transmission bandwidth requirements
A travel company is designing a website
The bitmap logo for the travel company is shown.
Each colour is represented by a letter, for example, R = red, B = black, W = white.
State the minimum number of bits needed to represent each pixel in the bitmap logo.
2 bits
Calculate the minimum file size, in bytes, of the bitmap logo. Show your working.
Working:
• Pixels is 8 * 8
• Bytes = (2 * 8 * 8) / 8 // (2 * 64) / 8
59 | P a g e
Answer: 16 (bytes)
The travel company uploads a video to its website. The video is stored as an MP4 file. MP4 is
an example of a multimedia container format.
Describe what is meant by a multimedia container format
• A metafile / wrapper
• …that contains audio and video // …that contains various different types
of data
• Describes how the (encoded) data is stored
• Is not confined to any one codec / compression method
• Synchronises the different types of data (on playback)
Complete the following sentences that describe two terms related to videos
Spatial redundancy is when a sequence of consecutive pixels in the
same frame have the same value.
Temporal redundancy is when a pixel in the same location in two
consecutive frames has the same value.
Anya scans an image into her computer for a school project
The scanned image is a bitmapped image.
Complete the following table to describe the two terms about graphics.
Pixel:
• A single square of one colour
• The smallest addressable element in an image
File header:
• Data about the bitmap image (e.g. number of colours)
The image is scanned with an image resolution of 1024 × 512 pixels, and a colour depth
of 8 bits per pixel.
Calculate an estimate for the file size, giving your answer in mebibytes. Show your
working.
Working:
• 1024 × 512 = 524 288 pixels/bytes
• 524288 / 1024 / 1024
60 | P a g e
Answer:
0.50 mebibytes
The image is compressed using lossless compression.
Identify one method of lossless compression that can be used to compress the image and
describe how the method will reduce the file size.
Lossless compression method
• Run-length encoding
• Replace sequences of the same colour pixel
• … with colour code and number of identical pixels
61 | P a g e
• … limited amplitudes mean fewer bits per sample
• Run-length-encoding
• … Where consecutive sounds are the same record the binary value of the
sound and number of times it repeats
• Record the changes instead of the actual sounds
State the minimum number of bits needed to represent each pixel in the bitmap logo.
2 bits
Calculate the minimum file size, in bytes, of the bitmap logo. Show your working.
Working:
• Pixels is 8 * 8
• Bytes = (2 * 8 * 8) / 8 // (2 * 64) / 8
Answer: 16 (bytes)
The travel company uploads a video to its website. The video is stored as an MP4 file. MP4 is
an example of a multimedia container format.
62 | P a g e
Describe what is meant by a multimedia container format.
• A metafile / wrapper
• …that contains audio and video // …that contains various different types
of data
• Describes how the (encoded) data is stored
• Is not confined to any one codec / compression method
• Synchronises the different types of data (on playback)
Complete the following sentences that describe two terms related to videos
• Spatial redundancy is when a sequence of consecutive pixels in the
same frame have the same value.
• Temporal redundancy is when a pixel in the same location in two
consecutive frames has the same value.
Draw one line from each image representation term to its correct definition
The following section of a bitmap image is 10 pixels wide and 5 pixels high. In this example,
each colour is represented by a letter, e.g. B is blue.
63 | P a g e
The complete image can have up to 256 colours
Identify the smallest number of bits that can be used to represent each colour in the
complete bitmap image.
8
Calculate an estimate for the file size of the section of the bitmap image shown, giving
your answer in bytes. Use your answer from part (b)(i).
Show your working.
(bits) / 8 // = 50 (pixels) * 8 (bits) / 8
(bytes)
Describe how changing the colour depth of an image affects its file size.
Increasing the colour depth results in increased file size // Decreasing
the colour depth results in smaller file size
Increasing the colour depth means more bits per pixel and hence more
data stored // Decreasing the colour depth means fewer bits per pixel
and hence less data stored
The first row of pixels in the image from part (b) is shown:
BBBBBBBBBB
Explain how this row of pixels can be compressed using lossless compression.
Use run-length encoding // RLE
Record the colour Blue, and the number of times it occurs 10
Sound samples are recorded and saved in a file
State what is meant by sampling rate
the number of samples taken per unit time / per second
64 | P a g e
Explain the effect of increasing the sampling resolution on the sound file.
• increases the number of bits per sample // larger range of values
• which means that the file size increases
• makes the sound file more accurate //digital waveform closer to original
(analogue) waveform
• smaller quantisation errors
The student records a sound file.
Explain the effect of increasing the sampling rate on the accuracy of the sound recording.
• improves the accuracy of the sound file
• ... because (digital) waveform more closely resembles the analogue
Waveform
• quantization errors are reduced
• increases the amount of detail stored
Explain the effect of decreasing the sampling resolution on the file size of the sound
recording.
• decreases the file size of the sound file
• ... because fewer bits are used to store each sample
The following bitmap image has a resolution of 4096 × 4096 pixels and a colour depth of 24 bits
per pixel.
The image is displayed on a monitor that has a screen resolution of 1920 × 1080 pixels.
Tick one box in each row to identify the effect of each action on the image file size.
65 | P a g e
State two benefits of creating a vector graphic instead of a bitmap image.
• can be enlarged without pixelation / loss of quality
• individual components of the image can be edited
• generally a smaller file size
A second bitmap image is stored using a colour depth of 8 bits per pixel.
The file is compressed using run-length encoding (RLE).
The table shows the compressed and uncompressed values for parts of the image file.
Each colour of the pixel in the image is represented by a hexadecimal value.
Complete the table. The first row has been completed for you.
66 | P a g e
Images are being created to advertise holidays.
Some of the images are bitmap images and some are vector graphics
Complete the table by defining the image terms.
67 | P a g e
The customers will be able to download the photographs in less time
…and they will take less of the customer's bandwidth
The photographs will take up less space on the customer's storage
medium
…therefore the customers can store more images
…and will have more space for other files
State what is meant by the bit depth of a bitmap image and explain how changing the bit
depth affects the image.
68 | P a g e
• The number of bits used to represent each colour
• Increase in bit depth means the image has a greater range of colours //
Decrease in bit depth means the image has a smaller range of colours
• Increase in bit depth makes the image closer to the original / more
realistic // Decrease in bit depth makes the image less like the original /
less realistic
Explain why a bitmap image is often compressed before it is attached to an email.
• Reduced bandwidth usage when transmitting the message
• Reduced transmission time from email client to email server
• Reduced storage space on the email
• Email accounts often have a maximum size for an attachment
A real-time video of a music concert needs to be streamed to subscribers.
Tick (✓) one box to identify the most appropriate type of compression and justify your answer.
Lossy compression (ticked)
• Loss of quality will not be noticed
• Needs to be viewed in real time so less bandwidth needed if file size
smaller
• Smaller file sizes will reduce buffering so the video will play more
smoothly
• Viewers may watch on different devices, so may not need high quality
resolution
Lossless compression (ticked)
• Original recording may not have been made in high resolution
• Could be streaming to high bandwidth devices
• The reduction in the file size is sufficient for the receiving device
• Viewers do not want any loss of quality
Explain the impact of changing the sampling resolution on the accuracy of a sound recording.
Increase sampling resolution
• … the number of bits used for each sample is increased
• … there will be more values available to represent each sample // more
69 | P a g e
amplitudes can be represented
• ... each binary amplitude/note in the digital recording is closer to the
analogue amplitude/note
• … quantisation errors are reduced
• … the digital soundwave is closer to the original analogue soundwave
Decrease sampling resolution
• … the number of bits used for each sample is decreased
• … there will be fewer values available to represent each sample // fewer
amplitudes can be stored
• ... each binary amplitude/note in the digital recording is further from the
analogue amplitude/note
• … quantisation errors are increased
• … the digital soundwave is less like the original analogue soundwave
A bitmap image has a resolution of 2048 pixels wide and 1024 pixels high.
The image has a bit depth of 10 bits per pixel.
Estimate the file size of the bitmap image in mebibytes. Show your working.
Answer: 2.5 mebibytes
Working:
70 | P a g e
Describe the impact of increasing the image resolution on the quality of a bitmap graphic.
• more pixels can be stored / are available
• the image is sharper / less pixelated
Calculate the file size of a bitmap image using the following information:
• image resolution of 2048 pixels wide and 1024 pixels high
• bit depth of 16 bits.
Give your answer in kibibytes. Show your working
Answer: 4096 kibibytes
Working:
File size = (2048 6) / (8 1024)
The digital camera has a microphone which is used to record the sound for the video.
The user changes the sampling rate that the microphone uses from 44.1kHz to 88.2kHz.
Describe how this change in sampling rate will affect the performance of the video doorbell
Data transmission to user’s smartphone will take longer
… because there is more data to transmit
The secondary storage device will fill faster
71 | P a g e
… fewer videos will be able to be stored long-term // videos are
overwritten more often
The computer can transmit a video made from bitmap images and vector graphic animations
to the VR headset.
Describe how the data for a bitmapped image is encoded.
Image is made of pixels and each pixel has one colour
Each colour has a unique binary code
Code for the colour of each pixel is stored in sequence
48MB
72 | P a g e
instead of lossless compression.
The file takes less storage space on the web server than if lossless
compression was used
The file is faster to upload/download to/from the server than if lossless
compression was used
The file uses less bandwidth to transmit than if lossless compression was
used
The file consumes less data allowance than if lossless compression was
Used
Explain how run-length encoding (RLE) will compress the photograph.
Identifies consecutive repeating pixels of the same colour
Stores the colour /pattern and the number of times it repeats
Identify two elements of a bitmap image that can be changed to reduce its file size.
Colour/bit depth
Image resolution
The student compresses the file before it is emailed to their teacher as an attachment.
Explain the benefits to the teacher of the attachment being a compressed file
• Less of the teacher’s storage space is used
• ... so more student work can be stored
• Transmission time is reduced
• … so the teacher does not have to wait as long for it to arrive
• Bandwidth usage is reduced
• … so other transmissions are not adversely affected
• Less data allowance is used on the teacher’s email system
Describe one lossless method of compressing a text file.
• Run-Length Encoding // RLE
• Repeated sequences of the same characters are replaced by
• ... a single copy of the character
• ... and a count of the number of characters
73 | P a g e
A student takes a photograph of a science experiment.
The photograph is saved as a bitmapped image.
Define the following bitmap terms
Colour depth:
• the number of bits used to represent a colour // the number of colours that
can be represented in an image
File header:
• stores data about the image file / metadata
Explain why changing the image resolution will affect the image quality and file size.
Image quality:
• Decreasing resolution means details within the image are lost because
there are fewer pixels // Increasing resolution means the image is more
detailed because there are more pixels
File size:
• Decreasing the resolution will decrease the file size because there are
fewer pixels therefore less data // Increasing the resolution will increase
the file size because there are more pixels therefore more data
Identify one lossless method of compressing an image.
• Run-Length Encoding
The student draws a picture on paper that is scanned into the computer and saved as a
vector graphic.
Define the vector graphic terms property and drawing lis
Property:
• an attribute of a drawing object // data about a shape // defines one
aspect of the appearance of a drawing object
Drawing list:
• all the drawing objects/shapes in an image // stores the
commands/descriptions / mathematical equations required to draw
each object
74 | P a g e
The colour of each pixel in a bitmapped image is represented by 8 bits.
State the largest number of different colours that can be represented by 8 bits.
256 // 2^8
State one drawback of increasing the number of bits that represents each pixel in the
bitmap image.
Increased file size
A bitmap image can be compressed using lossy compression.
Explain the reasons why lossy compression is often suitable for a bitmap image
• The change may not be noticeable // Data removed is usually not noticed
by the human eye
• … for example, changes in shade/detail
• It produces a larger decrease in file size compared to lossless // Lossy
decreases file size considerably
Explain how an analogue sound wave is converted into digital data.
• Value/magnitude/size of the analogue sound wave is measured a set
number of times each second/time / at set intervals
• Each sample/reading/measurement is given the binary number and
stored in sequence
Describe one method of compressing a sound file using lossy compression.
• Decrease sample rate
• … fewer samples/readings/measurements stored per second // fewer bits
per second stored
• Decrease sample resolution
• … fewer bits per sample/reading/measurement // each sample has
fewer bits
• Sound outside of set/human hearing range is removed
• … fewer measurements are stored / decreases the number of possible
binary values so fewer bits are stored
75 | P a g e
3. Assembly Language
Five modes of addressing and five descriptions are shown below
Direct: the operand is the address of the value to be used
Immediate: the operand is the value to be used
Indexed: the operand plus contents of index register is the address of the value to be used
Indirect: the operand is the address of the address of the value to be used
Relative: the operand is the offset from the current address where the value to be used is stored
Write 1 or 2 to indicate whether the activity is carried out during the first pass or during the
second pass.
any symbolic address is replaced by an absolute address: 2
any directives are acted upon: 1
any symbolic address is added to the symbolic address table:1
data items are converted into their binary equivalent: 1
forward references are resolved: 2
The diagram shows the contents of the memory.
120 - 0 0 0 0 1 0 0 1
121 - 0 1 1 1 0 1 0 1
122 - 1 0 1 1 0 1 1 0
123 - 1 1 1 0 0 1 0 0
124 - 0 1 1 1 1 1 1 1
125 - 0 0 0 0 0 0 0 1
126 - 0 1 0 0 0 0 0 1
127 - 0 1 1 0 1 0 0 1
……….
200 - 1 0 0 0 1 0 0 0
Show the contents of the Accumulator after execution of the instruction: LDD 121
01110101
Show the contents of the Accumulator after execution of the instruction: LDI 124
Explain how you arrived at your answer
01101001
76 | P a g e
• content of 124 is 0 1 1 1 1 1 1 1
• this is equivalent to 127
• contents of 127 are 0 1 1 0 1 0 0 1
Show the contents of the Accumulator after execution of the instruction: LDX 120
Index Register: 00000110
Explain how you arrived at your answer.
01000001
• index register value = 6
• 120 + 6 = 126
• contents of 126 placed in the accumulator
77 | P a g e
Show the contents of the Accumulator after the execution of the instruction: LDX 60
Accumulator contents: 0100 0101
Reason:
Address is 60
Contents of the index register is 8
And 60 + 8 = 68 in denary gives the address
The contents of which is 0100 0101 in binary.
Show the contents of the index register after the execution of the instruction: DEC IX
78 | P a g e
0000 0111
79 | P a g e
The diagram shows the contents of the index register:
Index register: 11001101
(a) Show the contents of the index register after the execution of the instruction:
INC IX
11001110
80 | P a g e
81 | P a g e
Show the contents of the Accumulator after execution of the instruction:
LDD 802
10010111
Show the contents of the Accumulator after execution of the instruction:
LDX 800
Index Register: 00001001
11000010
• Index Register contains 1001 = 9
• 800 + 9 = 809
82 | P a g e
There is a redundant instruction in the code in part (b)(i).
State the address of this instruction.
107
83 | P a g e
Show the contents of the Accumulator after the execution of the instruction:
LDD 102
01110011
Show the contents of the Accumulator after the execution of the instruction:
LDX 101
IX: 0 0 0 0 0 1 0 0
10110001
• Index Register holds the value 4; 101 + 4 = 105 so load data from address 105
Show the contents of the Accumulator after the execution of the instruction:
LDI 103
01001011
• Memory address 103 contains the value 107
• So address 107 is the address from which to load the data
Complete the trace table below for the following assembly language program.
84 | P a g e
LDM #500
500
LDD 500
496
85 | P a g e
LDX 500
502
LDI 500
86
Each machine code instruction is encoded as 16-bits (8-bit op code followed by an 8-bit
operand).
LDM #17
0000000100010001
LDX #97
0000011001100001
Using an 8-bit operand, state the maximum number of memory locations, in denary, that can
be directly addressed.
256
A second instruction has been written in hexadecimal as:
05 3F
Write the equivalent assembly language instruction, with the operand in denary
LDI 63
86 | P a g e
LDD 355
351
LDM #355
355
LDX 351
22
LDI 355
86
Each machine code instruction is encoded as 16 bits (8-bit op code followed by an 8-bit
operand).
Write the machine code for these instructions:
LDM #67
0001001001000011
LDX #7
0001010100000111
A second instruction has been written in hexadecimal as:
87 | P a g e
16 4D
Write the assembly language for this instruction with the operand in denary
LDR #77
LDM #500
500
LDD 500
496
LDX 500
502
LDI 500
86
Each machine code instruction is encoded as 16-bits (8-bit op code followed by an 8-bit
operand).
Write the machine code for the following instructions:
LDM #17
0000000100010001
LDX #97
0000011001100001
88 | P a g e
Using an 8-bit operand, state the maximum number of memory locations, in denary, that can
be directly addressed.
256
A second instruction has been written in hexadecimal as:
05 3F
Write the equivalent assembly language instruction, with the operand in denary
LDI 63
89 | P a g e
90 | P a g e
State what is meant by direct addressing and indirect addressing.
Direct addressing
• The operand is the address where the data is stored
Indirect addressing
• The operand is an address, that address holds another address where
the data is stored
Explain how the instruction ADD 20 can be interpreted as either direct or indirect
addressing.
Direct addressing:
• 20 is the address of the data
Indirect addressing:
• 20 is an address which holds the address where the data is stored
The assembly language instructions in the following table use either symbolic addressing or
absolute addressing.
Tick one box in each row to indicate whether the instruction uses symbolic or absolute
Addressing
91 | P a g e
92 | P a g e
93 | P a g e
94 | P a g e
State what is meant by absolute addressing and symbolic addressing.
Absolute addressing:
• The operand is a numeric address // The numeric address is given //
referring directly to a memory location
Symbolic addressing:
• The operand is a word/symbol // A word/symbol represents the memory
location/address
Give an example of an ADD instruction using both absolute addressing and symbolic
95 | P a g e
addressing.
Absolute addressing: For example, ADD 230
Symbolic addressing: For example, ADD num1
State what is meant by indexed addressing and immediate addressing.
Indexed addressing:
• The address to be used is formed by:
operand + the contents of the Index Register (IX)
Immediate addressing:
• The operand is not an address // the operand is the actual value to be
loaded
Give an example of an instruction that uses
Indexed: For example, LDX 20
Immediate: For example, ADD #20
State what is meant by relative addressing and indexed addressing.
Relative addressing:
• A number (the offset) is added to the base address to give the actual
address
Indexed addressing:
• The contents of the index register are added to operand to give the actual
Address
96 | P a g e
97 | P a g e
The processor’s instruction set can be grouped according to their function. For example, one
group is modes of addressing.
Identify two other groups of instructions.
• Data movement
• Input and output of data
98 | P a g e
• Arithmetic operations
• Jump instructions
• Compare instructions
99 | P a g e
A processor’s instruction set can be grouped according to their function. For example, one
group is the input and output of data.
Identify two other groups of instructions
• Data movement
• Arithmetic operations
• (Unconditional and conditional) jump instructions
• Compare instructions
100 | P a g e
• Modes of addressing
101 | P a g e
The op codes LDM and LDD are used to load a register. The op code LDM uses immediate
addressing, and the op code LDD uses direct addressing.
Describe what happens when the following instructions are run.
• LDM #300 The (denary) number 300 is loaded (into the register)
• LDD 300 The contents of address 300 are loaded (into the
register)
Assembly language instructions can be grouped by their purpose.
102 | P a g e
The following table shows four assembly language instructions.
Tick (✓) one box in each row to indicate the group each instruction belongs to
A processor has one general purpose register, the Accumulator (ACC), and an Index Register
(IX).
The table gives three assembly language instructions for loading data into the ACC. It also
103 | P a g e
identifies the addressing mode used for each instruction
State the contents of the Accumulator after each of the instructions A, B and C are run
A: The number 193
B: The data in memory location 193
C: The data in the memory location found by adding the contents of the IX to
193
Name two other addressing modes
• Indirect
• Relative
Complete the trace table for the following assembly language program. The first instruction has
been completed for you.
104 | P a g e
The following table shows assembly language instructions for a processor that has one general
purpose register, the Accumulator (ACC).
105 | P a g e
Tick (✓) one box to indicate which one of the following statements is true after program
execution.
106 | P a g e
Tick (✓) one box to indicate which one of the following statements is true after program
execution.
107 | P a g e
The current contents of the main memory are:
Tick (✓) one box to indicate which one of the following statements is true after program
execution.
108 | P a g e
language instruction
109 | P a g e
Assembly language instructions can be put into groups.
Tick (✓) one box in each column to identify the appropriate instruction group for each of
the three assembly language instructions
110 | P a g e
The assembly language instructions are grouped according to their function.
Write one example of an op code from the table of instructions for each of the following
Groups
Arithmetic:
• ADD // INC
Data movement
• STO // LDD // LDI // LDM
111 | P a g e
Trace the program currently in memory using the following trace table when the values
2, 10 and 3 are input.
The first instruction has been completed for you.
112 | P a g e
The current contents of the main memory are:
113 | P a g e
The instruction in memory address 100 needs to be changed. It needs to use indirect
addressing to load the contents of memory address 200.
Give the new instruction to replace LDD 200.
LDI 202
State the maximum number of op codes that can be represented using eight bits.
256
The status register contains condition flags.
Identify three condition flags that can be set in the status register.
• Zero
114 | P a g e
• Carry
• Overflow
• Sign/negative
• Compare results
• Parity
The current contents of the main memory are:
The instruction in memory address 50 needs to be changed to use direct addressing to load
the contents of the memory location at address 100.
115 | P a g e
Give the new instruction to replace LDI 103.
LDD 100
The assembly language program uses direct and indirect addressing.
Identify two other modes of addressing used in an assembly language program
• Immediate
• Indexed
• Relative
The current contents of the main memory are:
The instructions in the processor’s instruction set can be grouped according to their function.
Identify three different instruction groups from the instructions given in the table.
• Compare instructions
• Arithmetic operations
• Data movement
116 | P a g e
Identify one instruction group not given in the table.
• Unconditional and conditional jump instructions
• Input and output of data
The current contents of the main memory and selected values from the ASCII character set
are shown.
117 | P a g e
118 | P a g e
The Accumulator currently contains the binary number:
00110101
Write the contents of the Accumulator after the processor has executed the following
instruction:
119 | P a g e
LSL #2
11010100
The Accumulator currently contains the binary number:
00110101
Identify the mathematical operation that the following instruction will perform on the
contents of the accumulator.
LSR #3
The number is divided by 8 (and only whole number retained)
The current contents of the main memory and selected values from the ASCII character set are:
120 | P a g e
Some bit manipulation instructions are shown in the table:
An assembly language program needs to test if bit number 2 in memory address 300
is a 1.
121 | P a g e
Complete the assembly language instruction to perform this test.
AND
An assembly language program needs to set bit numbers 4, 5, 6 and 7 to 0, but keep
bits 0 to 3 with their existing values.
Write the assembly language instruction to perform this action.
AND #15
The current contents of main memory are shown
Each row of the following table shows the current contents of ACC in binary and the instruction
that will be performed on those contents.
Complete the table by writing the new contents of the ACC after the execution of each
instruction.
The following table shows part of the instruction set for a processor. The processor has one
general purpose register, the Accumulator (ACC), and an Index Register (IX).
122 | P a g e
The instructions in the processor’s instruction set can be grouped according to their function.
Identify three different instruction groups from the instructions given in the table.
• Compare instructions
• Arithmetic operations
• Data movement
123 | P a g e
The ACC currently contains the following positive binary integer:
01100101
Write the bit manipulation instruction that would change the binary integer in ACC to:
11111111
OR #255 // OR #154 // XOR #154
The ACC currently contains the following positive binary integer:
01100101
Write the bit manipulation instruction that would change the binary integer in ACC to:
10011010
XOR #255
A three-place logical shift to the left is performed on the following positive binary integer.
Show the result of this logical shift.
01111110
11110000
The current contents of main memory and selected values from the ASCII character set are
Given
Trace the program currently in memory using the trace table
124 | P a g e
125 | P a g e
126 | P a g e
State the purpose of this part of an assembly language program.
LDD 100
STO 165
LDD 101
STO 100
LDD 165
STO 101
swaps the contents of memory address 100 and 101
The following table shows another part of the instruction set for the processor
127 | P a g e
The current contents of the ACC are:
10010011
Show the result after the execution of the following instruction.
OR B11001100
1101 1111
The current contents of the ACC are:
10010011
Show the result after the execution of the following instruction.
LSR #2
0010 0100
Trace the program currently in memory using the trace table, stopping when line 90 is
executed for a second time
128 | P a g e
129 | P a g e
The contents of memory addresses 50 and 51 are shown:
130 | P a g e
The current contents of the ACC are:
01010011
Show the contents of the ACC after the execution of the following instruction.
XOR B00011111
0100 1100
The current contents of the ACC are:
01010011
Show the contents of the ACC after the execution of the following instruction.
AND 50
0100 0001
The current contents of the ACC are:
01010011
Show the contents of the ACC after the execution of the following instruction.
LSL #3
1001 1000
The current contents of the ACC are:
01010011
Show the contents of the ACC after the execution of the following instruction.
OR 51
1101 1111
Assembly language statements can use different modes of addressing.
Complete the following description of addressing modes.
Direct addressing is when the operand holds the memory address of the data.
Indirect addressing is when the operand holds a memory address that stores
the memory address of the data.
131 | P a g e
Immediate addressing is when the operand is the data.
Give one example of an instruction that belongs to each of the following instruction
groups.
Only use the instructions given in the table. Each instruction must have a suitable
operand.
• Data movement: e.g. LDR #50 // STO 201
• Arithmetic operation: e.g. ADD 100 // INC IX
• Conditional instruction: e.g. JPE 96
The instruction LDR #2 uses immediate addressing.
Give one similarity and one difference between direct addressing and indexed addressing.
Similarity:
• both load the contents of an address into the Accumulator
Difference:
• direct accesses the address given by the operand whereas indexed adds
the contents of IX to the operand and accesses the data at that calculated
address
Identify one other mode of addressing.
• Indirect (addressing)
• Relative (addressing)
The current contents of the ACC are:
01001111
Show the contents of the ACC after the execution of the following instruction.
AND B10100101
0000 0101
The current contents of the ACC are:
00010111
Show the contents of the ACC after the execution of the following instruction.
LSR #3
0000 0010
The current contents of the ACC are:
132 | P a g e
11110111
Show the contents of the ACC after the execution of the following instruction.
XOR B00100101
1101 0010
The instructions in the processor’s instruction set can be grouped according to their function.
Identify the instruction group for each of the following opcodes
• IN - Input and output of data
• ADD - Arithmetic operations
• JPE - Unconditional and conditional instructions
• CMI - Compare instructions
Trace the program currently in memory using the trace table when the input is ‘1’.
133 | P a g e
134 | P a g e
The current contents of memory are shown:
135 | P a g e
Complete the table by writing the content of the ACC after each program has run.
136 | P a g e
Complete the table by writing the content of the ACC after each program has run.
The binary number 10011010 is reloaded into the ACC before each program is run
137 | P a g e
The current contents of memory are shown:
Complete the table by writing the content of the ACC after each program has run.
138 | P a g e
The processor includes these bit manipulation instructions:
139 | P a g e
Complete the table by writing the content of the ACC after each program has run.
The binary number 01000110 is reloaded into the ACC before each program is run.
140 | P a g e
Complete the table by writing the content of the ACC after each program has run.
141 | P a g e
The current contents of memory are shown:
Complete the table by writing the content of the ACC after each instruction has run.
The binary number 11111111 is reloaded into the ACC before each instruction is run.
142 | P a g e
Complete the table by writing the content of the ACC and the IX after each set of instructions
has run
143 | P a g e
The table has three sets of instructions. The binary number 10011010 is reloaded into
the ACC before each set of instructions is run.
Complete the table by writing the content of the ACC after each set of instructions has run.
Explain how bit manipulation can be used to test whether the binary number stored in
the ACC represents an odd denary number.
Write the bit manipulation instruction that will be used.
• An odd binary number will have a 1 in the Least Significant Bit (LSB)
• A bit manipulation operation is required to access/mask only the LSB and
clear all the others
• Compare the result of the masking with denary 1
• … the result of the comparison will be true if the number is odd
1 mark for correct instruction
• AND B00000001 // AND #1 // AND &0
The current contents of memory are shown:
144 | P a g e
Complete the table by writing the content of the ACC after each program has run.
Explain how bit manipulation can be used to clear the data in an 8-bit register.
Write the bit manipulation instruction that will be used.
• A bit manipulation operation is required to set all the bits to zero
• Compare the result of the masking with 0
• … the result of comparison will be true if the register is cleared
• AND B00000000 / #00 / &00
145 | P a g e
Describe the difference between a right logical binary shift and a right arithmetic binary shift.
• A logical shift moves all bits to the right and inserts zeros in the
appropriate leftmost bits
• An arithmetic shift moves all bits to the right but copies the sign bit into
the Most Significant Bit (MSB)
146 | P a g e
– sensors send signals / data to a computer
– data / signal converted to digital (using an ADC)
– computer calculates the activity value based on sensor signal strength / data
– if calculated value > 3,
– determine location of sensor
– build up a map of seismic activity
– location and magnitude sent to printer
– … via USB port / wireless link
– monitoring is continuous
When the system detects high activity, operators may need to respond rapidly. A printer is useful
for hard copies, but may not be the best way to inform operators. Give a reason why.
– output / hard copy not picked up in good time
Name an alternative output device for this monitoring system and give a reason for your choice.
– speaker / buzzer / alarm bell
– gives control room operators an audible warning
– flashing lights
– gives control room operators an visual warning
– monitor
– use of red / flashing colours on monitor gets the attention of operators
The system detects when seismic activity is greater than 3 on the Richter Scale. Whenever this
happens, a printer in the control room prints a report.
Identify the steps that are required in this monitoring system.
– sensors send signals / data to a computer
– data / signal converted to digital (using an ADC)
– computer calculates the activity value based on sensor signal strength / data
– if calculated value > 3,
– determine location of sensor
– build up a map of seismic activity
– location and magnitude sent to printer
– … via USB port / wireless link
147 | P a g e
– monitoring is continuous
When the system detects high activity, operators may need to respond rapidly. A printer
is useful for hard copies, but may not be the best way to inform operators.
Give a reason why
– output / hard copy not picked up in good time
Name an alternative output device for this monitoring system and give a reason for your choice.
– speaker / buzzer / alarm bell
– gives control room operators an audible warning
– flashing lights
– gives control room operators an visual warning
– monitor
– use of red / flashing colours on monitor gets the attention of operators
Kiara has a washing machine and a refrigerator.
She has an embedded system in her washing machine.
Describe what is meant by an embedded system, using the washing machine as an example.
• Definition: Microprocessor/microcontroller within a larger system //
microprocessor/microcontroller that performs one specific task
• Example: e.g. Embedded system in washing machine only controls the
programs for the washing cycle // it is part of the washing machine but
does not perform any other function within it
The washing machine’s embedded system makes use of both Random Access Memory
(RAM) and Read Only Memory (ROM).
State the purpose of RAM and ROM within the washing machine’s embedded system
RAM:
• Store the choices/wash program the user has entered // stores the data
read from the sensors // stores the time left in the program // by example
ROM:
• Store the start-up instructions (for the washing cycles)
The temperature in her refrigerator must be kept between 4 and 6 degrees Celsius.
148 | P a g e
The microprocessor in the refrigerator turns on the cooling if the temperature is too high, and
turns off the cooling if the temperature is too low.
Explain why the system in the refrigerator is a control and not a monitoring system.
149 | P a g e
• The system is not easily changed/updated by the TV owner
Embedded systems use Electrically Erasable Programmable ROM (EEPROM).
Describe one benefit of using EEPROMs in an embedded system.
• no additional equipment is needed to change
• ... enables firmware updates by non-technical users
• can be erased and reprogrammed several times
• ... so firmware can be updated
• ... can erase a particular byte or the whole EEPROM
• possible to reprogram / update
• ... without removing it from the device
Embedded systems contain Read Only Memory (ROM) and Random Access Memory (RAM).
Explain the reasons why ROM is used in an embedded system.
• to store data that does not change
• data must be stored even when device is without power
• to store boot up instructions / system software / firmware / BIOS
Explain the importance of feedback in a control system
• Feedback ensures that a system operates within set criteria / constraints
• ...by enabling system output to affect (subsequent) system input
• ...thus allowing conditions to be automatically adjusted
Give one example of an embedded system and explain why it is an example of an embedded
System
• Dedicated to one task applied to example
• Does not require much processing power applied to example
• Built into a larger system applied to example
• Contains firmware that cannot be easily updated applied to example
• The system does not have its own operating system
• An embedded system must contain a processor, memory and an I/O
capability // Dedicated hardware
150 | P a g e
The factory uses a conveyor belt that moves the products from one stage of production to the
next
stage.
An automated system counts the number of chocolate bars made at the end of production.
The system includes a sensor positioned above the conveyor belt.
Identify one appropriate type of sensor that can be used.
• infra-red / proximity (sensor)
A second automated system removes chocolate bars with an incorrect weight from the
production line.
Describe the role of an actuator in this second system.
• Actuator generates a signal / causes an action / converts electrical
energy into a mechanical force
• ... to push an arm // to open a trap door // to pick up the chocolate bar
with the incorrect weight
The factory has many different machines with embedded systems.
Identify two features of embedded systems.
• Dedicated to a single task // limited number of functions
• Built into a larger system // integrated into a larger system
• An embedded system must contain a processor, memory and an I/O
capability // Dedicated hardware
Identify one drawback of embedded systems
Difficult to change / update the firmware by the user // Difficult to upgrade
devices to take advantage of new technology
• Cannot be easily adapted for another task
• Troubleshooting faults/upgrading is a specialist task
• Devices are often thrown away rather than repaired as difficult to upgrade
or repair
Describe the purpose of a temperature sensor within the 3D printer
• To prevent overheating // ensure material is hot enough
• ...by identifying the temperature of the object (being printed)
151 | P a g e
• ...by identifying the temperature of the material being used
A video doorbell is attached to the front door of a house. The doorbell uses a motion sensor to
detect when a visitor walks in front of the door. When the motion sensor is activated:
• The digital camera in the doorbell starts recording a video.
• A message is transmitted to a smartphone so that the person who lives in the house can
watch the video.
The doorbell also has a button that can be pressed. When the button is pressed, a message is
transmitted to a smartphone to play the doorbell sound.
The videos are stored on the doorbell’s internal secondary storage device and overwritten when
the secondary storage device is full.
152 | P a g e
The transmission of the data/video does not affect the input to the
sensor/button
The ringing of the doorbell does not affect the input to the button
Control:
Video doorbell does not only store the values from the motion sensor
The data is processed, generating a signal to start the digital camera
recording
Button pressed/motion detected causes a signal to be sent over a
network to the smartphone
The video doorbell has both primary memory and secondary storage.
Identify two items of data that the video doorbell will store in primary memory
Current reading/data from motion sensor
Current/recent video
Instructions being executed
Start-up/BIOS/boot-up instructions
153 | P a g e
A robot navigates through the restaurant to the table it is serving.
Complete the table by identifying two sensors that can be included in the robot and the
purpose of each sensor in the navigation system
154 | P a g e
• if people are detected within a set distance.
Complete the table to identify the most appropriate type of sensor for each scenario.
155 | P a g e
per chip
A road bridge has a weight limit and a height limit for vehicles. For example, a vehicle must
weigh
less than 10000kg and must have a height of less than 3m.
The bridge has a warning system. If a vehicle is approaching the bridge and it exceeds one or
both limits, a sign displays a warning telling the driver of the vehicle to stop.
The bridge warning system uses sensors to detect if a vehicle exceeds the limits.
Complete the table by identifying two different sensors that could be used by the system and
describe how each sensor is used by the system.
• Infra-red sensor
• Measure / check the height of the vehicle
• Pressure sensor
• Measure / check the weight of the vehicle
Explain whether the bridge warning system is an example of a monitoring system or of a
control system.
Monitoring system
• Because there is no use of feedback // the warning sign is only
an indicator
• ... the output of the turning on of the sign does not affect the input of data
from the sensors
• The system does not have any actuators
A car has an automatic braking system.
A sensor is used to measure the distance to objects that are in front of the car.
The car automatically brakes if an object is too close to the front of the car or the distance
between
the car and the object is decreasing too quickly. The closer the object is to the front of the car,
the
harder the car brakes so that the car slows down more quickly.
Explain the reasons why the automatic braking system of the car is a control system.
• The system uses feedback
• The system acts independently
156 | P a g e
• Input data causes the car to brake
• … braking decreases the/changes the distance to the object
• … this new distance is used to determine whether/how hard the car
needs to brake
5. Internet Communications
Distinguish between the Internet and the World Wide Web (WWW).
Internet
• massive network of networks/interconnected network of computer devices
• Internet stands for Interconnected Networks
• uses TCP/IP protocol World Wide Web (www)
• is a collection of (multimedia) web pages/documents
• ...stored on websites
• http/protocols used to transmit data
• web pages are written in HTML
• URLs specify the location of the web pages
• web documents are accessed using browsers
A device that transfers data from one network to another in an intelligent way. It has the task of
forwarding data packets to their destination by the most efficient route
Router
157 | P a g e
A device used between two dissimilar LANs. The device is required to convert data packets
from one protocol to another.
Gateway
A device or software that provides a specific function for computers using a network. The most
common examples handle printing, file storage and the delivery of web pages.
Server
Explain the term bit streaming
– sequence of digital signals / bits
– over a communication path / Internet
– transfer of data at high speed
– requires fast broadband connection
– requires some form of buffering
– bits arrive in the same order as sent
A person watches a film streamed from a website on a tablet computer. Give two benefits of
using bit streaming for this purpose.
– no need to wait for a whole file to be downloaded
– no need to store large files on user’s computer
– allows on demand playback
– no specialist software is required for playback in browser
State two potential problems of using bit streaming for this purpose.
– video stops / hangs if very slow Internet / broadband speed low
– video stops / hangs if inadequate buffering capacity
– loss of Internet means can’t access films / files
– may require specific software to run the files / films
– viruses can be downloaded from the websites
Explain the terms on-demand bit streaming and real-time bit streaming
on-demand
– digital video tape, analogue video tape, or digital files are converted to bit streaming –
format for broadcasting on the net; this is known as encoding, these encoded streaming
video files are then uploaded to a dedicated server
– a link for the encoded video is placed on a web site
158 | P a g e
– a user clicks on the link to download the encoded streaming video; the streamed video is
– then broadcast to the user as and when they require it
– can be paused / can go back and re-watch / fast-forward, etc.
real-time
– an event is captured live with a video camera
– the video camera is connected to a computer
– the video signal is converted to streaming media files (encoded) on the computer
– the encoded feed is then uploaded from the computer to a dedicated streaming server
via cable, DSL, or a high-speed internet connection
– the server then sends the live images it to all users requesting it as real-time video
streaming
– cannot be paused etc.
State two benefits of each type of cable. Each benefit must be clearly different.
– fibre optic cables have greater bandwidth
– fibre optic cables need less signal boosting // can transmit over longer distances
– fibre optic cables have greater security (more difficult to “tap” into)
– fibre optic cables are immune to electromagnetic and other effects
– fibre optic cabling is lighter in weight (easier to install)
– fibre optic cables consume less power
– copper cabling is less expensive to install
– copper cable is easier to install because it is more flexible
– it is easier to make terminations using copper cabling
– the expertise in use of copper cabling is more extensive
– has been around for years … so very little is “unknown” about installations using this type
of cabling
Describe what is meant by a client-server model of networked computers.
– at least one computer used to “serve” …
– … other computers are referred to as “clients”
– server provides services / applications etc. …
– … which may be requested by clients
159 | P a g e
Give two benefits of using the client-server model.
– files and resources are centralised
– creation of security / manage security
– user needs user name and password to access network
– centralised back-up
– intranet capability
– Internet monitoring
– clients can be less powerful machines, therefore less expensive to buy
– saving resources on server reduces the burden on the client
X – router
160 | P a g e
– no need to wait for a whole file to be downloaded
– no need to store large files on user’s computer
– allows on demand playback
– no specialist software is required for playback in browser
(ii) State two potential problems of using bit streaming for this purpose.
– video stops / hangs if very slow Internet / broadband speed low
– video stops / hangs if inadequate buffering capacity
– loss of Internet means can’t access films / files
– may require specific software to run the files / films
– viruses can be downloaded from the websites
Explain the terms on-demand bit streaming and real-time bit streaming
on-demand
– digital video tape, analogue video tape, or digital files are converted to bit streaming –
format for broadcasting on the net; this is known as encoding these encoded streaming
video files are then uploaded to a dedicated server
– a link for the encoded video is placed on a web site
– a user clicks on the link to download the encoded streaming video; the streamed video is
– then broadcast to the user as and when they require it
– can be paused / can go back and re-watch / fast-forward, etc.
real-time
– an event is captured live with a video camera
– the video camera is connected to a computer
– the video signal is converted to streaming media files (encoded) on the computer
– the encoded feed is then uploaded from the computer to a dedicated streaming server
via cable, DSL, or a high-speed internet connection
– the server then sends the live images it to all users requesting it as real-time video
streaming
– cannot be paused etc.
State two benefits of each type of cable. Each benefit must be clearly different.
– fibre optic cables have greater bandwidth
161 | P a g e
– fibre optic cables need less signal boosting // can transmit over longer distances
– fibre optic cables have greater security (more difficult to “tap” into)
– fibre optic cables are immune to electromagnetic and other effects
– fibre optic cabling is lighter in weight (easier to install)
– fibre optic cables consume less power
– copper cabling is less expensive to install
– copper cable is easier to install because it is more flexible
– it is easier to make terminations using copper cabling
– the expertise in use of copper cabling is more extensive
– has been around for years … so very little is “unknown” about installations using this type
of cabling
Describe what is meant by a client-server model of networked computers
– at least one computer used to “serve” …
– … other computers are referred to as “clients”
– server provides services / applications etc. …
– … which may be requested by clients
Give two benefits of using the client-server model
– files and resources are centralised
– creation of security / manage security
– user needs user name and password to access network
– centralised back-up
– intranet capability
– Internet monitoring
– Clients can be less powerful machines, therefore less expensive to buy
– Saving resources on server reduces the burden on the client
Explain the difference between the World Wide Web (WWW) and the Interne
• WWW is a collection of interlinked, hypertext documents/webpages/multimedia
resources (accessed via the Internet) //WWW is content from web servers organised as
web pages
• Internet is the global connection of interconnected computer networks
162 | P a g e
• The Internet uses TCP/IP protocol / WWW uses http protocols to transmit data
Three methods of connecting devices include fibre-optic cables, copper cables and radio
waves. The table below gives descriptions relating to these connection methods
163 | P a g e
• (Original) DNS server returns the IP address to the browser.
A user watches a video available on a website. The website uses on-demand bit streaming.
Describe how it is possible to watch the video without it continually pausing.
• User needs high-speed broadband (connection)
• Data is streamed to a buffer (in the computer)
• Buffering stops video pausing as bits streamed
• As buffer is emptied, it fills up again so that viewing is continuous
• Actual playback is (a few seconds) behind the time the data is received by computer
Describe what is meant by client-side scripting
• The user’s web browser is the client software
• The requested web page has program code / script embedded within it
• This code is interpreted by the web browser
A user requests a web page by keying the Uniform Resource Locator (URL) into the address
bar of their web browser. The requested page contains a client-side script.
Describe the sequence of steps leading to the display of the web page on the computer
screen.
• The browser parses the URL to obtain the Domain Name
• The browser software passes the Domain Name to the nearest Domain Name
Server (DNS)
• The DNS stores a list of Domain Names and matching IP addresses
• The DNS Name Resolver looks for the Domain Name in its database
• If found the corresponding IP address is returned to the originator
• If not found the request is forwarded to another higher level DNS
• The original DNS adds the returned IP address to its cache
• The original DNS returns the IP address to the originator
• The browser uses the IP address to request the required web page from the web server
• The web server retrieves the page and delivers it to the originator
• The browser software interprets the script and displays the web page
Describe what is meant by the term client-server for this application.
• The file is made available from a web/email/FTP server
164 | P a g e
• The user’s browser is the client software
• The client (software browser) requests the file from the server
• The desired file is returned to the client computer
The following sequence of steps (1 to 5) describes what happens when someone uses their
personal computer (PC) to request a web page. The web page consists of HTML tags and
text content only. Four of the statements from A, B, C, D, E and F are used to complete the
sequence.
1. The user keys in the Uniform Resource Locator (URL) into
the browser Software.
2. E // The Domain Name Service (DNS) uses the domain
name from the browser to look up the IP address of the web
server.
3. D // The web server retrieves the page
4. F // Sends the web page content to the browser
5. B // Browser software renders the page and displays
Describe what is meant by client-side scripting.
• The user’s web browser is the client software
• The requested web page has program code / script embedded within it
• This code is interpreted by the web browser
Describe the sequence of steps leading to the display of the web page on the computer
screen.
• The browser parses the URL to obtain the Domain Name
• The browser software passes the Domain Name to the nearest Domain Name Server (DNS)
• The DNS stores a list of Domain Names and matching IP addresses
• The DNS Name Resolver looks for the Domain Name in its database
• If found the corresponding IP address is returned to the originator
• If not found the request is forwarded to another higher level DNS
• The original DNS adds the returned IP address to its cache
• The original DNS returns the IP address to the originator
• The browser uses the IP address to request the required web page from the web server
165 | P a g e
• The web server retrieves the page and delivers it to the originator
• The browser software interprets the script and displays the web page
Draw one or more lines from each communication media to the appropriate feature(s)
166 | P a g e
One student stated, ‘The Internet and the World Wide Web are the same thing’.
Tick (✓) one box to indicate whether this statement is true or false.
• Internet is the infrastructure / global collection of networks
• World Wide Web is the (multimedia web) pages / content
• The World Wide Web is accessed over the Internet
• Webpages are written in HTML
• HTTP protocol used to transfer web pages
• Internet uses IP protocol
Describe the sequence of events when a student requests a web page with embedded
server-side code.
• The browser requests the web page
• The web server accesses the page
• The web server processes / executes the code
• The web server produces the HTML for the web page / generates the
web page
• The web server returns the web page to the client
• The client browser displays this web page
167 | P a g e
• (Initial) installation cost is higher // Cable / hardware is more expensive
to buy (per metre)
• Specialists / trained personnel needed to install / maintain
• Difficult to terminate // Electronics at both ends are more complex
• Fibre-optic cables can break when bent
• Only transmits data in one direction
• If a fibre-optic cable connection fails, many more services can be
Affected
Give three benefits of a wireless network compared to a wired network.
• Devices can be more mobile as they do not have to be connected to cable
• Easier to set up // no cables need to be installed
• Add additional devices is easier
• Many different types of device can be connected at the same time
Give one drawback of a wireless network compared to a wired network.
• Easier to hack
• Interference
• Signal degrades quickly
Complete the following statements by filling in the names of the missing methods of bit
streaming.
................................................. bit streaming is used when watching a live stream of events
that are currently taking place. The event is captured live with a video camera connected to a
computer, and it cannot be paused or rewound.
Real-time
................................................. bit streaming is used when watching an event that has taken
place in the past. Existing media are encoded to bit streaming format and uploaded to a
server. It can be paused and rewound.
On-demand
Describe the transmission of data using a PSTN.
• The PSTN consists of many different types of communication lines
• Data is transmitted in both directions at the same time // (full) duplex
168 | P a g e
data transmission
• The communication passes through different switching centres
The company wants to install a dedicated line between the two buildings.
Identify one benefit and one drawback of installing a dedicated line between the two
buildings.
Benefit
• (Probably) faster connection / communication / transmission of data
• (Usually) more consistent transmission speed
• Improved security
Drawback
• Expensive to set-up / maintain
• Disruption to the dedicated line would leave no alternative
Explain the role of routers and gateways in a network.
Router:
• Connects two (or more) networks
• Can connect a network to a WAN // acts as the single access point
for«
• Receives packets and forwards towards the destination
• «using the IP address of the destination
• Assigns private IP addresses
• Operates between similar networks // networks using the same protocol
• Can be used to segment a network
Gateway:
• Connect two (or more) networks
• Can connect a network to a WAN // acts as the single access point
for«
• Receives packets and send packets towards the destination
• «using the IP address of the destination
• Assigns private IP addresses
• Connects two dissimilar networks // networks that use different
Protocols
169 | P a g e
Identify three other types of server
• File server
• Print server
• Proxy server
• Web server
• Application server
Customers of a bank can access their account information by logging in on the bank’s website.
The bank has a client-server model of networked computers.
Describe, using the bank as an example, the key features of a client-server mode
• The bank's server holds the customer account data / website
• ... and performs the requested tasks / processes. The computers used
by the customers are the clients «
• « that send requests to the server
• « which returns the results of the request
• « E.g. a customer asks for a list of recent transactions on their account
Give two other examples of applications that can use the client-server model
• Sending and receiving email
• A company or school centrally storing files
• Using a print server
• Using a file server
The bank’s customers log in to the website using a web application.
Explain why the web application uses server-side scripting
• All data is held on the server // All processing is performed on the server
• The server only sends the results of the query to the client
• The client does not have access to all the data
• ... which keeps the data more secure / consistent
• Customers can be identified when they log in
• «from a database of usernames and passwords
The bank is upgrading its local area network (LAN) copper cables to fibre-optic cables
170 | P a g e
State two benefits to the bank of upgrading to fibre-optic cable from copper cable
• Less interference in the signal
• The signal does not degrade as quickly // Needs less signal boosting
• More secure // more difficult to hack
• Greater bandwidth // Faster transmission speeds possible
State two drawbacks of upgrading to fibre-optic cables.
• Initial installation cost is higher // Cable / hardware is more expensive to
buy per metre
• Specialists / trained personnel are needed to install / maintain
• Difficult to terminate // The electronics at both ends are more complex
• Fibres can break when bent
• Only transmits data in one direction // Cannot transmit power, only data
Describe how the video is sent using bit streaming.
171 | P a g e
Describe, using an example for the supermarket, the client-server network model.
• When a barcode on an item is scanned
• « the server performs any requested tasks // the server looks up the
details of the product
• The self-checkout machine is a client
• « that send requests to the server // the self-checkout machine asks
for, e.g. the price of the item
• The server returns the results of the request // the server returns e.g.
the item price
• Self-checkout machine displays e.g. price to the user
When Bart is at work, he connects his work laptop to his employer’s Local Area Network
(LAN). The LAN has both a router and a gateway.
Give two similarities and one difference between a router and a gateway.
1 mark for each similarity, max 2
• Both devices regulate network traffic between two networks // connect
two networks
• Both receive packets from a network and both forward packets onto a
network
1 mark for a difference
• A Router connects two networks using the same protocol, a Gateway can
connect two networks using different protocols
The peripheral devices are plugged into USB ports of the computer.
Describe two benefits of connecting the peripheral devices using a USB port.
• Fast data transfer
• … useful when transferring large files such as video files
• Automatic connection / plug-and-play
• … so usually there is no need to install separate device drivers
• USB is a standard adopted by many manufacturers
• … meaning all new computers will be equipped with USB ports
• Devices may be powered or charged through USB
172 | P a g e
• … so external devices may be charged while working at the computer
A company allows customers to stream music from its servers over the Internet.
The company’s internet connection is currently provided through copper cables.
Identify two pieces of hardware, other than the cables, that enable the servers to connect to
the Internet. Describe the purpose of each device.
• Router
• To connect (devices) / the servers to the Internet // to transmit data
between the servers and the Internet // to forward data towards its
destination
• Gateway
• To connect a server that uses a different protocol to the Internet // to join
two different types of network
• Modem
• To connect (the servers) to the Internet over a telephone line
• Network interface card // NIC
• To enable the servers to connect to the (company) network
The company wants to upgrade their internet connection to fibre‑optic cables.
Give one benefit and one drawback to the company of upgrading to fibre‑optic cables.
Benefit:
• (Consistently) faster data transmission
• More stable connection
Drawback:
• High initial cost as new hardware will be needed
• Expertise required to complete connections
A customer enters a song title into a web page to listen to the song. The design of the web
page is shown:
Ana owns a small company with four employees. The office has a network containing several
computers that run on a client-server model. There is one server that connects to the Internet
using a router.
173 | P a g e
Networks transmit data using various types of connection shown in the following table.
Complete the table.
Explain how the client-server model enables the employees to access the same files from
different computers.
• The employees’ computers are the clients
• The server hosts the (shared) files
• An employee can request a file (from the server) from any of the client
computers
• Several employees can access the same file (on the server) at the same time
Billy’s computer has several ports.
State the purpose of a port
• To provide the connection to peripheral devices
• To provide an interface between the computer and other devices
Identify one type of port.
• USB
• HDMI
• SCSI
• Firewire
174 | P a g e
• Ethernet
• Any other acceptable port
The surgery has five computers that can all access the database. A copy of the database is
stored centrally
Complete the description of this type of network model by filling in the missing terms.
The client-server model has one server that stores all the data for the
surgery. The other computers are clients. When a user requests data, a
request is sent to the server.
Oscar is watching a concert on his laptop computer.
The concert is streamed to his computer at the same time as it is taking place
Identify whether Oscar is using real-time or on-demand bit streaming. Justify your choice.
real-time
• It is being watched live
• It is not being downloaded to watch later // not already stored online
The video of the concert repeatedly stops and restarts while Oscar is watching it on his
laptop computer. His friend is watching the same video of the concert at the same time,
in a different location, but he does not experience the same problem as Oscar.
Give three possible reasons why Oscar’s video constantly stops and starts again
• Insufficient bandwidth // slow internet connection
• … experiencing problems with buffering
• Video is too high quality to stream in real-time
• Congestion on the home network
• Too much demand for the video from the supplier
• Too many applications running on Oscar’s computer
• Oscar is trying to watch the video in High Definition, his friend is
watching the video at a lower resolution
A Public Switched Telephone Network (PSTN) is one example of a communication system
that can be used to support the Internet.
Identify and describe two other communication systems that can be used to support the
Internet
175 | P a g e
• Dedicated lines / leased line services
• Connection that is only used for that business/organisation // permanent
connection
• Cell phone network
• Send data to cell towers over mobile connection
• Satellite
• Send data to satellites in orbit
Complete the table by identifying the most appropriate term for each description.
Each term must be different.
Networks can be either wired using cables or wireless using radio waves
Describe one benefit of using a wireless network compared to using a wired network.
Benefits:
• Less hard-wiring/hardware is required
• Users and computers can be mobile
• It is much more straightforward to connect other devices
Descriptions:
• Reduced cost of setting up the network
• The network can be accessed from anywhere within range of an access
point
• No need to physically connect each device
176 | P a g e
Describe two drawbacks of using a wireless network compared to using a wired network.
• Transmissions may be less secure
• …because data packets can be intercepted // easier connection by
unauthorised user
• Bandwidth may be limited // As more devices connect the bandwidth
can be reduced
• …so access may be slow
• It is subject to interference from other signals or obstacles
• …which can hinder transmission or corrupt data
• Limited range // greater attenuation
• …so there is a need for repeaters // users can easily move out of range
• Higher latency
• …so transmission will be slower
Server-side scripting is used to access a company database over the Internet.
Steps 1 to 6 describe the sequence of events.
Four of the statements A, B, C, D, E and F are used to complete the sequence.
1 The browser requests the web page from the web server.
2 E - The web server accesses the page from its hard disk.
3 A - The web server processes the PHP code.
4 The web server produces the HTML code for the web page.
5 D - The web server returns the (HTML) web page to the client web browser.
6 C - The browser renders the HTML code and displays the web page.
The Internet uses a client-server model.
Describe the role of clients and servers on the Internet.
• Web pages/files are saved on servers
• Clients send requests to the web servers
• Web servers process the requests
• …and return the results to the client
• ... client displays the results to the user
Upali travels for his work and uses his mobile phone to access the World Wide Web (WWW)
and
177 | P a g e
to communicate with his office by email. His office has a fixed connection to the Internet.
Identify two types of communication systems that support the transmission of his data
• Cell phone network
• Satellite system
• Public Switched Telephone Network
Upali connects his computer to the Local Area Network (LAN) when he is in the office.
The network uses both copper cables and fibre optic cables.
Identify two other examples of network hardware that can be used in a LAN.
• Server
• Router
• Gateway
• Radio transmitter/receiver //WAP
• Hub
• Switch
• Repeater
Melinda and her friends set up a peer-to-peer network between their computers to share data.
Describe the key features of a peer-to-peer network.
• All computers are of equal status
• Each computer provides access to resources and data // data is
distributed
• Computers can communicate and share resources
• Each computer is responsible for its own security
Describe two drawbacks to Melinda and her friends of using a peer-to-peer network.
• Reduced security // no central management of security
• … only as secure as the weakest computer on the network
• … each computer is at risk from viruses from other computers
• No central management of backup
• ... if the data from one computer is not backed up it is lost to all of them
• No central management of files/software
• … consistency may be difficult to maintain
• … each computer may have different software from the others
178 | P a g e
• Individual computers may respond slower
• … because they are being accessed by other computers
• In order to share files etc. all the computers involved need to be switched
on
• ... so the files etc. may not be always available
Melinda connects her laptop to the internet through her router.
Tick one box in each row to identify whether the task is performed by the router or
not.
Melinda mainly uses the internet to watch films and play computer games.
Tick one box to identify whether Melinda should connect to the router using a wired
or wireless network and justify your choice.
Wired
• Faster connection // higher bandwidth
• …. needed as she is downloading/streaming large files
• … less time waiting / less latency / fewer delays
• More reliable / stable connection
• … is less susceptible to issues with distance/walls/interference
• More secure
Wireless
179 | P a g e
• Freedom of movement
• … can move between different rooms with a mobile device and still
receive/transmit data
• … no need of a physical connection
• Easily expanded if friends want to access the same network
• Less cabling / expertise is needed
• ... making the initial setup less expensive
Melinda sends emails from her webmail account (email account accessed through a website).
Explain whether Melinda is using the internet, or the World Wide Web (WWW), or both.
180 | P a g e
• There could be compatibility/access issues
• There could be issues with the company offering cloud services
A school is setting up a network within one of its buildings
State whether the network will be a LAN (local area network) or a WAN (wide area network).
Justify your choice.
• LAN
• Small geographical area
• No leasing external infrastructure / transmission media // does not use
internet to transmit within the building
One classroom in the building has 30 computers. The computers need to be connected to the
network. Each computer has a network interface card (NIC).
Identify two possible devices that can be used to physically connect the 30 computers to the
rest of the network
• router
• switch
• hub
The school has several laptops. Each laptop has a Wireless Network Interface Card (WNIC).
Describe the functions of a Wireless Network Interface Card.
• Provide interface to wireless network
• … as an antenna
• Receives analogue radio waves
• … convert them to digital / binary
• Checks incoming transmissions for correct MAC / IP address
• … ignore transmissions not intended for it
• Encrypts / encodes the data
• Decrypts / decodes the data
• Takes digital/binary input and converts to analogue waves
• … sends the radio waves via the antenna
Upali travels for his work and uses his mobile phone to access the World Wide Web (WWW)
and
181 | P a g e
to communicate with his office by email. His office has a fixed connection to the Internet.
Identify two types of communication systems that support the transmission of his data
• Cell phone network
• Satellite system
• Public Switched Telephone Network
Upali connects his computer to the Local Area Network (LAN) when he is in the office.
The network uses both copper cables and fibre optic cables.
Identify two other examples of network hardware that can be used in a LAN.
• Server
• Router
• Gateway
• Radio transmitter/receiver //WAP
• Hub
• Switch
• Repeater
The following incomplete table contains four network devices and their descriptions.
Complete the table by writing the missing devices and missing descriptions.
182 | P a g e
Fibre optic has higher bandwidth than copper cable // Fibre optic has
higher transmission rates than copper cable
Fibre optic has smaller risk of (noise) interference than copper cable
Fibre optic can be used over longer distances than copper cable before
repeaters are needed
Fibre optic is much more difficult to hack into than copper cable
Fibre optic is more prone to damage than copper cable
Ethernet uses Carrier Sense Multiple Access/Collision Detection (CSMA/CD).
Describe CSMA/CD.
A workstation / node (wishing to transmit) listens to the communication
channel
…data is only sent when the channel is free // ... if channel is free data
is sent
Because there is more than one computer connected to the same
transmission medium
two workstations can start to transmit at the same time, causing a
collision
If a collision happens, the workstations send a (jamming) signal / abort
transmission
…and each waits a random amount of time before attempting to resend
A Local Area Network (LAN) uses a bus topology.
Describe how Carrier Sense Multiple Access /Collision Detection (CSMA/CD) is used in a bus
Network
• CSMA/CD is a protocol used to detect and prevent collisions in a bus
topology
• before transmitting, a device checks if the channel is busy
• If the channel is busy the device waits // if the channel is free the data is
sent
• because there is more than one computer connected to the same
transmission medium
183 | P a g e
• ... two workstations can start to transmit at the same time, causing a
collision
• If a collision is detected by the device, transmission is aborted / a
jamming signal is transmitted
• both devices wait a (different) random time and then try again
A Local Area Network (LAN) consists of four computers, one server and a switch.
The LAN uses a star topology.
Complete the following diagram to show how the hardware is connected.
all four computers directly connected to the switch and no other connections.
A router is attached to one of the devices on the LAN shown in part (a) to connect the LAN to
the internet.
Identify the device. Give a reason for your choice.
• Device: Server
• Reason: Server processes the requests and authorises traffic // firewall
software on the server authorises traffic // server acts as the proxy
• Device: Switch
• Reason: Switch is connected to all the computers // to share access to
the router on the network
Describe the role and function of the router in the network.
• receive packets from devices / internet
• find destination of packets using the IP address
• forward packets to the destination
• assign private IP addresses to devices on LAN
• store/update/maintain a routing table
• find most efficient path to destination
• maintain table of MAC and IP addresses
184 | P a g e
• provides the LAN with a public IP address
• acts as a gateway
• performs protocol conversion
• acts as a firewall
The network makes use of subnetting.
Describe two benefits of subnetting a network.
Reduce amount of traffic in a network // improve network speed
Data stays in its subnet so it does not travel as far
Improves network security
so that not all devices can access all areas of the network
Allows for easier maintenance
… because only one subnetwork may need taking down/changing while
the rest of the network can continue
A company has a LAN (local area network).
Give two benefits of connecting computers to a LAN
Allows the sharing of files/data // Allows communication between the
devices
Allows the sharing of resources e.g. hardware / software (applications)
Allows central management // by example, backup, security, etc.
Give two characteristics of a LAN.
Covers a small geographical area
The infrastructure is privately owned // not controlled by external
Organisations
One of the company’s offices has one server and four computers connected in a star topology.
Draw a diagram to show the layout of the office’s star topology
185 | P a g e
Computers can be connected using Ethernet.
Describe what is meant by Ethernet
A protocol (suite)
For data transmission over standard / universal wired / cabled network
connections
Uses Carrier Sense Multiple Access / Collision Detection (CSMA/CD)
Data is transmitted in frames
… each frame has a source and destination (IP/MAC) address
and error checking data (so damaged frames can be resent)
The network runs as a thick‑client model.
Describe what is meant by a thick‑client model
The server performs minimal / some processing for the client
The clients also do most of their own processing/work independently //
most of the resources are installed locally
Peripherals are connected to the laptop using ports
A printer is connected to a Universal Serial Bus (USB) port.
Describe how data is transmitted through a USB port.
bit is transferred at a time
Can be synchronous or asynchronous
USB-3 is full duplex and earlier versions are half-duplex
A monitor is connected to the laptop using a different type of port.
Identify one other type of port that can be used to connect the monitor.
186 | P a g e
HDMI
DisplayPort
A school has a Local Area Network (LAN).
The LAN connects to the internet using a router.
Describe the function of a router in a network
• Receives packets from internet / external network
• Implements a firewall
• Analyses the destination IP address of each packet
• Forwards the packet towards its destination // send packets onto local
network or external network
• ...using the routing table
• Maintains / updates the routing
• Allocates private IP addresses
• Finds the most efficient route to the destination
• Changes the packet format for transmission over the next network //
• Network Address Translation (NAT):NAT is a technique used by routers
to allow multiple devices in a private local area network (LAN) to share a
single public IP address
Complete the following table by writing the purpose of each of these other hardware devices
used to support the LAN
Switch: 1 mark for each bullet point (max 1)
• To allow two or more devices to communicate with one another
• To connect individual devices to each other
• To receive transmissions and forward them to their destination
Wireless Access Point (WAP): 1 mark for each bullet point (max 1)
• To allow connection of devices (to the central device) using radio
signals / Wi-Fi
• To allow the central device to send / receive radio signals / Wi-Fi signals
• To allow wireless enabled devices to connect to a wired network
Bridge:1 mark for each bullet point (max 1)
187 | P a g e
• To connect two LANs / segments with the same protocol
• To transmit data between two networks with the same protocol
The students can save their school files on a public cloud.
Identify two drawbacks of the students storing their files on the public cloud
• The students cannot access their files without a reliable internet
connection
• The amount of space for no payment may be limited so students will have
to purchase more space if needed
• The students do not have control over the backup (or security) of their
work // the students are dependent on a third party for the (security and)
backing up of their work
A new classroom is being set up with 20 computers and a switch.
Explain one advantage of implementing a star topology instead of a bus topology in the new
classroom.
188 | P a g e
Explain how data is transmitted between the two laptops in the LAN.
• The data from the sending laptop is transmitted to the router
• The data has address of recipient
• The router determines recipient’s destination address
• ... by using a routing table
• The router transmits data directly / only to recipient
Subnetting can be used to separate a network into logical segments.
Describe two other reasons why subnetting is used in a network.
• To improve the security of the LAN
• … so that devices do not receive unintended data
• … so that a compromised device does not expose the whole network
• ... so not all devices can access all segments
• To make the network management easier
• … because faults can be isolated more efficiently
• ... by appropriate example
• To make the network easier to expand // For better control of network
growth
• … by allowing for greater range of IP addresses to be available
• To improve network performance
• To reduce network congestion
• … by localising network communications // by dividing data between
189 | P a g e
segments
• … so that devices are not flooded with data
• … because data sent between devices on the same subnet stays within
the subnet
State three tasks performed by devices to deal with collisions when using the Carrier Sense
Multiple Access /Collision Detection (CSMA/CD) protocol in a network.
• To monitor the communications channel
• To send data only when there is no data being transmitted / the line is
quiet / idle
• To detect a collision and then stop transmissions of further data //
transmit a jamming signal
• To calculate a random wait time / back-off time
• ... then retransmit the data after that random wait time
• Increase random time if multiple collisions
Describe two disadvantages of storing data on a public cloud compared to storing data
on a server in a Local Area Network (LAN).
• There could be a possible loss of control unlike the LAN
• …because the data is stored on a remote infrastructure / someone else’s
infrastructure
• …reliance on external agency to complete tasks, e.g. backups, security
• Requires reliable internet connection
• …to ensure access to the remote data, more likely with LAN
190 | P a g e
• Increased recurring costs
• ...as cloud provider charges must be paid, costs for LAN once only.
Identify one port that could be used to connect the virtual reality headset to the laptop.
Justify your choice
• USB
• …has fast data transfer speeds for data (to the headset)
• …is a universal/popular cable // universal standard
• HDMI
• …allows video and audio to be transferred (on the same cable)
• …convenience of HDMI as no need for two cables
The video doorbell allows both real-time and on-demand bit streaming
State what is meant by bit streaming.
Continuous ordered flow of bits over a communication path
Give two differences between real-time and on-demand bit streaming.
Real-time is direct from source whereas on-demand is prerecorded/downloaded to view later
Real-time cannot be re-watched, on-demand can be paused, re-watched
etc.
Real-time plays continually, on-demand downloads sections/blocks and
cannot play until next section is downloaded
A bank allows customers to access their accounts using an application that they can download
onto a device such as a smartphone.
The system that allows customers to access their accounts using the application is a
client-server model.
Describe the roles of the different devices in this model.
Identification of server in the bank scenario
Description e.g. Receives requests, processes the requests
Identification of client in bank scenario
Description e.g. Sends request to the server, waits and outputs the
Response
191 | P a g e
A business is creating a local area network (LAN) in its office
The business is deciding which topology to use.
Tick (✓) one or more boxes in each row to identify the topology, or topologies, each statement
describes.
192 | P a g e
centres/ISPs
The exam markers use software that operates as a thin-client to mark the exam papers.
Complete the table by identifying two characteristics of a thin-client.
Describe how each characteristic will be used in this software.
A multimedia design company has an office with a LAN (local area network). The LAN can have
up to 20 devices connected with cables and other devices connected using wireless access.
The company has private cloud storage for its employees to store their work.
Define the term private cloud.
Dedicated/bespoke services/storage on a remote server only available to
Company
Describe the benefits to the company of using private cloud storage instead of public
cloud storage.
Not reliant on a third party
… gives greater control over security/privacy
193 | P a g e
… gives greater control over backup
Storage can be tailored/scalable to company requirements// an example
e.g. the amount of storage accessible/ facilitating the sharing of files
Part of the internal structure of the wired LAN is a star topology.
Explain how packets are transmitted between two devices in a star topology.
Sending computer transmits packets directly to switch/router/central
device
Switch/router/central device checks destination address of packet and
forwards directly to that device
A different part of the network uses the Ethernet protocol
A collision is detected.
Describe how the collision is managed using Carrier Sense Multiple Access/Collision
Detection (CSMA/CD).
Jamming signal is transmitted by the sending device
Transmission is aborted
The sending device waits a random time before trying to send data
again ...
if further collisions occur the wait time is increased
Identify two drawbacks of using CSMA/CD
Random time increased each time so can be infinite waiting
May be constant jamming signal so nothing ever sends
Certain nodes cannot be prioritised
High power consumption
Only suitable for short distance network // limited distance
Not scalable // more nodes means exponentially longer waiting times
A solid state (flash) memory drive is automatically recognised by the computer when it is
plugged into a port in the computer.
Identify an appropriate type of port to connect the solid state memory drive to the
computer.
Explain how this port provides an automatic connection.
194 | P a g e
Port: USB / Universal Serial Bus
Explanation:
• A voltage change occurs when the drive is plugged in
• The computer detects this voltage change
• The code of the device is transferred to computer
• … the OS finds the code of the device in the list of devices
• … and loads the appropriate device driver
The student needs to connect the computer to a monitor that has a screen resolution of
2560 × 1600 pixels. The monitor also has built-in speakers.
The computer has a Video Graphics Array (VGA) port and a High Definition Multimedia
Interface (HDMI) port.
Explain the benefits of connecting the monitor to the computer using the HDMI port instead of
the VGA port
• HDMI has faster transfer rates than VGA
• … needed due to high resolution / large number of pixels of monitor //
HDMI supports the high resolution of the monitor
• HDMI supports video and audio transfer between computer and
monitor speakers
• … so no separate sound cable is needed unlike VGA
• HDMI is digital interface therefore no data is lost in transfer to analogue
and back
• HDMI is less prone to error/crosstalk/external interference
A computer is connected to a Local Area Network (LAN) that connects to a Wide Area Network
(WAN).
Describe the characteristics of a WAN.
• A WAN covers a large geographical area
• External/public infrastructure is used
• Non-dedicated hardware
Copper cable can be used to transmit data in a network.
Complete the table by identifying and describing two other transmission media that can be
195 | P a g e
used to transfer data in the WAN.
• Fibre optic
• Transmits data as pulses of light
• Radio waves / microwaves
• Transmits electromagnetic waves on different frequencies
The computer on the LAN is used for real-time video conferences, where people connected
to the internet communicate in real-time using video and audio.
Explain how bit streaming is used in a real-time video conference.
• Data is compressed before transmitting
• The video and audio are transmitted continuously as a series of bits
• The video is uploaded to a media server
• On download, the media server sends the data to a buffer
• The buffer stores data from server until the receiving device can
process it
• The receiving device receives the bit stream from the buffer
The LAN uses subnetting.
Describe the purpose of subnetting in a network.
• It allows the network to be divided into smaller networks
• … which reduces traffic in some parts of the network // reduces
congestion
• … because traffic only travels through the parts necessary
• … which hides the complexity of network
• … and allows for easier maintenance of the network
196 | P a g e
input of a hard copy image into a computer: scanner
Most computers use Universal Serial Bus (USB) ports to allow the attachment of devices.
Describe two benefits of using USB ports.
• devices automatically detected and configured when first attached/plug and play
• it is nearly impossible to wrongly connect a device
• USB has become an industrial standard
• supported by many operating systems
• USB 3.0 allows full duplex data transfer
• later versions are backwards compatible with earlier USB systems
• allows power to be drawn to charge portable devices
Describe how a laser mouse operates
– laser/light shines onto a surface
– through a (polished) ring at the base
– the light is reflected from the surface through the ring
– sensor detects reflected light
– capturing details/photograph of surface (under the ring)
– at about 1500 times per second
– as the mouse moves the sensor detects changes in the surface detail/photograph
– which are translated into movement (change of x and y co-ordinates)
– the computer/software updates the position of the cursor on the screen
The following table shows a list of five statements which describe the stages when a page is
printed using an inkjet printer.
197 | P a g e
Optical Disc
• Drive motor is used to spin the disc
• Tracking mechanism moves the laser assembly
• A lens focuses the laser onto the disc
• Laser beam is shone onto disc to read / write
• Surface of disc has a reflective metal layer / phase change metal alloy
• Track(s) on the disc have sequence of pits and lands / amorphous and crystalline state
• Reflected light in then encoded as a bit pattern
198 | P a g e
A computer user has a laser printer to print letters and documents. The user also prints digital
photographs taken using a digital camera.
State the most suitable type of printer for printing the photographs
Inkjet printer
The first column of the following table gives features of different types of printer
Two of the components of an inkjet printer are a stepper motor and a print head.
Describe how each component is used when printing a page.
Print head:
199 | P a g e
• The print head contains a large number of very small nozzles
• Ink is fed to each nozzle from a reservoir
• The print head fires droplets of ink onto the paper
• The print head moves horizontally across the paper
Either:
• Tiny resistors create heat inside each nozzle
• The heat vaporises ink to create a bubble
• When the bubble pops the ink is deposited on the page
• The collapsing bubble creates a partial vacuum in the nozzle
• And ink is drawn from the reservoir ready for printing the next dot
Or:
• There is a piezo crystal at the back of the ink reservoir of each nozzle
• The crystal vibrates when it receives a tiny electric charge
• Ink is forced out of the nozzle by the inward vibration
• The outward vibration creates a partial vacuum in the nozzle
• Replacement ink is pulled into the reservoir
Stepper motor
• The (print head) stepper motor is connected to the print head by a belt
• The (print head) stepper motor moves the print head across the paper
• The (parking) stepper motor parks the print head assembly when not
in use
• The (paper feed)stepper motor turns the rollers that provide the paper feed
// The (paper feed)stepper motor moves the paper in small increments
The following sequence of steps (1 to 7) describe how a single page is printed on a laser
printer.
The statements A, B, C and D are used to complete the sequence
200 | P a g e
A computer user has a laser printer to print letters and documents. The user also prints digital
photographs taken using a digital camera.
State the most suitable type of printer for printing the photographs
Inkjet printer
Name three components of a speaker.
• Diaphragm / cone
• (Voice) coil of wire
• Spider / Suspension
• (Permanent) Magnet
• Basket
• Dust cap
• Outer frame
Explain the basic internal operation of a speaker.
• Takes an electric
al signal and translates it into physical vibrations to create
sound waves
201 | P a g e
• An electric current in the coil creates an electro-magnetic field
• Changes in the audio signal causes the direction of the electric current to
change
• The direction of the current determines the polarity of the electro-magnet //
changing the direction of the current changes the direction of the polarity of the
electro-magnet
• The electro-magnet is repelled by or attracted to the permanent magnet
• Causing the coil to vibrate
• The movement of the coil causes the cone / diaphragm to vibrate
• That vibration is transmitted to the air in front of the cone / diaphragm as sound
waves
• The amount of movement will determine the frequency and amplitude of the
sound wave produced
Write in the table, a suitable input device, output device, or both needed for each application.
Do not give a monitor, keyboard or mouse in your answers.
Identify two input devices and one output device used in a games console.
• (Handheld) remote controller
• Joystick / Games pad / joypad
• Accelerometer
• Microphone
• Suitable sensor
202 | P a g e
• Motor/vibrator in joystick
• Speaker
• Screen/monitor /TV
The users interact with the computer system through touchscreens.
Describe the internal operation of a touchscreen.
• Resistive (screen) consists of two charged plates
• Pressure causes the plates to touch
• Completing the circuit
• Point of contact registered
• Coordinates used to calculate the position
• Capacitive (screen) made from materials that store electric charge
• When touched charge transferred to the finger
• Sensors at the (screen) corners detect the change
• Point of contact registered
• Coordinates used to calculate the position
Give one output device, other than a touchscreen, that may be part of this computer
system.
• Speaker
• Headphones
Give two input devices, other than a touchscreen, that may be part of this computer
system. State how each device will be used by the visitors.
• Microphone
• ...visitor says commands / search criteria for the computer to respond to
• Keyboard
• ...visitor types key words to look for
• Mouse
• ...visitor controls cursor to navigate / select
• Trackpad
• ...visitor uses finger to control cursor to navigate / select
203 | P a g e
The student uses a microphone to capture the music.
Explain how the microphone captures the music.
• The microphone has a diaphragm
• The incoming sound waves cause vibrations
• « causing a coil to move past a magnet (dynamic microphone) //
changing the capacitance (condenser microphone)
• An electric current is generated / changed
Describe the internal operation of a microphone
• The microphone has a diaphragm / ribbon (accept equivalent)
• The incoming sound waves cause vibrations (of the diaphragm)
• «causing a coil to move past a magnet (dynamic microphone) //
changing the capacitance (condenser microphone) // deforms the
crystal (crystal microphone) etc.
• An electrical signal is produced
The script for the sound track is printed using a laser printer.
Describe the internal operation of a laser printer.
• The revolving drum is initially given an electrical charge
• A laser beam (bounces off moving mirrors) scans back and forth across
the drum
• ...discharging certain points (i.e. ‘drawing’ the letters and images to be
printed as a pattern of electrical charges)
• The drum is coated with oppositely charged toner (which only sticks to
charged areas)
• The drum rolls over electro-statically charged paper // Electro-statically
charged paper is fed (towards the drum)
• The ‘pattern’ on the drum is transferred to the paper
• The paper is passed through the fuser to seal the image
• The electrical charge is removed from the drum // the excess toner is
Collected
204 | P a g e
Aaron has a mouse and keyboard that he can use as input devices and a monitor as an
output device.
Identify two additional input devices Aaron could use with his desktop computer
• Trackpad/touchpad
• microphone
• touchscreen
• scanner
Identify two additional output devices Aaron could use with his desktop computer
• printer
• speakers
• touchscreen
The tablet computer has input and output devices.
The table lists four devices built into the tablet.
Tick (✓) one or more boxes for each device to identify whether it is an input device, an
output device or both
205 | P a g e
The current in the coil creates an electromagnetic field.
A Changes in the audio signal cause the direction of the electrical current to
change. This determines the polarity of the electromagnet.
D The electromagnet is repelled by, or attracted to the permanent magnet.
The movement of the coil causes the diaphragm to vibrate.
B The vibration creates sound waves.
In a supermarket, a self-checkout machine allows customers to scan the barcodes of products
and
then pay for their shopping. These are an alternative to the traditional cashier-staffed checkout.
206 | P a g e
• LCD screen
The touchscreen uses capacitive technology.
The sequence of steps 1 to 6 describes the internal operation of the touchscreen.
The statements A, B, C and D are used to complete the sequence
1 B «. «.. (The screen has a layer that stores an electrical charge)
2 When the user touches the screen
3 A ««« (Charge is drawn to the point of contact)
4 C ««« (There is a change in the electrostatic field)
5 The coordinates of the point of contact can be calculated
6 D «««. (These coordinates are sent to the touchscreen driver)
Tick (✓) one or more boxes on each row to indicate whether each device is an input device,
an output device, or both.
207 | P a g e
7 The steps 5 to 6 repeat until the layer is complete
8 B (A fan cools the layer)
9 The steps 4 to 8 are repeated for each subsequent layer
Samira is creating an interactive, multimedia presentation for the entrance to her hotel.
The presentation will be on a device that has a resistive touchscreen for user input.
Complete the following paragraph about the basic operation of a resistive touchscreen
The resistive touchscreen has two layers with a gap / an air gap between the
layers. When a finger touches the screen, the top layer moves to touch the
bottom layer; this creates a point of contact.
The horizontal and vertical position of this point is calculated
Complete the following description of the basic internal operation of a laser printer.
The printer uses a laser (beam) and a rotating mirror to draw the contents of the
page on the photosensitive drum as an electrostatic charge. The toner is attracted
to this charge.
208 | P a g e
variation in magnetic field on the disk
• When reading from disk, a variation in magnetic field produces a variation
in current through the head
The car has a resistive touchscreen for the user to select options.
Tick one box in each row to show whether each statement about a resistive touchscreen
is true or false.
State the name of a peripheral device port that provides a physical connection in the computer
for each of these peripherals.
• 3D printer: USB port / COM port
• Monitor: HDMI / VGA / USB / DisplayPort
Describe the principal operations of a 3D printer
Generic mark points:
• Additive manufacturing
• Uses a digital 3D model or a Computer Aided Design (CAD) (file)
• Builds up the model one layer at a time
• ...starting from the bottom
• ...using x, y and z co-ordinates
• The material is fused / cured together layer by layer
Specific mark points:
Fused Deposition Modelling (FDM)
• Material is heated and pushed through nozzle / extruder
Stereolithography (SLA)
209 | P a g e
• Photosensitive liquid resin is exposed to a UV-laser beam
Digital Light Processing (DLP)
• Uses liquid plastic resin melted with arc lamps
Selective Laser Sintering (SLS)
• Uses a laser to form objects from powdered material
Describe how the laser printer makes use of a buffer.
• The print instructions and data are sent by the laptop to a buffer (at laptop
speed)
• The data is transferred from the buffer to the printer (at printer speed)
• …allowing user to continue using the laptop // and allowing processor to
continue processing
• …instead of waiting for relatively slower printer
• When the buffer is empty an interrupt is sent to the laptop
• …requesting more data
A computer game is being designed that users will be able to play using a virtual reality (VR)
headset.
A headset can have one or two (LCD) displays/screens/lenses that output
the image to the user. The headset has speakers that output surround sound
to give a realistic experience.
The user's head movements are detected using a sensor.
This sensor is a gyroscope/accelerometer. The data is transmitted to a
microprocessor that analyses the data to identify the direction/speed of
movement. Some headsets use digital cameras that record the user's eye
movements for analysis
The computer uses a buffer when transmitting data to the VR headset.
Explain how a buffer is used when data is transmitted between the computer and the VR
headset.
The buffer is used as a temporary store for data going to the headset
Data is transferred into the buffer by the computer
Data is retrieved from the buffer by the headset
210 | P a g e
When the buffer is empty/full an interrupt is sent to the computer
requesting more data/stopping further data being sent
When the headset has enough data/needs more data, an interrupt is sent
by the headset to the computer to stop sending data from buffer
The robot includes a touchscreen for the customer to make their payment.
Describe the principal operation of a touchscreen.
Resistive: The space between the conductive layers is removed/the
layers touch and a circuit is completed
Capacitive: The electrical charge changes where the user pressed
The point of contact is identified
from the change in electrical field
The software/microprocessor calculates the coordinates
The computer system is used to store data received from a temperature sensor every five
seconds. The data is stored on an optical disc using an optical disc reader/writer.
Describe the principal operation of an optical disc reader/writer.
• The disc is spun at high speed
• A laser is shone onto the disc to read / write
• … using optical head to move it into position
• … it follows the spiral track from the centre outwards
• When writing the laser burns pits to represent the data
• When reading the laser reflects from pits and lands
• The reflection from a pit and a land is different
• ... the differences are interpreted as 1 or 0
The computer uses a buffer when writing data to the optical disc.
Explain the use of a buffer when writing data to the optical disc
• The computer and optical disc reader/writer send and receive at different
speeds
• A buffer allows temporary storage of the data
• … so that the computer can transfer data to the buffer at the higher speed
• ... and is not held up waiting for data to transfer // so the computer can
211 | P a g e
carry on with other tasks
• ... so the optical disc reader/writer is not overloaded
• … and so that data is transferred to optical disc reader/writer from the
buffer at the slower rate
The instruction is copied from the Memory Data Register (MDR) and 3
placed in the Current Instruction Register (CIR)
212 | P a g e
The instruction is copied from the memory location contained in the 2
Memory Address Register (MAR) and is placed in the Memory Data
Register (MDR)
Name and describe three buses used in the von Neumann model.
address bus
• lines used to transfer address of memory or input/output location
• unidirectional bus
data bus
• used to transfer data between the processor and memory/input and output devices
• bidirectional bus
control bus
• used to transmit control signals
• e.g. read/write/fetch/ …
• dedicated bus since all timing signals are generated according to control signal
The sequence of operations shows, in register transfer notation, the fetch stage of the fetch
execute cycle.
1 MAR ← [PC]
2 PC ← [PC] + 1
3 MDR ← [[MAR]]
4 CIR ← [MDR]
• [register] denotes contents of the specified register or memory location
• step 1 above is read as “the contents of the Program Counter are copied to the Memory
Address Register”
Describe what is happening at step 2.
the program counter is incremented
Describe what is happening at step 3.
the data stored at the address held in MAR is copied into the MDR
Describe what is happening at step 4.
the contents of the Memory Data Register is copied into the Current Instruction Register
Describe what happens to the registers when the following instruction is executed: LDD 35
213 | P a g e
• the MAR is loaded with the operand of the instruction // loaded with 35
• the Accumulator is loaded with the contents of the address held in MAR // the Accumulator is
loaded with the contents of the address 35
Explain what is meant by an interrupt.
• a signal
• from a device/program that it requires attention from the processor
Explain the actions of the processor when an interrupt is detected.
• at a point during the fetch-execute cycle …
• check for interrupt
• if an interrupt flag is set/ bit set in interrupt register
• all contents of registers are saved
• PC loaded with address of interrupt service routine
214 | P a g e
Current Instruction Register – stores the current instruction being executed
Memory Address Register – stores the address of the memory location which is about to be
Accessed
Describe how special purpose registers are used in the fetch stage of the fetch-execute cycle
• The Program Counter (PC) holds the address of the next instruction to be fetched
• The address in the Program Counter (PC) is copied to the Memory Address Register
(MAR)
• The Program Counter (PC) is incremented
• The instruction is copied to the Memory Data Register (MDR)
o …. from the address held in the Memory Address Register (MAR)
• The instruction from the Memory Data Register (MDR) is copied to the Current
Instruction Register (CIR)
complete the description of how the fetch-execute cycle handles an interrupt.
At the end of the cycle for the current instruction the processor checks if there is an interrupt.
If the interrupt flag is set, the register contents are saved, the address of the Interrupt Service
Routine (ISR) is loaded to the Program Counter (PC) and when the ISR completes, the
processor restores the register contents.
Explain why a computer needs an operating system.
• The hardware is unusable without an OS // hides complexity of hardware from user
• Acts as an interface / controls communications between user and hardware /
hardware and software
• Provides software platform / environment on which other programs can be run
Give two key management tasks carried out by an operating system
• Process / task / resource management
• Main memory management
• Peripheral / hardware / device management
• File / secondary storage management
• Security management
• Provision of a software platform / environment on which other programs can be run
– only if not given in part (b)(i)
215 | P a g e
• Interrupt handling
• Provision of a user interface run
Describe what is meant by a DLL file.
• A DLL file is a shared library file
• Code is saved separately from the main .EXE files
• Code is only loaded into main memory when required at run-time
• The DDL file can be made available to several applications (at the same time)
Name three utility programs the company would use on all their computers. Describe what each
program does
• Disk formatter
• Prepares a hard disk to allow data to be stored on it
• Virus checker
• Checks for viruses and then quarantines removes any virus found
• File compression
• Reduces file size by removing redundant details (lossy / lossless)
• Backup software
• Makes copy of files on another medium in case of corruption / loss of data
• Firewall
• Prevents unauthorised access to computer system from external sources
216 | P a g e
1 The application program executes a statement to
read a file.
2G
3 The operating system begins to spin the hard disk, if
it is not currently spinning.
4F
5D
6H
7C
8B
9A
10 E
One management task carried out by an operating system is to provide a user interface.
217 | P a g e
Describe two more of these management tasks.
• Process /resource management
• Scheduling of processes / multi-tasking / multi-programming etc.
• Resolution of conflicts when two or more processes require the same resource
• Main memory management
• Memory protection to ensure that two programs do not try to use the same space
• Use of virtual memory
• Deciding which processes need to be in main memory at any one time
• Location of processes within the memory
• By example, e.g. when process terminates, memory is made available
• Peripheral /hardware / device management
• Installation of appropriate driver software
• Controls access to data being sent to / from hardware / peripherals
• Controls access to hardware / peripherals
• Manages communication between devices /hardware and software
• File / secondary storage management
• Maintains directory structures
• Provides file naming conventions
• Controls access
• Security management
• Makes provision for recovery when data is lost
• Provides usernames and passwords /encryption / user accounts
• Prevents unauthorised access
• Ensures privacy of data
• Provision of a software platform / environment
• On which other programs can be run
• Interrupt handling
• Identifies priorities of interrupts
• Save current memory / process values / saves data on power outage
• Loads appropriate Interrupt Service Routine (ISR)
218 | P a g e
• Any relevant example
Describe two benefits to the programmer of using one or more library routines.
• The code is already written
• (So the programmer is not starting over again) which saves time
• The code will have been used by many people
• So it should be already thoroughly tested //relatively error-free
• The programmer can use, e.g. mathematical /graphics functions, etc. (may not know
how to code)
• Can be sure that the function will perform as it should // simplifies the program.
• The code should conform to industry standards
• And therefore contribute towards a more robust program
Describe two benefits of using DLL files.
• The executable file is smaller/the executable does not contain all the library
routines …
• … DLL files are only loaded into memory when required.
• Changes /improvements /error correction to the DLL file code are done
independently of the main program...
• … So there is no need to recompile the main program
• … All programs using it will benefit
• A single DLL file can be made available to several application programs...
• … Saving space in memory / easing the pressure on memory
State one drawback of using DLL files.
• The executable code is not self-contained …
• … the DLL file(s) needed to be included at run time.
• Appropriate (linking) software must be available at run-time …
• … to link/include/import the DLL files.
• The DLL file must be present …
• … otherwise (unable to find X.dll) errors
• Unexpected changes to the DLL file / corrupted DLL file …
• … could mean the program stops working as expected
219 | P a g e
• Malicious changes to the DLL file …
• … could install a virus on the user’s computer/related files could be corrupted
The operating system (OS) contains code for performing various management tasks.
The hard disk stores a large number of video files. The computer frequently runs out of
storage space.
File compression software
The user is unable to find an important document. He thinks it was deleted in error some
weeks ago. This must not happen again
Backup software
The operating system reports ‘Bad sector’ errors
Disk repair software
There have been some unexplained images and advertisements appearing on the
screen. The user suspects it is malware.
Anti-virus software
She needs to buy an external storage device to store her data files.
List two suitable devices.
• External hard drive // External HDD
220 | P a g e
• External flash drive // External SSD
• Pen drive
Describe one advantage of choosing one of the devices.
Advantage of choosing device 1 / 2 (circle)
One from:
(External) Hard drive
Inexpensive per unit of storage
Larger storage capacity than flash drive
Or:
Pen drive // (External) flash drive
No moving parts / noise
Low latency // fast access times
Robust
Explain why a personal computer (PC) needs an operating system (OS).
• The hardware is unusable without an OS // hides complexity of hardware from user
• Acts as an interface/ controls communications between user and hardware / hardware and
software // or by example
• Provides software platform / environment on which other programs can be run
One of the tasks carried out by the OS is the management of the use of the processor.
Name and describe two other management tasks that the OS performs.
Controls communications between user and hardware// or by example
• Main memory management
Memory protection to ensure that two programs do not try to use the same space // Use of
virtual memory // Location of processes within the memory // By
example
• File / Secondary storage management
Maintains directory structures // Provides file naming conventions // Controls
access
• Peripheral / hardware / device / Input-Output management
Installation of appropriate driver software // Controls access to data being sent
to/from hardware/peripherals // Controls access to hardware/peripherals //
221 | P a g e
manages communication between devices.
• Interrupt handling
Identifies priorities of interrupts // Saves data on power outage // Loads
appropriate Interrupt Service Routine (ISR) // By example
• Security management
Makes provision for recovery when data is lost // Provides usernames and
passwords // Prevents unauthorised access // Ensures privacy of data
The user wants to send a large file as an attachment to an email. The user knows that
the recipient’s Internet Service Provider (ISP) has a limit of 2MB for file attachments.
File compression software
The user is writing a book and is worried that the document files could get damaged or
deleted.
Backup software
The computer has recently been slow to load large files. The user has deleted a large
number of small files to try to solve the problem. A friend has advised that there is a
procedure which should be regularly carried out to reorganise file storage on the hard
disk
Disk defragmenting software
The user clicked on an attachment in an unsolicited email. Since then, the computer has
shown some unexplained behaviours.
Anti-virus software
The operating system (OS) contains code for performing various management tasks.
The appropriate code is run when the user performs various actions.
222 | P a g e
The hard disk stores a large number of video files. The computer frequently runs out of
storage space.
File compression software
The user is unable to find an important document. He thinks it was deleted in error some
weeks ago. This must not happen again.
Backup software
The operating system reports ‘Bad sector’ errors
Disk repair software
There have been some unexplained images and advertisements appearing on the
screen. The user suspects it is malware.
Anti-virus software
223 | P a g e
A – System clock
B – Control unit
C – Main memory
E – Control bus
F – Data bus
State and describe three other operating system management tasks.
Process / Task Management
• Allocation of processor time
• Scheduling of processes or tasks / multi-tasking / multi-programming etc.
• By example – e.g. round-robin, shortest remaining time first etc.
224 | P a g e
• Resolution of conflict when two or more processes require the same resource
Secondary Storage management
• Storage space divided into file allocation units
• Space allocated to particular files
• OS maintains a file directory and FAT
• Provides file naming conventions
• Controls access.
Peripheral / Hardware / Device / Input/output Management
• Installation of appropriate driver software
• Controls access to data being sent to/from hardware/peripherals
• Controls access to hardware/peripherals
• Manages communication between devices / hardware and software
Provision of a User interface
• Allows user interaction with the computer system// Facilitates human computer
communication
• Hides the complexity of the hardware from the user
• Or by example – e.g. GUI, command line etc.
Interrupt Handling
• Halts the execution of the current process
• Stores the values of the current process on the stack
• Loads and executes the appropriate ISR code
• Use of priorities for handling simultaneous interrupts
• Saves data on power outage
Security Management
• Makes provision for recovery when data is lost
• Provides usernames and passwords / encryption / user accounts
• Prevents unauthorised access
• Ensures privacy of data
Provision of a software platform / environment
• On which other programs / applications can be run
225 | P a g e
A – General purpose registers
B – System clock
C – ALU
E – Control bus
F – Address bus
Clock speed is a factor that affects the performance of a PC. Explain this statement.
• The clock sends out a number of pulses in a given time interval (clock speed)
• Each processor instruction takes a certain number of clock cycles to execute
• The higher the clock frequency, the shorter the execution time for the instruction
// Increasing the clock frequency improves performance
State three memory management tasks the OS performs.
• Allocates / deallocates RAM to programs/tasks/processes
226 | P a g e
• Keeps track of allocated and free memory locations
• Swaps data to and from the hard drive
• Handles virtual memory
• Paging // segmentation
• Memory protection, preventing a process accessing memory not
allocated to it
State three security management tasks the OS performs.
• Sets up user accounts
• Checks usernames, passwords // Authentication
• Implements access rights
• Automatic backup
• System restore / roll back (to previous stable state)
State two tasks, other than memory management and security management that are
carried out by an OS
• Device / peripheral management
• File management
• Process management
• Input / output management
• Error detection / recovery
• Provides a user interface
• Facilitates communication between hardware and software / hardware
Devices
Utility software is usually pre-installed on a new computer.
The following table lists four programs. Put one tick (✓) in each row to indicate whether or not
the program is utility software
227 | P a g e
Explain what is meant by the term register.
• Small piece / word of (fast) memory
• Part of the processor
• Temporary storage of data
• Data is about to be / has been processed
Explain the purpose of the Memory Data Register (MDR).
• Stores / holds data / instruction when fetched from memory
• Stores / holds data which is being written to memory
• The location accessed is the address held in the Memory Address
Register (MAR)
Name two registers, other than the MDR, that are used in the fetch-execute cycle.
• Current Instruction Register (CIR)
• Memory Address Register (MAR)
• Program Counter (PC)
• Accumulator (ACC)
• Index Register (IX)
• Status Register
• Interrupt Register
State three file management tasks the OS performs
• Storage space divided into file allocation units
• Space allocated to particular files
• Maintains/creates directory structures
• Specifies the logical method of file storage (e.g. FAT or NTFS)
• Provides file naming conventions
228 | P a g e
• Controls access // implements access rights // implements password
protection // Makes file sharing possible
• Specifies tasks that can be performed on a file (e.g. open, close,
delete, copy, create, move etc.)
State three printer management tasks the OS performs.
Installs printer driver
• Sends data to the printer / buffer to print // sends documents to the
print queue
• Sends commands to printer
• Receives and handles (error) messages/signals/interrupts from the
Printer
The following table lists four programs. Put one tick (3) in each row to indicate whether
or not the program is utility software.
Describe the role of the Arithmetic and Logic Unit (ALU) and Control Unit (CU) in the Von
229 | P a g e
Neumann model.
• ALU performs arithmetic operations
• And logical operations / comparisons
• Control Unit sends / receives signals
• Synchronises operations
• to control operations // execution of instructions
• Accept by example e.g. Input output // flow of data
Describe the role of the Status Register and Program Counter (PC)
• Status Register is interpreted as independent bits / flags
• Each flag is set depending on an event
• An example: addition overflow / result of operation is zero etc.
• Program Counter stores the address
• of the next instruction to be fetched
A student has written the steps of the fetch stage of the fetch-execute (FE) cycle in register
transfer
notation. The student has made some errors.
Line 1 MDR <- [PC]
Line 2 PC <- PC + 1
Line 3 MDR <- [MAR]
Line 4 CIR <- PC
Identify the line numbers of three errors that the student has made. Write the correct notation
for each error
230 | P a g e
Give three different events that can generate an interrupt
• Hardware fault // Example of hardware fault
• I/O request // Example of I/O request
• Program/software error // Example of software error
• End of a time-slice
Explain how interrupts are handled during the fetch-execute cycle.
• At the end of each fetch–execute cycle the processor checks for
interrupt(s)
• Check if an interrupt flag is set // Check if bit set in interrupt register
• Processor identifies source of interrupt
• Processor checks priority of interrupt
• If interrupt priority is high enough // Lower priority interrupts are disabled
• Processor saves current contents of registers
• Processor calls interrupt handler / Interrupt Service Routine (ISR)
• Address of ISR is loaded into Program Counter (PC)
• When servicing of interrupt complete, processor restores registers
• Lower priority interrupts are re-enabled
• Processor continues with next F–E cycle
The processor uses buses in the FE cycle.
The diagram shows three buses and two descriptions.
Draw one line from each bus to its appropriate description
231 | P a g e
Describe what is meant by a library routine.
• Pre-existing / pre-compiled / pre-written modules / code «
• « can be linked into her program (without amendment)
• To perform common / complex tasks
232 | P a g e
• Simplifies the program
• « since just the name of the function included in the source code
Drawback:
• Compatibility issues
• « may not work with the other code/may require changing program for
it to work
• Not guaranteed thorough testing
• « may be unknown or unexpected bugs / virus
• Library routine may not meet exact needs
• « may give unexpected results // « may need editing
• If library routine is changed
• « there may be unexpected results / errors
MAR ← [PC]
PC ← PC + 1
MDR ← [ [MAR] ]
CIR ← [MDR]
The third instruction [ [MAR] ] has double brackets.
State the purpose of the double brackets.
• The contents of the MAR is an address, it is the contents of that address
which is transferred to MDR
• The contents of the address pointed to by the MAR is transferred to the
233 | P a g e
MDR
234 | P a g e
• The programmer can use e.g. mathematical / graphics functions etc.
that he may not know how to code
• Use of named library functions can simplify the program and make it
easier to read
• The library routine code should conform to industry standards and
therefore contribute towards a more robust program
235 | P a g e
Identify three other examples of utility software that can be installed on the computer.
• Backup software
• File compression
• Virus checker
• Disk contents analysis / repair
Give one example of a hardware interrupt and one example of a software interrupt
Hardware interrupt
• Printer out of paper
• No CD in drive
Software interrupt
• A running program needs input
• Runtime error, e.g. division by zero
236 | P a g e
• Processor identifies source of interrupt
• Processor checks priority of interrupt
• If interrupt priority is high enough // Lower priority interrupts are
disabled
• Processor saves current contents of registers // saves current job
on stack
• Processor calls interrupt handler / Interrupt Service Routine (ISR)
• Address of ISR is loaded into Program Counter (PC)
• When servicing of interrupt complete, processor restores
registers // job from stack is restored
• Lower priority interrupts are re-enabled
• Processor continues with next F–E cycle
The diagram has registers used in Von Neumann architecture on the left and descriptions on
the right.
Draw one line to match each register with its correct description.
237 | P a g e
Many components of the computer system transfer data between them using buses. One
example of a bus is an address bus.
Name two other buses that exist within a computer and give the purpose of each.
• Data bus
• Carries data between the processor and memory / carries data that is
currently being processed.
• Control bus
• Transmits signals between the control unit and the other components
State the benefit of increasing the address bus width from 16 bits to 32 bits.
Significant increase in the number of directly addressed memory locations //
increases the number of directly addressable memory locations from 2^16 to2^32
Aaron’s computer has an operating system (OS). The OS manages the running processes
and provides a user interface.
Describe these OS management tasks
238 | P a g e
Process management:
• Manages the scheduling of processes
• « allows multi-tasking / multi-processing
• « ensures fair access
• « handles priorities
• Manages the resources the processes need
• Enables processes to share information
• Prevents interference between processes// resolution of conflicts
Provision of a user interface:
• Allows a user to communicate with the hardware // vice-versa
• « by making navigation around the system easier
• Provides facility for user inputting data
• Provides facility for outputting to the user
• By example e.g. command line / GUI / menu-driven
Aaron’s computer has a virus checker and backup software.
Describe these utility programs.
Virus checker:
• Scans files stored on a computer system for malicious code
• Scans files when they enter the system / memory stick inserted /
download etc.
• Sets up a schedule for virus-checking
• Isolates / quarantines / deletes viruses
• Regularly updates the virus definitions
Backup software:
• Creates a copy of the contents of a disk / partition. Can be set up to
automatically backup // schedules backups
• Allows the user to decide what is backed up, e.g. all data // all files that
have changed since the last backup
• Allows the user to set up an off-site backup
• May encrypt the backup files
239 | P a g e
• Restores the data if necessary
The diagram shows different types of software on the left, and descriptions on the right.
Draw a line from each type of software to its correct description
240 | P a g e
• Manages the scheduling of processes
• « allows multi-tasking / multi-processing
• « ensures fair access
• « handles priorities
• Manages which resources the processes require
• Enables processes to share information
• Prevents interference between processes // resolution of conflicts
Memory Management
• Allocates memory to processes
• Ensures fair usage of memory
• Organises memory / by example
• Makes use of virtual memory
• Keep processes separate
• To release memory when a process stops
The ACC is a general purpose register. The IX is a special purpose register.
Identify two other special purpose registers used in the fetch-execute cycle and describe
their role in the cycle.
• Program counter // PC
• Stores the address of the next instruction to be fetched
• Memory address register // MAR
• Stores the address where data/instruction is to be read from or saved to
• Memory data register // MDR
• Stores data that is about to be written to memory // Stores data that has
just been read from memory
• Current instruction register // CIR
• Stores the instruction that is currently being decoded/executed
Bart plays computer games on his stand-alone games console.
The games console has an operating system.
Describe the tasks performed by the operating system to manage the main memory in the
games console.
241 | P a g e
• Reads/writes data to/from RAM
• … e.g. current data/instructions from a game so the CPU can access it
• Allocates virtual memory
• … when there is insufficient RAM to run a program/game
• Allocates RAM to optimise performance
• Paging
• Segmentation
Utility programs are examples of system software
Complete the table by writing the name of the utility program for each description.
Amir’s computer has system software, including utility software and an operating system.
Explain how the disk formatter, disk contents analysis and disk repair utilities work
together.
• Disk contents analysis checks for errors/problems with the disk
• Disk repair attempts to fix the errors
• The disk formatter prepares the disk for (initial) use (again).
Amir’s computer has several peripheral devices connected to it.
State three peripheral management tasks performed by the operating system
• Installation of device driver software
• Managing interrupts / signals from the device
• Sending control signals to the device
• Control of buffers
• Management of queues
242 | P a g e
Annchi is writing a computer game with a group of friends.
One of her friends has suggested using Dynamic Link Library (DLL) files to help them develop
the game
Give three reasons why Annchi and her friends should use DLL files when developing
the game.
• DDL file is only loaded into memory when required
• ... so the executable file for the game is smaller
• Changes/improvements in the DLL file are independent of the main program
• ... the game program will not need to be recompiled
• ... the game program will get the benefit of the updates automatically
• The same DDL file can be used in several game programs (at the same time)
• (DLL) routines are pre-written saving the developers time
• (DLL) routines are pre-tested so should be reliable
• Developers can take advantage of other programmers’ expertise
Give two reasons why Annchi and her friends should not use DLL files when developing
the game.
• Game will not work if DDL is corrupted
• An external change to the DDL could stop the game working or change the way
it works
• The DDL file must be present at run-time otherwise there is an error
Complete the following statements about CPU architecture by filling in the missing terms
The Von Neumann model uses the stored program concept.
The program is a series of instructions that are saved in memory.
The processor fetches each instruction, decodes it and then executes it.
The processor uses several registers to store the data and instructions from
the program because they can be accessed faster than main memory.
Identify the most appropriate utility program to use for each of the following tasks.
243 | P a g e
The fetch-execute cycle is used when a computer processor runs a program.
Complete the table by writing the register transfer notation for each of the descriptions.
Write one of the letters A, B, C or D (from the table above) on each row (1 to 4), to show
the correct order of the fetch-execute cycle
1 mark for B, A, C in order
244 | P a g e
1 mark for D at any point after B
Buses are used to transfer data between various components of the computer system.
Tick (✓) one or more boxes on each row to identify the bus(es) each statement describes
The following diagram shows four register notations and seven descriptions.
Draw one line from each register notation to its most appropriate description
245 | P a g e
Sam is a photographer. She has an image library of over 10 000 images. She stores the
images
on a high capacity magnetic hard disk.
Explain why Sam would use the following utility software
Backup
• The images on the hard disk can be lost or corrupted
246 | P a g e
• To make a copy of her files (which can be stored elsewhere)
• So that the images can be restored
Defragmenter
• Frequent changes to the images mean the data for each file is split
across the disk
• To rearrange the (fragmented) files into contiguous locations // to bring
all the empty space together
• To improve the time it takes to access and load the files
Disk repair
• Areas of the disk can become corrupt
• To identify/mark the errors/bad sectors
• ...so they can be repaired // so bad sectors are no longer used
Complete the following sentences that describe parts of a processor in a Von Neumann
model for a computer system.
There are three buses that transfer data between components in a computer
system.
The width of the address bus determines the number of directly accessible
memory locations.
The control unit sends signals on the control bus to direct the operation of
system components.
Clock pulses are used to synchronise the components on the motherboard.
Describe the stages of the fetch-execute (F-E) cycle
• The address in the program counter is the address of next item to be
fetched
• The address is copied into MAR ...
• …using the address bus
• The instruction from that address moved/copied from main memory to
MDR ...
• …using the data bus
247 | P a g e
• The instruction is transferred from MDR to CIR
• The processor’s instruction set is used to decode the instruction// the
instruction is decoded in the CIR
• …into op code and operand
• The processor executes the instruction // the processor processes the
data as required
• The address in PC is incremented ready for next loop
A computer has an operating system (OS)
State three memory management tasks performed by the OS.
• Prevents two processes occupying the same memory space
• Organises memory e.g. paging/segmentation
• Makes uses of virtual memory
• Keeps track of allocated and free memory locations
• Allocates memory to processes
• Ensures fair use of memory
• Releases memory when a process stops
Installs drivers
• Sends/receives data from a buffer // buffer management //
• Sends commands to the device
• Receives/handles messages/signals/interrupts from the device
• Control of hardware usage by processes
• Device detection
• Power management
• Keep track of device status (free or busy)
Utility programs are also provided with the OS.
Identify and describe two different utility programs
• Virus/Malware checker
• …scans disk for viruses and reports, quarantines or deletes them
248 | P a g e
• File compression
• …reduces the size of a file
• Back up
• …creates a copy of data in case of loss, so that the images can be
restored
• Defragmenter
• …finds files that are not stored in contiguous blocks and moves them
together
• Disk formatter
• …creates a logical drive on a hard drive // reformats a previously used
hard drive // creates logical partitions // prepares a disk for first use
• Disk repair/Disk contents analysis
• …attempts to recover damaged files // checks disk for space and usage //
to identify/mark the errors / bad sectors
Some operating systems include library programs.
State three benefits to a programmer of using library programs
• Already tested
• Should be relatively free from errors // more robust
• Used by many others
• Make use of another programmer’s knowledge
• Precompiled
• Saves (programming/testing) time
The following are four special purpose registers used in the processor:
• Program Counter (PC)
• Memory Data Register (MDR)
• Memory Address Register (MAR)
• Current Instruction Register (CIR)
Describe the purpose of any three registers from the four given.
Program Counter
• Points to the address ...
249 | P a g e
• ... of the next instruction to be fetched
• So the address can be transferred to/from the MAR
Memory Address Register
• Points to the address where data to be fetched/stored is located
• So data can be transferred to/from the MDR
Memory Data Register
• Holds the data received from/ transmitted to memory
• So data can be received from/transmitted to the CIR
Current Instruction Register
• Holds the data received from the MDR
• CIR stores the current instruction being processed
Jackie is writing a program in a high-level language (HLL). The program makes use of Dynamic
Link Library (DLL) files.
Complete the following sentences about DLL files by writing the missing words from the list
given below.
250 | P a g e
• Finds files that are split across the disk
• …and moves the blocks that make up each file to be contiguous
• Collates free space
The sequence of operations shows, in register transfer notation, the fetch stage of the
fetch-execute cycle.
1 MAR ← [PC]
2 PC ← [PC] + 1
3 MDR ← [[MAR]]
4 CIR ← [MDR]
Write a description of each of the three register transfer notations given in the following table
.
Bingwen’s computer comes with an Operating System and utility software
Draw one line from each utility software to its correct description.
251 | P a g e
Identify four key management tasks that the Operating System will perform.
• memory management
• file management
• security management
• hardware / device / peripheral / resources management
• input/output management
• process management
252 | P a g e
• error checking and recovery
• provision of a platform for software
• provision of a user interface
A processor has one general purpose register, the Accumulator (ACC), and several special
purpose registers.
Complete the following description of the role of the registers in the fetch-execute cycle by
writing the missing registers.
The Program Counter holds the address of the next instruction to be loaded.
This address is sent to the Memory Address Register.
The Memory Data Register holds the data fetched from this address. This
data is sent to the Current Instruction Register and the Control Unit
decodes the instruction’s opcode.
The Program Counter is incremented.
Describe the actions performed by a hard disk formatter and a hard disk defragmenter.
hard disk formatter
• Makes existing data inaccessible
• Partitions the disk into logical drives
• Sets up the (specified) file system
• Prepares the disk for initial use
• May check for errors on the disk
hard disk defragmenter
• Re-organises the disk contents
• Moves split files so they are contiguous
• Creates a larger area of (contiguous) free space
Seth uses a computer for work.
Complete the following descriptions of internal components of a computer by writing the
missing terms.
The control unit/bus transmits the signals to coordinate events based on the
pulses of the (system) clock.
The data bus carries data to components, while the address bus carries the
253 | P a g e
address where data is being written to or read from.
The arithmetic logic unit/ALU performs mathematical operations and logical
comparisons.
Describe the ways in which the following factors can affect the performance of his laptop
Computer
Number of cores:
• Each core processes one instruction per clock pulse
• More/multiple cores mean that sequences of instructions can be split
between them
• … and so more than one instruction is executed per clock pulse // more
sequences of instructions can be run at the same time
• More cores decreases the time taken to complete task
Clock speed:
• Each instruction is executed on a clock pulse // one F-E cycle is run on
each clock pulse
• ... so the clock speed dictates the number of instructions that can be run
per second
• The faster the clock speed the more instructions can be run per second
Jennifer is writing a computer program for her A Level homework.
Jennifer uses a program library to help her write her computer program.
Describe how a program library can be used while writing a computer program
• Program libraries store pre-written functions and routines
• The program library can be referenced/imported
• the functions/routines can be called in her own program
There are two errors in the following register transfer notation for the fetch‑execute cycle.
254 | P a g e
Complete the following table by:
• identifying the line number of each error
• describing the error
• writing the correct statement.
The following are four special purpose registers used in the processor:
• Program Counter (PC)
• Memory Data Register (MDR)
• Memory Address Register (MAR)
• Current Instruction Register (CIR)
Describe the purpose of any three registers from the four given.
Program Counter
• Points to the address ...
• ... of the next instruction to be fetched
• So the address can be transferred to/from the MAR
255 | P a g e
Memory Address Register
• Points to the address where data to be fetched/stored is located
• So data can be transferred to/from the MDR
Memory Data Register
• Holds the data received from/ transmitted to memory
• So data can be received from/transmitted to the CIR
Current Instruction Register
• Holds the data received from the MDR
• CIR stores the current instruction being processed
Jackie is writing a program in a high-level language (HLL). The program makes use of Dynamic
Link Library (DLL) files.
Complete the following sentences about DLL files by writing the missing words from the list
given below
256 | P a g e
• Collates free space
The sequence of operations shows, in register transfer notation, the fetch stage of the
fetch-execute cycle.
Write a description of each of the three register transfer notations given in the following table.
257 | P a g e
The Memory Address Register (MAR) holds the address to fetch the data
(from the PC)
The Memory Data Register (MDR) holds the data at the address in MAR
The instruction is transferred to Current Instruction Register (CIR) for
decoding and execution
Describe when interrupts are detected in the F-E cycle and how the interrupts are
Handled
detection
At the start/end of a FE cycle
Handling
Priority is checked
If lower priority than current process continue with F-E cycle
If higher priority than current process …
… state of current process is / registers are stored on stack
Location / type of interrupt identified...
…appropriate ISR is called to handle the interrupt
When ISR finished, check for further interrupts (of high priority) / return to
step 1
Otherwise load data from stack and continue with process
Identify one factor that can affect the performance of the computer system and state how it
impacts the performance
Clock speed…
…higher clock speed means more FE cycles per second
Number of cores…
…means more instructions can be carried out simultaneously
Bus width …
…allows the transfer of more data each time // allows more memory
locations to be directly accessed
Cache …
… the higher capacity the more frequently used instructions it can store
258 | P a g e
for fast access
State what is meant by the stored program concept in the Von Neumann model of a
computer system.
Instructions and data are stored in the same memory space / in main
memory.
A Central Processing Unit (CPU) contains several special purpose registers and other
components.
State the role of the following registers.
Program Counter (PC):
• to store the address / location / memory location of the next instruction to
be fetched
Index Register (IX):
• to store a value that is added to an address to give another address
Status Register (SR):
• to store flags which are set by events // from the results of arithmetic and
logic operations and interrupt flags
Tick one box in each row to identify the system bus used by each CPU component.
259 | P a g e
• ... seeking the attention of the processor
Identify two causes of a software interrupt.
For example:
• division by zero // runtime error in a program
• attempt to access an invalid memory location
• array index out of bounds
• stack overflow
State two benefits to a programmer of using Dynamic Link Library (DLL) files.
• (main) memory requirements for program are reduced as dynamic link
library is loaded only once / when required
• the executable file size is smaller because the executable does not
contain all the library routines
• maintenance not needed to be done by the programmer because the DLL
is separate from program
• no need to recompile the main program when changes are made to DLL
because changes / improvements/ error correction to the DLL file code
are done independently of the main program
Memory management is one of the tasks performed by an Operating System (OS).
Describe the ways in which memory management organises and allocates Random Access
Memory (RAM).
• RAM is assigned into blocks
• dynamic allocation of RAM to programs / processes
• reclaims unused blocks of RAM
• prevents two programs / processes occupying the same area of RAM at
the same time
• moves data from secondary storage when needed // manages paging,
segmentation and virtual memory
An Operating System may include a utility program to compress text files.
Describe one appropriate method of compressing a text file.
lossless compression
260 | P a g e
• Run Length Encoding
• repeated sequences of characters are replaced by
• ... a single copy of the character
• ... and a counter of the number of characters
Explain the reasons why increasing the amount of cache memory can improve the
performance of a CPU.
• cache is fast access memory (close to the CPU)
• cache stores frequently used instructions / data
• ... more cache means more instructions / data can be transferred faster
• ... less swapping between RAM and cache
• prevents the CPU idling while waiting for data
Draw one line from each utility software to its most appropriate purpose
261 | P a g e
Write the register transfer notation for each of the stages in the fetch-execute cycle described
in the table.
262 | P a g e
… to allow communication between peripherals and computer
Sends data and receives data to and from peripherals
… such as to an output device and from an input device/by example
Handles buffers for transfer of data
… to ensure smooth transfer between devices that transmit and receive
at different speeds
Manages interrupts / signals from the device
Hardware management is one key management task carried out by the Operating System.
Identify two other key management tasks carried out by the Operating System
Memory management
File management
Security management
Process management
Error checking and recovery
The Operating System has utility software including defragmentation software.
Explain how defragmentation can improve the performance of the computer
Rearranges blocks of individual files (on the HDD) so they are
contiguous // moves the free space together
Accessing each file is faster
…because there is no need to search for the next fragment / block of
the file
…so less head movement is needed
An interrupt is generated when a key is pressed on a computer keyboard.
Explain how the computer handles this interrupt.
An interrupt flag is raised in the (interrupt) register
At the end of the current FE cycle // at the start of the next FE cycle
The system checks the interrupt register for higher priority interrupts
than current process
If true, it stores the current contents of the registers on the stack
The appropriate interrupt service routine (ISR) for the key press is
263 | P a g e
called
The input data from the keyboard is processed
The contents of the registers are restored from the stack
and control is passed back to previous process
A student has purchased a new laptop.
The laptop is designed using the Von Neumann model for a computer system.
Identify two types of signal that a control bus can transfer.
Interrupt
Timing
Read
Write
Describe two ways the hardware of a laptop can be upgraded to improve the performance
and explain how each upgrade improves the performance.
264 | P a g e
Manages which resources the processes require
… such as allocating memory
Enables processes to share data
Prevents interference between processes // resolution of conflicts
Handles the process queue
It allows multi-tasking / multi-processing
by ensuring fair access, handling priorities and handling interrupts
Describe the purpose of utility software in a computer.
To help users to set-up / configure / analyse / optimise / maintain the
computer ...
by for example, making memory allocation more efficient
by for example, checking the system for faults
A software developer is working in a team writing a program for a client.
The developer is writing a new program library to be used by the other team members.
Define the term program library.
Set of pre-written / pre-compiled / pre-tested subroutines
which can be called in other programs
by installing/importing the library
Explain two benefits to the developer of choosing to create a Dynamic Link Library (DLL).
(main) memory requirements for program is reduced
as dynamic link library is loaded only once / when required
the executable file size of the program using the DLL will be smaller
because the executable does not contain (all) the library routines
maintenance not needed to be done by the programmer
because the DLL is separate from program
no need to recompile the main program when changes are made to DLL
because changes / improvements/ error correction to the DLL file code
are done independently of the main program
A single DLL file can be made available to several application programs
Saving space in memory / easing the pressure on memory
265 | P a g e
The Central Processing Unit (CPU) of the basic Von Neumann model for a computer system
contains several special purpose registers.
The Memory Data Register (MDR), Index Register (IX) and the Accumulator (ACC) are
examples of special purpose registers.
Identify two other special purpose registers and state their role in the CPU
• Program Counter (PC)
• stores the address where the next instruction is to be read from
• Memory Address Register (MAR)
• stores the address of the memory location (or an I/O component)
currently being read from or written to
• Current Instruction Register (CIR)
• holds the instruction currently being decoded and/or executed
• Status Register
• Contains bits which can be referenced individually and set or cleared
depending on the operation e.g. overflow, underflow
Describe what is meant by the Immediate Access Store (IAS) in a computer system.
• Immediate Access Store holds all the data / instructions / programs
currently in use
• Immediate Access Store is volatile memory
• Immediate Access Store has fast access times
A computer has a single 2.1GHz CPU.
Describe how increasing the clock speed to 4GHz can increase the performance of the
computer.
• The CPU can now perform nearly twice as many F-E cycles per second
• Instead of 2.1 billion F-E cycles per second, the CPU can now perform 4
billion FE cycles per second
A second computer has a CPU with two 2.1GHz cores.
Explain why the second computer does not always run twice as fast as the computer
with one 2.1GHz CPU.
• Multiple cores introduce additional overheads
266 | P a g e
• …because of the need for communication between cores
• Software may not be designed for multiple cores…
• …so one of the cores will be left idle
• Memory access speed may not match speed of cores…
• …so causing delay
• The two computers may have more differences than just the cores
• …one may have more RAM which allows faster multitasking
• ...one may have a GPU
• ...etc.
A computer has an Operating System (OS)
State one purpose of the Operating System.
• To hide the complexities of the hardware from the user
• To provide a platform for software to run
• To provide a user interface
267 | P a g e
• ... which saves storage and memory space // by example
• ... and reduces transmission time // by example
• Disk formatter
• … to prepare a disk for use // set up the file system
• ... to partition the disc
• ... to delete all the data from the disc
An optical disc reader/writer is connected to the computer
Give the name of one port that can provide a connection for the optical disc reader/writer
• USB / Universal Serial Bus
• HDMI
Describe the roles of the address bus, the data bus and buffers in the process of writing
data to the optical disc reader/writer
Buffers
• A buffer temporarily holds data until it is ready to be transmitted to the
device
Address Bus
• The address of the data to be written to the device (in RAM) is carried
on the address bus
Data Bus
• All data to be written to the device / buffer is carried on the data bus
The program is distributed by downloading the source code and its library files from a web
Server
Explain the reasons for compressing the files
• To reduce the time it takes to download the program files from the web
server // to upload them to the server in the first place
• To reduce the amount of storage space used on the web server // user’s
Device
The program files are stored on a new hard disk after they have been downloaded.
Describe the reasons why a hard disk formatter is needed for the new hard disk
268 | P a g e
• Disk needs to be prepared for initial use
• Disk needs to be checked for errors
• A new file system needs to be generated on the disk
• The file allocation table needs to be set up
A computer system is designed using the basic Von Neumann model.
Registers and buses are components in the Von Neumann model.
Identify three other components in the Von Neumann model of a computer system.
Do not include registers or buses in your answers
• Control unit (CU)
• Arithmetic and Logic Unit (ALU)
• Immediate Access Store (IAS)
• (System clock)
Identify two differences between special purpose registers and general purpose
registers.
• Special purpose registers hold the status of a program whereas general
purpose registers hold the temporary data while performing operations.
• Special purpose registers are specialised for a specific use, whereas
general purpose registers are used for any purpose.
• General purpose registers can be used by most instructions, whereas
special purpose can only be used by certain instruction
The following incomplete table contains steps of the Fetch‑Execute (F‑E) cycle and their
descriptions.
Complete the table by writing the missing steps using register transfer notation and the
missing descriptions.
269 | P a g e
Interrupts can be caused by software programs or hardware devices.
State one cause of a software interrupt.
Examples:
• Division by zero
• Runtime error
• Out of memory bounds
• Program requesting an external device / input
• Buffer overflow
The following statements describe the stages that the CPU performs when an interrupt is
detected.
There are three missing statements.
Write the letter of the missing statements from the table in the correct place to complete the
Description
270 | P a g e
D
A
B
A computer has an Operating System (OS).
Memory management and process management are two OS tasks.
Explain how memory management and process management support multi-tasking
Memory management: Max 3 marks
Stores data from all currently running programs concurrently in RAM
Stops the data from overwriting each other in RAM/primary storage
Decides which processes should be in main memory
Makes efficient use of memory
271 | P a g e
Process management: Max 3 marks
Allows one process to be paused whilst another process can be actioned
Decides which process is to be run next
Switches between processes to allow them to share the use of the
processor
Identification/description of scheduling
Program libraries were used when writing the robot’s software.
State what is meant by a program library.
Pre-written code/functions/routines that can be imported/called in another
Program
Some program libraries include Dynamic Link Library (DLL) files.
Describe the benefits of a programmer using a library with DLL files instead of using a
library that does not include DLL files.
Maintenance not needed to be done by the programmer
because the DLL is separate from program
The calling program does not need recompilation by the programmer when
a DLL file changes
because the DLL file can be updated independently of the calling
program
… updates will apply to all programs that use the DLL file
A computer system has a dual-core Central Processing Unit (CPU).
State the purpose of the system clock and the Control Unit (CU) in a CPU.
System clock
• To synchronise operations
• ... by creating and transmitting timing signals on the control bus
Control Unit
• Sends/receives control signals along control bus
• Reads an instruction from the contents of the memory location whose
address is stored in PC
• Coordinates/synchronises the activity of other components in the CPU
272 | P a g e
• Manages the execution of instructions
• Controls communication between the components in the CPU
The number of cores in the processor affects the performance of the computer system.
Identify one other feature of a processor that can affect the performance of a computer
system and state why it affects the performance
Feature: clock speed
• Higher clock speed means that more F-E cycles are executed per second
// Higher clock speed results in more throughput
Feature: bus width
• Larger bus width means that more data transferred at the same time
A student uses a laptop to write a program that is saved as a text file.
The laptop has utility software and an Operating System (OS).
Describe the file management tasks carried out by an OS.
• Secondary storage space is divided into file allocation units
• Space on secondary storage is allocated to particular files
• Maintains/creates directory structures
• Specifies the logical method of file storage e.g. FAT or NTFS
• Provides file naming conventions
• Controls user access // implements access rights //implements password
protection // Makes file sharing possible
• Controls access to the file by other software
• Specifies tasks that can be performed on a file e.g. open, close, delete,
copy, create, move, etc
• Allows searching for a file
Explain the need for back-up software
• To allow data to be retrieved / restored when lost
• To automatically make a duplicate copy of data…
• …so the user does not have to remember to backup data
• To make regular duplicate copies of data
The student used a program library when writing their program.
273 | P a g e
Explain the benefits to the student of using library files when writing a program.
• It saves development time for the student
• … by using pre-written code
• There is less testing to do // the routines are more likely to work correctly
• … because they have already been tested and are error-free
• It results in a more robust program
• Subroutines can be used that they do not have the skill to write
• … which enables a more complex program to be written
A computer designed using the Von Neumann model for a computer system contains general
purpose registers and special purpose registers.
Describe the purpose of the Status Register (SR).
• To store the value of flags/bits
• … that can be changed/set/cleared after arithmetic / logical operations
• To allow flags to be checked
• … to change instruction sequence
Identify two differences between general purpose registers and special purpose registers.
• Special purpose registers have a specified role in the machine whereas
general purpose registers can be used for all purposes defined by the
programmer
• Special purpose registers hold the state of the program’s execution while
general purpose registers hold the program’s data during operations
The computer is designed using the Von Neumann model for a computer system.
Complete the table by describing the purpose of each of the given registers.
274 | P a g e
The computer has an Operating System (OS). One of the key management tasks of the OS is
process management.
Describe the process management tasks performed by an OS.
• It manages the scheduling of processes // Decides which process is to be
run next
• Allows multi-tasking/multi-processing
• Ensures fair access
• Handles interrupts
• Manages / allocates which resources the processes require
• Facilitates the sharing and exchange of data between processes
• Prevents interference between processes // conflict resolution
The programmers created a new program library whilst developing the program.
Describe the benefits to the programmers of creating a program library.
• Subroutines can be shared / reused
• … between team members who are working independently
• … without having to rewrite/re-test them which saves the
programmers’ time
• A program library provides continuity between programs/programmers
275 | P a g e
• Individual programmers can contribute their specialisms to the library //
Individual programmers can use the specialisms of others
8. Database
State why the table is not in First Normal Form (1NF). (9608/11/M/J/15)
• (ShopSales) table has repeated group (of attributes) • each sales person has a number of
products • FirstName, Shop would need to be repeated for each record
The database design is changed to:
SalesPerson (FirstName, Shop)
SalesProducts (FirstName, ProductName, NoOfProducts, Manufacturer)
Using the data given in the first attempt table (ShopSales), show how these data are now stored
in the revised table designs.
FirstName Shop
Nick TX
Sean BH
John TX
Table: SalesPerson
Here’s the formatted table:
Nick Refrigerator 2 WP
John Toaster 3 GK
A relationship between the two tables has been implemented. Explain how this has been done.
• primary key of SalesPerson table is FirstName
276 | P a g e
• links to FirstName in SalesProducts table
• FirstName in SalesProductsS table is foreign key
Explain why the SalesProducts table is not in Third Normal Form (3NF).
• There is a non-key dependency
• Manufacturer is dependent on ProductName, (which is not the primary key of the
SalesProducts table)
Write the table definitions to give the database in 3NF.
SalesPerson (FirstName, Shop) –SalesProducts (FirstName, ProductName, NoOfProducts) OR
SalesProducts(SalesID, FirstName, ProductName, NoOfProducts) -Product (ProductName,
Manufacturer)
State what DBMS stands for
Database Management System
Describe two ways in which the Database Administrator (DBA) could use the DBMS software to
ensure the security of the student data.
• Issue usernames and passwords...
o stops unauthorised access to the data
o any further expansion e.g. strong passwords / passwords should be changed
regularly etc…
• Access rights / privileges...
o so that only relevant staff / certain usernames can read/edit certain parts of the
data
o can be read only, or full access / read, write and delete
o any relevant example e.g. only class tutors can edit details of pupils in their tutor
group
• Create (regular / scheduled) backups...
o in case of loss/damage to the live data a copy is available
o any relevant example e.g. backing up the attendance registers at the end of
each day and storing the data off-site/to a separate device
• Encryption of data...
o if there is unauthorised access to the data it cannot be understood // needs a
decryption key
277 | P a g e
o any relevant example e.g. personal details of pupils are encrypted before being
sent over the Internet to examination boards
• Definition of different views...
o composed of one or more tables
o controls the scope of the data accessible to authorised users
o any relevant example e.g. teachers can only see their classes
• Usage monitoring / logging of activity...
o creation of an audit /activity log
o records the use of the data in the database / records operations performed by
all users / all access to the data
o any relevant example, e.g. Track who changed a student’s grade
A feature of the DBMS software is a query processor.
Describe how the school secretary could use this software.
• Set up search criteria
• To find / retrieve / return the data that matches the criteria
• Any relevant example e.g. find pupils who were absent on a particular day
The DBMS has replaced software that used a file-based approach with a relational database.
Describe how using a relational database has overcome the previous problems associated with
a file-based approach.
• By storing data in (separate) linked tables data redundancy is reduced / data
duplication is controlled...
• Compatibility / data integrity issues are reduced as data only needs to be updated
once / is only stored once.
• Unwanted or accidental deletion of linked data is prevented as the DBMS will flag an
error.
• Program - data dependence is overcome.
• Changes made to the structure of the data have little effect on existing programs.
• Ad-hoc / complex queries can be more easily made as the DBMS will have a query
language/ QBE form.
• Unproductive maintenance is eliminated as changes only need to be made once
(rather than changing multiple programs).
278 | P a g e
• Fields can be added or removed without any effect on existing programs (that do not
use these fields).
• Security / privacy of the data is improved as each application only has access to the
fields it needs.
• There is better control of data integrity as the DBMS (uses its Data Dictionary) to
perform validation checks on data entered.
The database design has three tables to store the classes that students attend.
STUDENT(StudentID, FirstName, LastName, Year, TutorGroup)
CLASS(ClassID, Subject)
CLASS-GROUP(StudentID, ClassID)
Primary keys are not shown.
There is a one-to-many relationship between CLASS and CLASS–GROUP
Describe how this relationship is implemented
• The Primary Key in CLASS is ClassID
• The Foreign Key of CLASS-GROUP is ClassID.
• The Primary Key of CLASS is also included in CLASS-GROUP as a Foreign Key,
(which links to CLASS table)
Describe the relationship between CLASS-GROUP and STUDENT.
Many-to-one
Write an SQL script to display the StudentID and FirstName of all students who are in the tutor
group 10B. Display the list in alphabetical order of LastName.
SELECT StudentID, FirstName
FROM STUDENT
WHERE TutorGroup = "10B" // WHERE (TutorGroup = "10B")
ORDER BY LastName ASC;
Write an SQL script to display the LastName of all students who attend the class whose ClassID
is CS1
SELECT STUDENT.LastName
FROM STUDENT, CLASS-GROUP
WHERE ClassID = "CS1" // WHERE (ClassID = "CS1")
AND CLASS-GROUP.StudentID = STUDENT.StudentID;
279 | P a g e
A Database Management System (DBMS) provides the following features
280 | P a g e
• Justification e.g. otherwise it may not be done
• Make sure the procedure is written down and understood by staff
• Justification e.g. otherwise some data may not be backed up
State the type of relationship that exists between STUDENT and STUDENT-QUALIFICATION
One-to-many
Describe how the relationship between QUALIFICATION and STUDENT-QUALIFICATION is
implemented.
281 | P a g e
• The primary key in the QUALIFICATION table is QualCode.
• The foreign key in the STUDENT-QUALIFICATION table is QualCode.
• The primary key of QUALIFICATION is also included in QualCode.
The database will store each student’s date of birth. Write an SQL script to add a date of birth
attribute to the appropriate table.
ALTER TABLE STUDENT
ADD DateOfBirth DATE;
Write an SQL script to display the StudentID, Grade and DateOfAward for the QualCode value
of SC12
SELECT StudentID, Grade, DateOfAward
FROM STUDENT-QUALIFICATION
WHERE QualCode = 'SC12';
Write an SQL script to display the FirstName and LastName and QualCode for all STUDENT-
QUALIFICATIONs for which the Grade value is A
SELECT STUDENT.FirstName, STUDENT.LastName, STUDENTQUALIFICATION.QualCode
FROM STUDENT, STUDENT-QUALIFICATION
WHERE STUDENT-QUALIFICATION.Grade = 'A'
AND STUDENT.StudentID = STUDENT-QUALIFICATION.StudentID;
Alternative answer:
SELECT FirstName, LastName, STUDENT-QUALIFICATION.QualCode
FROM STUDENT, INNER JOIN STUDENT-QUALIFICATION
ON STUDENT.StudentID = STUDENT-QUALIFICATION.StudentID
WHERE Grade = 'A';
Five descriptions and seven relational database terms are shown below
282 | P a g e
Explain what is meant by referential integrity.
• Ensures related data in tables are consistent
• If one table has a foreign key (the ‘foreign’ table)…
• … then it is not possible to add a record to that table / the ‘foreign’ table
• … unless there is a corresponding record in the linked table with a corresponding
primary key (the ‘primary’ table)
• Cascading delete
• If a record is deleted in the ‘primary’ table…
• all corresponding linked records in ‘foreign’ tables must also be deleted
283 | P a g e
• Cascading update
• If a record in the ‘primary’ table is modified…
• … all linked records in foreign tables will also be modified
The health club employs a programmer to update the class booking system. The programmer
has to decide how to store the records. The choice is between using a relational database or
a file-based approach.
Give three reasons why the programmer should use a relational database.
• Reduced data redundancy / data duplication
• Data is stored in (separate) linked tables
• The database (generally) stores data only once / data need only be updated once
• Improved data consistency / integrity / associated data will be automatically
updated / easier to maintain the data / elimination of unproductive maintenance
• Complex queries can be more easily written
• To search /find specific data // specific example related to the Health Club
• Fields can be more easily added to or removed from tables
• Without affecting existing applications (that do not use these fields)
• Program-data dependence is overcome
• Changes to the data (design) do not require changes to programs // changes to programs
do not require changes to data //the data can be accessed by any appropriate program
• Security is improved
• Each application only has access to the fields it needs //different users can be given
different access rights
• Different users can be given different views of the data/ data privacy is maintained
• So they do not see confidential information
• Allows concurrent access
• Record locking prevents two users updating the same record at the same time //record
locking assures data consistency
Complete the Entity-Relationship (E-R) diagram to show the relationships between these
tables
284 | P a g e
The CLASS table has primary key ClassID and stores the following data:
285 | P a g e
A relational database is created to store the ward and nurse data. The two table designs for
Area A are:
A-WARD(WardName, NumberOfBeds)
A-NURSE(NurseID, FirstName, FamilyName, ...........................................................)
(i) Complete the design for the A-NURSE table
A-NURSE(NurseID, FirstName, FamilyName, WardName)
Explain how the relationship in part (a) is implemented.
• The primary key WardName in the A-WARD table
• « links to the foreign key WardName in the A-NURSE table.
Explain what the degree of relationship is between the entities B-NURSE and B-WARD.
Many-to-many relationship
The design for the Area B data is as follows:
B-NURSE(NurseID, FirstName, FamilyName, Specialism)
B-WARD(WardName, NumberOfBeds, Specialism)
B-WARD-NURSE( ............................................................................................................ )
Complete the attributes for the third table. Underline its primary key.
B-WARD-NURSE(WardName, NurseID)
Draw the relationships on the entity-relationship (E-R) diagram
Write an SQL query to display the Nurse ID and family name for all Area B nurses with a
specialism of ‘THEATRE’.
286 | P a g e
WHERE Specialism = 'THEATRE'
Fatima Woo is an Area B nurse with the nurse ID of 076. She has recently married, and
her new family name is Chi.
Write an SQL command to update her record.
UPDATE B-NURSE
SET FamilyName = 'Chi'
WHERE NurseID = '076';
Explain what the degree of relationship is between the entities SHOP and SUPPLIER.
Many-to-many relationship
The database design is as follows:
SHOP(ShopID, ShopName, Location, RetailSpecialism)
SUPPLIER(SupplierID, SupplierName, ContactPerson, RetailSpecialism)
SHOP-SUPPLIER(ShopID, SupplierID)
The SHOP–SUPPLIER table stores the suppliers that each shop has previously used.
Primary keys are not shown.
(b) (i) Label the entities and draw the relationships to complete the revised E-R diagram.
287 | P a g e
The database designer has implemented SUPPLIER.ContactPerson as a secondary key.
Describe the reason for this
• The database user will frequently want to search on contact name
• The contact name attribute has been indexed
• It allows for a fast/faster search using contact name
Write an SQL query to display the shop ID and location of all shops with a ‘GROCERY’
Specialism
SELECT ShopID, Location
FROM SHOP
WHERE RetailSpecialism = 'GROCERY';
The existing shop with ID 8765 has just used the existing supplier SUP89 for the first time.
Write an SQL script to add this data to the database
INSERT INTO SHOP-SUPPLIER
(ShopID, SupplierID)
VALUES (8765, 'SUP89');
288 | P a g e
Area A are:
A-WARD(WardName, NumberOfBeds)
A-NURSE(NurseID, FirstName, FamilyName, ...........................................................)
(i) Complete the design for the A-NURSE table
A-NURSE(NurseID, FirstName, FamilyName, WardName)
Explain how the relationship in part (a) is implemented.
• The primary key WardName in the A-WARD table
• « links to the foreign key WardName in the A-NURSE table.
Explain what the degree of relationship is between the entities B-NURSE and B-WARD.
Many-to-many relationship
The design for the Area B data is as follows:
B-NURSE(NurseID, FirstName, FamilyName, Specialism)
B-WARD(WardName, NumberOfBeds, Specialism)
B-WARD-NURSE( ............................................................................................................ )
Complete the attributes for the third table. Underline its primary key.
B-WARD-NURSE(WardName, NurseID)
Draw the relationships on the entity-relationship (E-R) diagram
Write an SQL query to display the Nurse ID and family name for all Area B nurses with a
specialism of ‘THEATRE’.
289 | P a g e
FROM B-NURSE
WHERE Specialism = 'THEATRE'
Fatima Woo is an Area B nurse with the nurse ID of 076. She has recently married, and
her new family name is Chi.
Write an SQL command to update her record.
UPDATE B-NURSE
SET FamilyName = 'Chi'
WHERE NurseID = '076';
Underline the primary key for each table in the following suggested table designs
PATIENT(PatientID, PatientName, Address, Gender)
DOCTOR(DoctorID, Gender, Qualification)
APPOINTMENT(AppointmentDate, AppointmentTime, DoctorID, PatientID)
PatientID
DoctorID
AppointmentDate, AppointmentTime
Complete the following entity-relationship (E-R) diagram for this design.
The doctors are concerned that many patients make appointments but do not attend them.
Describe the changes to the table designs that could be made to store this information.
• Add an attribute (for example Attended )
• To the appointment table // APPOINTMENT
Or:
• Add an attribute (for example AppointmentsMissed )
• To the patient table // PATIENT
290 | P a g e
State what this data shows about the availability of the doctor with the ID of 098.
Available to work at both SITE-A and SITE-B
Opening a new clinic in the neighbouring village will not require any additional table for storing
appointments. It will need a change to the existing appointment table design. Show the revised
APPOINTMENT table.
APPOINTMENT(Site, AppointmentDate, AppointmentTime, DoctorID, PatientID)
The doctor with the ID of 117 has recently been allocated a new DoctorID of 017.
Write an SQL script to update this doctor’s record in the database.
UPDATE DOCTOR
SET DoctorID = '017'
WHERE DoctorID = '117';
Describe why this update could cause problems with the existing data stored.
• Referential integrity should be maintained // Referential integrity could be
violated.
• Data becomes inconsistent
• There may be records in the APPOINTMENT table showing doctor ID 117
• The APPOINTMENT table might not be automatically updated
• Records in the APPOINTMENT table will become orphaned
Write an SQL script to display the date and time of all appointments made by the patient with
the PatientID of 556
SELECT AppointmentDate, AppointmentTime
FROM APPOINTMENT
291 | P a g e
WHERE PatientID = '556';
Underline the primary key for each table in the following suggested table designs.
STAFF(StaffID, StaffName, Department)
CLIENT(ClientName, Address, Town)
VISIT(ClientName, VisitDate)
INTERVIEW(ClientName, VisitDate, StaffID, SpecialistFocus, InterviewText)
STAFF(StaffID, StaffName, Department)
CLIENT(ClientName, Address, Town)
VISIT(ClientName, VisitDate)
INTERVIEW(ClientName, VisitDate, StaffID, SpecialistFocus,
InterviewText)
For each of the pairs of entities, A, B and C, draw the relationship between the two
entities.
The company decides to produce a visit report, VisitReportText, for each visit made.
This text will be produced from the one or more interview texts obtained at the visit.
State how one or more of the given table designs can be changed to add this attribute.
Add attribute VisitReportText to table VISIT
Client ABC Holdings are now trading under the name of Albright Holdings.
Write an SQL script to update this client’s record in the database
UPDATE CLIENT
SET ClientName = 'Albright Holdings'
WHERE ClientName = 'ABC Holdings';
Describe why this update could cause problems with the existing data stored
292 | P a g e
• Referential integrity should be maintained // Referential integrity could be violated
• Data becomes inconsistent
• There may be records in the VISIT and INTERVIEW tables / other tables with client name ABC
Holdings
• The ClientName in the VISIT and INTERVIEW tables / other tables might not be automatically
updated
• Records in the VISIT and INTERVIEW tables / other tables will become Orphaned
Write an SQL script to display the Staff ID of each member of staff who performed an interview
when they visited New Age Toys on 13/10/2016.
SELECT StaffID FROM INTERVIEW
WHERE ClientName = 'New Age Toys'
AND VisitDate = '13/10/2016'; (Accept clauses other way round)
At present, all interviews are performed in the UK. Many clients now operate in other countries
in Europe. The company wants to perform interviews with the client’s staff in other countries.
Not all interview staff are willing to travel outside of the UK.
State how one or more of the table designs should be revised to store this information
Add a suitable attribute, for example, EuropeTraveller to the STAFF table // Add
a suitable attribute, for example, Country to the CLIENT table
USER(UserName, FirstName, SecondName, DateOfBirth)
PHOTO(PhotoID, UserName, Comment, UploadDate)
TEXTPOST(PostID, UserName, DateOfPost, TheText)
Explain how the relationship between the tables USER and PHOTO has been implemented.
- UserName is the primary key in USER
- UserName is (included as) foreign key in PHOTO
Draw the entity-relationship (E-R) diagram to show the relationships between the three
tables.
Use an example from the database WEBDATA to explain what is meant by referential
293 | P a g e
Integrity
• Referential integrity is making sure tables do not try to reference data which does not exist // A
value of one attribute of a table exists as a value of another attribute in a different table
• A primary key cannot be deleted unless all dependent records are already deleted
• Cascading delete
• A primary key cannot be updated unless all dependent records are already updated
• Cascading update / edit
• Every foreign key value has a matching value in the corresponding primary key
• The foreign keys must be the same data type as the corresponding primary key
• A UserName cannot be deleted from the USER table if they have a related photo/textpost
• If UserName is updated in USER table, it must also be updated in PHOTO and TEXTPOST
tables
• Cannot create/edit a record in TEXTPOST / PHOTO without a matching entry in USER table
Define the three stages of database normalisation.
1NF
• No repeated groups of attributes
• All attributes should be atomic
• No duplicate rows
2NF (in 1NF and)
• No partial dependencies
3NF (in 2NF and)
• No non-key dependencies
• No transitive dependencies
294 | P a g e
CREATE TABLE USER(
UserName: varchar(15) NOT NULL,
FirstName: varchar(25),
SecondName: varchar(25),
DateOfBirth: Date,
PRIMARY KEY(UserName)
);
The database administrator needs to alter the USER table. A new field, Country, needs
to be added.
Write an SQL script to add the field Country to the USER table.
ALTER TABLE USER
ADD Country varchar;
A company writes applications (apps) for smartphones. The company has a relational database,
PURPLEGAME, which stores the information for one of its online game apps.
The database has three tables to store player’s details, dates when they have logged into the
app
and in-app purchase details.
LOGIN(LoginID, PlayerID, Date)
PURCHASE(PurchaseID, PlayerID, PurchaseDate, Cost)
PLAYER(PlayerID, PlayerName, SkillLevel)
Draw the entity-relationship (E-R) diagram to show the relationships between the three tables
The database designer states that the PURPLEGAME database is in Third Normal Form (3NF).
Tick onebox to indicate whether this statement is true or false.
295 | P a g e
keys)
• No non-key / transitive dependencies
A movie theatre has a relational database that stores the movie schedule, and information about
the movies. The theatre has several screens that play movies at the same time.
The database has three tables to store information about the movies, the screens and the movie
schedule.
MOVIE(MovieID, Title, Length, Rating)
SCREEN(ScreenNumber, NumberSeats)
MOVIESCHEDULE(ScheduleID, MovieID, ScreenNumber, Time)
Complete the entity-relationship (E-R) diagram to show the relationships between these
tables.
296 | P a g e
Explain how primary and foreign keys are used to link the tables in the movie theatre
Database
• MovieID is the Primary Key in MOVIE
• « links to MovieID which is the Foreign Key in MOVIESCHEDULE
• ScreenNumber is the Primary Key in SCREEN
• « links to ScreenNumber which is the Foreign Key in
MOVIESCHEDULE
The database needs to store the name of the company that produced each movie, for
example, Rocking Movies.
Write an SQL script to add the attribute ProductionCompany to the MOVIE table.
• ALTER TABLE MOVIE
• ADD (COLUMN)ProductionCompany VARCHAR(25);
Write an SQL script to display the title and rating of all movies scheduled to play on screen
number 3
Answer 1:
• SELECT Title, Rating
• FROM MOVIE, MOVIESCHEDULE
• WHERE MOVIE.MovieID = MOVIESCHEDULE.MovieID
• AND MOVIESCHEDULE.ScreenNumber = 3;
Or
Answer 2:
• SELECT Title, Rating
• FROM MOVIE INNER JOIN MOVIESCHEDULE
297 | P a g e
• ON MOVIE.MovieID = MOVIESCHEDULE.MovieID
• WHERE MOVIESCHEDULE.ScreenNumber = 3;
The software company decides to use a database to overcome the limitations of a
file-based system. Some of these limitations are addressed through the logical schema.
Name and describe two levels of the schema of a database.
• External
• The individual’s view(s) of the database
• Conceptual
• Describes the data as seen by the applications making use of the
DBMS
• Describes the ‘views’ which users of the database might have
• Physical / Internal
• Describes how the data will be stored on the physical media
• Logical
• Describes how the relationships will be implemented in the logical
structure of the database
The database has the following tables:
CUSTOMER(CustomerID, CompanyName)
SOFTWARE(SoftwareID, SoftwareName, OperatingSystem, Description)
LICENCE(LicenceID, CustomerID, SoftwareID, DateOfPurchase,
LicenceType, Cost, ExpiryDate)
Identify the type of relationship that exists between the tables CUSTOMER and LICENCE.
1-to-many // 1 customer to/has many licences
Describe how the relationship is created between the tables CUSTOMER and LICENCE
• CustomerID is the Primary key in CUSTOMER table
• Links to CustomerID as a Foreign key in LICENCE table
The company needs a list of all software licences that have an expiry date on or before
31/12/2019.
Write an SQL query to return the fields CustomerID, SoftwareID, LicenceType,
298 | P a g e
Cost and ExpiryDate for all licences that expire on, or before 31/12/2019. Group the
output by CustomerID, and in ascending order of cost.
299 | P a g e
• For example, fields, data types, validation, keys
The DBMS has a query processor.
Describe the purpose of a query processor
• Allows the user to enter criteria
• Searches for data which meets the entered criteria
• Organises the results to be displayed to the user
Relationships are created between tables using primary and foreign keys.
Describe the role of a primary and a foreign key in database relationships.
• Primary key uniquely identifies each tuple // Each tuple in the table is
unique
• Primary key can be used as a foreign key in another table
• «.. to form a link/relationship between the tables
By example:
• Identification of a primary key in a table
• Describing that primary key in another table as a foreign key
In the company:
• An employee can be a manager.
• A department can have several managers and several employees.
• An employee can only belong to one department.
The EMPLOYEES database has three tables:
EMPLOYEE_DATA(EmployeeID, FirstName, LastName, DateOfBirth, Gender,
DepartmentNumber)
DEPARTMENT(DepartmentNumber, DepartmentName)
DEPARTMENT_MANAGER(DepartmentNumber, EmployeeID, role)
Complete the entity-relationship (E-R) diagram for the EMPLOYEES database
300 | P a g e
Give three reasons why the EMPLOYEES database is fully normalised.
• There are no repeating groups (1NF)
• There are no partial dependencies (2NF)
• There are no non-key dependencies // There are no transitive
dependencies (3NF)
Part of the EMPLOYEE_DATA table is shown
Write a Data Definition Language (DDL) statement to create the EMPLOYEES database.
CREATE DATABASE EMPLOYEES;
Write a DDL statement to define the table EMPLOYEE_DATA, and declare EmployeeID
as the primary key
CREATE TABLE EMPLOYEE_DATA (
EmployeeID VarChar(7),
FirstName VarChar,
LastName VarChar,
DateOfBirth Date,
Gender VarChar(6),
DepartmentNumber VarChar(2),
PRIMARY KEY (EmployeeID)
301 | P a g e
);
Write a Data Manipulation Language (DML) statement to return the first name and last
name of all female employees in the department named Finance
SELECT FirstName, LastName
FROM EMPLOYEE_DATA, DEPARTMENT
WHERE DepartmentName = "Finance"
AND Gender = "Female"
AND DEPARTMENT.DepartmentNumber =
EMPLOYEE_DATA.DepartmentNumber;
The bank uses a relational database, ACCOUNTS, to store the information about customers
and their accounts.
The database stores the customer’s first name, last name and date of birth.
The bank has several different types of account. Each account type has a unique ID number,
name (for example, regular or saving) and bonus (for example, $5.00, $10.00 or $15.00).
A customer can have more than one account.
Each customer’s account has its own ID number and stores the amount of money the
customer has in that account.
The bank creates a normalised, relational database to store the required information. There
are three tables:
• CUSTOMER
• ACCOUNT_TYPE
• CUSTOMER_ACCOUNT
Write the attributes for each table to complete the database design for the bank
CUSTOMER (CustomerID, FirstName, LastName, DateOfBirth)
ACCOUNT_TYPE (AccountID, Name, Bonus)
CUSTOMER_ACCOUNT (ID, CustomerID, AccountID, Amount)
Identify the primary key for each table that you designed
CUSTOMER: CustomerID
ACCOUNT_TYPE: AccountID
302 | P a g e
CUSTOMER_ACCOUNT: ID
Identify one foreign key in one of the tables that you designed
Table: CUSTOMER_ACCOUNT
Foreign Key: CustomerID / AccountID
The following table has definitions of database terms.
Write the correct database term in the table for each definition.
303 | P a g e
• Allows concurrent access to data
• « by the use of record locking
• « by restricting over-writing changes
• Complex queries can be more easily written
• ... to search / find specific data // specific example related to the sports club
• Different users can be given different access rights
• « which improves security
• Different users can be given different views of the data
• ... so they do not see confidential information
• « and data privacy is maintained
• « accept a valid example related to the sports club
The relational database design needs to be normalised. The following statements
describe the three stages of database normalisation.
Complete the statements by filling in the missing words.
For a database to be in First Normal Form (1NF) there must be no repeating
groups of attributes.
For a database to be in Second Normal Form (2NF), it must be in 1NF, and
contain no partial key dependencies.
For a database to be in Third Normal Form (3NF), it must be in 2NF, and all
attributes must be fully dependent on the primary key.
The normalised relational database, SPORTS_CLUB, has the following table design.
MEMBER(MemberID, FirstName, LastName, MembershipType)
SESSION(SessionID, Description, SessionDate, SessionTime, NumberMembers)
TRAINER(TrainerID, TrainerFirstName, TrainerLastName)
MEMBER_SESSION(MemberID, SessionID)
SESSION_TRAINER(SessionID, TrainerID)
Anushka has designed an entity-relationship (E-R) diagram for SPORTS_CLUB.
304 | P a g e
Complete the entity-relationship (E-R) diagram.
Anushka first needs to create the database that she has designed.
Write a Data Definition Language (DDL) statement to create the SPORTS_CLUB
Database
CREATE DATABASE SPORTS_CLUB;
The table shows some sample data for the table SESSION.
305 | P a g e
PRIMARY KEY (SessionID)
);
Example 2:
CREATE TABLE SESSION(
SessionID Char(4)NOT NULL PRIMARY KEY,
Description Varchar,
SessionDate Date,
SessionTime Time,
NumberMembers Integer);
Write a Data Manipulation Language (DML) script to return the first name and last name
of all members who have Peak membership type.
306 | P a g e
Identify the primary key for each table that you designed
CUSTOMER: CustomerID
ROOM: RoomNumber
BOOKING: BookingID
A driving school teaches people how to drive cars. The school has a relational database,
307 | P a g e
DRIVING_SCHOOL, to store information about instructors, students, lessons and the cars used
by
instructors.
INSTRUCTOR(InstructorID, FirstName, LastName, DateOfBirth, Level)
CAR(Registration, Make, Model, EngineSize)
INSTRUCTOR_CAR(InstructorID, Registration)
STUDENT(StudentID, FirstName, LastName, DateOfBirth, Address1)
LESSON(LessonID, StudentID, InstructorID, LessonDate, LessonTime)
Give two benefits to the driving school of using a relational database instead of a flat file.
• Reduced data redundancy
• Reduced data dependency
• Improved data integrity
• Improved data privacy
• Program-data independence
• Ability to create ad hoc queries
Complete the entity-relationship diagram for the database DRIVING_SCHOOL.
308 | P a g e
Complete the Data Definition Language (DDL) statement to create the table INSTRUCTOR.
CREATE TABLE INSTRUCTOR(
InstructorID VARCHAR(5),
FirstName VARCHAR(15),
LastName VARCHAR(15),
DateOfBirth DATE,
Level INTEGER,
PRIMARY KEY (InstructorID)
);
The table STUDENT needs an additional field to store the student’s telephone number, for
example 012-3456.
Write a Data Definition Language (DDL) statement to add the new field to the table STUDENT.
ALTER TABLE STUDENT
ADD TelNum VARCHAR;
Write a Data Manipulation Language (DML) statement to return the date and time of all future
lessons booked with the instructor whose InstructorID is Ins01.
SELECT LessonDate, LessonTime
FROM LESSON
WHERE InstructorID = "Ins01"
AND LessonDate > #######;
309 | P a g e
and licences that customers have purchased.
The SOFTWARE_MANAGEMENT database has the following tables:
CUSTOMER_DETAILS(CustomerID, CompanyName, Address1, Address2, City)
SOFTWARE_PURCHASED(SoftwareName, SoftwareDescription, CustomerID,
LicenceType, LicenceCost, RenewalDate)
Explain why this database is not in Third Normal Form (3NF). Refer to the tables in your
answer.
Do not attempt to normalise the tables.
• There are partial dependencies in the SOFTWARE_PURCHASED table //
SoftwareDescription is dependent only on SoftwareName and not
both SoftwareName and CustomerID
• There is a non-key dependency in the SOFTWARE_PURCHASED table //
LicenceCost is dependent on LicenceType
Give an example from the database SOFTWARE_MANAGEMENT for each of the following
database terms.
The company also develops computer games. They extend the relational database
SOFTWARE_MANAGEMENT by adding a new table. The new table, GAME_DEVELOPMENT,
stores details about the games and the software development teams creating them.
The table shows example data in GAME_DEVELOPMENT.
310 | P a g e
Complete the Data Definition Language (DDL) statement to create the table
GAME_DEVELOPMENT.
CREATE TABLE GAME_DEVELOPMENT (
GameName VarChar,
Genre VarChar,
TeamNumber Integer,
DevelopmentStage VarChar,
ManagerID VarChar,
PRIMARY KEY (GameName)
);
Another table, PRODUCT_MANAGER, is created.
PRODUCT_MANAGER(ManagerID, FirstName, LastName)
Complete the Data Manipulation Language (DML) statement to return the game name,
genre and team number of all games managed by the product manager with the first
name ‘James’ and the last name ‘Fitz’.
1 mark for each correct entry (shown in brackets)
SELECT (1) GameName, Genre, TeamNumber
FROM GAME_DEVELOPMENT, PRODUCT_MANAGER
WHERE PRODUCT_MANAGER.FirstName = "James"
AND PRODUCT_MANAGER.SecondName = "Fitz"
AND PRODUCT_MANAGER.ManagerID (1)
= GAME_DEVELOPMENT.ManagerID (1)
Sheila creates a relational database for her hotel using a Database Management System
(DBMS).
311 | P a g e
Draw one line from each database term to its most appropriate description.
Identify three tasks that Sheila can perform using the DBMS developer interface.
• Create a table
• Set up relationships between tables
• Create / design a form
• Create / design a report
• Create / design a query (NOT run a query)
Sheila creates the database HOTEL with the following table structure:
ROOM(RoomNumber, RoomType)
BOOKING(BookingID, RoomNumber, CustomerID, StartDate)
CUSTOMER(CustomerID, FirstName, LastName, Address, Tel_Num)
The following table shows some sample data for the table ROOM
312 | P a g e
Complete the Data Definition Language (DDL) statement to create the table ROOM.
CREATE TABLE ROOM(
RoomNumber Integer,
RoomType Varchar,
PRIMARY KEY (RoomNumber)
);
Room number 5 is a Double room.
Complete the Data Manipulation Language (DML) statement to add the details for room
number 5 to the table ROOM.
313 | P a g e
and link them by common attributes
• To reduce / eliminate data redundancy
• …the staff in the surgery usually only needs to enter data once // in the
file system data is probably repeated unnecessarily in different files
• Improved data integrity
• … e.g. if they are searching for an owner’s pets then all results for the
owner should be returned
• Privacy is improved
• … e.g. different views can be given to different users in the surgery.
E.g. the receptionists cannot see the pet’s medical notes
• Referential integrity can be enforced // Unwanted or accidental deletion
of linked data is prevented
• … e.g. the staff in the surgery cannot accidently delete an owner’s
record while there are pets belonging to that owner // Staff cannot enter
an appointment for a pet that does not exist
• Program-data dependence is overcome
• …e.g. the staff in the surgery can add another attribute to the pet table
without affecting the data already stored or the queries already written
• More complex searches and queries can be executed … e.g. the staff in
the surgery can set up a query to only return the names of pets who
have not been seen for over a year
The design for the surgery database, SURGERY, is:
PET(PetID, OwnerFirstName, OwnerLastName, PetName, PetBreed,
PetDateOfBirth, TelephoneNumber)
APPOINTMENT(AppointmentID, Date, Time, StaffID, PetID)
Give one reason why the database design for SURGERY is not in Third Normal Form
(3NF).
• OwnerFirstName, OwnerLastName and TelephoneNumber are
repeated for owners with more than one pet.
• OwnerFirstName, OwnerLastName and TelephoneNumber are
314 | P a g e
not dependent on the primary key of the PET table.
The database needs to be normalised to 3NF. A pet may have more than one owner and
an owner may have more than one pet.
The appointment table does not need to change and has been repeated below.
Give the name and attributes of three additional tables in 3NF. Identify the primary
key(s) in each table.
APPOINTMENT(AppointmentID, Date, Time, StaffID, PetID)
• PET (PetID, PetName, PetBreed, PetDateOfBirth)
• OWNER (OwnerID, OwnerFirstName, OwnerLastName,
TelephoneNumber)
• A linking table between PET and OWNER
• Composite primary key made up of the primary keys of the other two
tables and no extra attributes in the linking table, for example,
PET_OWNER(PetID, OwnerID)
Part of the table APPOINTMENT is shown. The veterinary surgery uses Data Manipulation
Language (DML) statements to search for appointments.
Identify the industry standard language that provides both DML and Data Definition
Language (DDL) statements.
Structured Query Language // SQL
Write a DDL statement to update the table APPOINTMENT and define AppointmentID
as the primary key.
• ALTER TABLE APPOINTMENT
• ADD PRIMARY KEY(AppointmentID); //
315 | P a g e
ADD UNIQUE (AppointmentID);
Complete the DML script to display the times and Pet IDs of all appointments on
02/02/2021 with staff ID of ‘JK1’, in descending order of time.
• SELECT Time, PetID
(FROM APPOINTMENT)
• WHERE StaffID = "JK1" AND Date = "02/02/2021"
• ORDER BY Time DESC;
A teacher uses a relational database, RESULTS, to store data about her students and their test
results.
Describe the benefits to the teacher of using a relational database instead of a file-based
approach.
• Linked tables can be set up
• … the teacher can set up tables for her students and their results and link
them by common attributes
• Reduced data redundancy
• … the teacher usually only needs to enter data once
• Improved data integrity
• … e.g. if they are searching for a student’s marks then all results for the
student should be returned
• Program-data dependence is overcome
• … e.g. the teacher can add the results for additional tests without
affecting the data already stored
• Privacy is improved
• … e.g. the teacher can prevent student access to the data (using views
etc.)
• Referential integrity can be enforced // Unwanted or accidental deletion of
linked data is prevented
• … e.g. A teacher cannot enter a mark for a student that does not exist //
the teacher cannot accidently delete a student’s record while there are
test results for that student
316 | P a g e
• More complex searches and queries can be executed
• … e.g. the teacher can set up a query to only return the test results for
students who achieve below a certain mark
The teacher sets up the RESULTS database using a Database Management System (DBMS)
Explain the ways in which the developer interface of a DBMS will help the teacher set up
the database.
317 | P a g e
Tick (✓) one box to identify whether the database RESULTS is in 1NF, 2NF or 3NF.
Justify your choice.
• It is in 3NF
• (It is in 1NF), there are no repeating groups of attributes // all attributes
are atomic
• (It is in 2NF), there are no partial dependencies
• All fields are fully dependant on the PK // No transitive dependencies
Complete the Data Manipulation Language (DML) script to display the Student ID, mark
and maximum marks for all tests with the topic of ‘Programming’.
SELECT StudentID, Mark, MaxMarks / TEST.MaxMarks
FROM STUDENT_TEST, TEST
WHERE / WHERE Test.Topic = "Programming"
AND TEST.TestID = STUDENT_TEST.TestID ;
A company runs activity courses. It is creating a relational database to store details of the
courses
it runs.
The database has five tables:
EMPLOYEE(EmployeeID, FirstName, LastName, Role, Language)
BOOKING(BookingID, CustomerID, CourseID)
CUSTOMER(CustomerID, FirstName, LastName)
COURSE(CourseID, Title, Level, Date)
COURSE_EMPLOYEE(CourseID, EmployeeID)
318 | P a g e
Complete the entity relationship (E-R) diagram for the database.
319 | P a g e
Write a Data Manipulation Language (DML) statement to return the first name and last name
of all employees, who are leaders, and speak either French or English.
SELECT FirstName, LastName
FROM EMPLOYEE
WHERE Role = "Leader"
AND (Language = "French" OR Language = "English");
K2 Mountain Guiding is a company that runs courses teaching people how to climb mountains.
The company uses a file-based approach to store and retrieve data.
Describe three drawbacks of a file-based approach compared to a relational database.
• There is data duplication // redundant data
• …because the same data is stored multiple times // data changed in
one file is not automatically changed in others // by example
• There could be data inconsistency // reduced data integrity
• … because duplicated data might be stored as different values // by
example
• There is program-data dependency
• … if the data structure changes all the programs accessing that data
must be changed too // by example
• It is not easy to perform complex searches/queries
• … a new program has to be written each time
• Lack of privacy
• …as access controls are usually to the system rather than the data //
user views cannot easily be implemented
Each course has a destination and a trip date, and is run by a guide.
320 | P a g e
Customers can book a place on one or more courses.
The following table shows part of the stored file:
The company has decided to create a relational database to replace the current file-based
approach.
Identify three reasons why the data in this table is not in First Normal Form (1NF).
• There is no unique primary key
• Customer name is not atomic // Customer name needs to be split into
first name and last name // by example
• Customer name / Customer date of birth / Destination / Guide name /
Trip have repeated groups of attributes
The table, GUIDE_TABLE, is created.
Each guide has a unique guide ID.
Part of the table GUIDE_TABLE is shown:
Write a Data Definition Language (DDL) statement to define the table GUIDE_TABLE
CREATE TABLE GUIDE_TABLE(
GuideID INT,
321 | P a g e
Guide VARCHAR(25),
DateOfBirth DATE,
Gender CHAR(1),
PRIMARY KEY (GuideID)
);
An airline company uses a relational database to store data about passengers and flights.
Part of the database is shown.
PASSENGER(PassengerID, FirstName, LastName)
FLIGHT(FlightID, FlightDate, FlightTime)
PASSENGER_LIST(FlightID, PassengerID, SeatNo)
Complete the entity-relationship (E-R) diagram to show the relationships between the given
tables.
Write Data Definition Language (DDL) statements to define the table FLIGHT
322 | P a g e
CREATE TABLE FLIGHT (
FlightID VARCHAR(6),
FlightDate DATE,
FlightTime TIME,
PRIMARY KEY (FlightID));
An employment agency keeps records of its contracts with employers and workers in a
relational
database.
These are some of the tables in the database:
EMPLOYER(EmpId, EmpName, EmpAddress, EmpPhoneNumber)
WORKER(WkId, WkFirstName, WkLastName, WkAddress, WkPhoneNumber)
CONTRACT_TYPE(ConTypeId, ConName)
CONTRACT(ConId, ConTypeId, EmpId, WkId, RefConNumber)
Complete the entity-relationship (E-R) diagram for this part of the database.
Write a Data Definition Language (DDL) statement to change the CONTRACT table to remove
the attribute RefConNumber.
ALTER TABLE CONTRACT
DROP RefConNumber;
The following table has examples of DDL and Data Manipulation Language (DML) statements.
Tick (✓) one box in each row to identify whether each statement is an example of DML or
DDL.
323 | P a g e
State what is meant by a candidate key
An attribute (or set of attributes) that could be a primary key
Describe what is meant by a secondary key
• An attribute that can be indexed...
• …for faster searching
• An attribute that is a candidate key...
• …but is not the primary key
Bobby and Kim are discussing databases.
Bobby tells Kim that a file-based approach is usually better than a relational database.
Explain why Bobby is incorrect
• Flat-file has more data redundancy
• … because the same data is stored many times // data is stored in
different tables which are linked
• There is program-data dependence with flat-files
• ... because any changes to the structure of the data means the programs
that access that data have to be re-written
• Flat-file has more data inconsistency // worse data integrity
• ... because duplicated data might be stored differently //…because when
data is updated in one place, it is not updated everywhere
• It is not easy to perform complex searches /queries
• … because a new program has to be written each time
324 | P a g e
• Flat files could have a lack of privacy
• … as user views cannot easily be implemented
Bobby has a shop that sells products to customers. His database will store data about his
customers, their payment details, orders and the products he sells. Customers will have login
details to access their accounts. The database will update customers’ payment and login
details without keeping any historical records.
Give one example of each of the following relationships from Bobby’s database.
one-to-one
• e.g. customer to payment details // customer to login details
one-to-many
• e.g. customer to order
many-to-many
• e.g. order to product // customer to product
Tick one box to identify the relationship that cannot be directly implemented in a
normalised relational database.
325 | P a g e
• data type
• type of validation
• Primary Key
• Foreign Key
• relationships
Raj owns houses that other people rent from him. He has a database that stores details about
the people who rent houses, and the houses they rent. The database, HOUSE_RENTALS, has
the
following structure:
CUSTOMER(CustomerID, FirstName, LastName, DateOfBirth, Email)
HOUSE(HouseID, HouseNumber, Road, Town, Bedrooms, Bathrooms)
RENTAL(RentalID, CustomerID, HouseID, MonthlyCost, DepositPaid)
Give the definition of the following database terms, using an example from the database
HOUSE_RENTALS for each definition.
Tick one box to identify whether the database HOUSE_RENTALS is in Third Normal Form
(3NF) or not in 3NF.
Justify your choice using one or more examples from the database HOUSE_RENTALS
All fields in all tables are dependant fully on the PK and on no other fields
• for example all fields in Customer table are fully dependent on
CustomerID
326 | P a g e
Example data from the table RENTAL are given:
Complete the following Data Definition Language (DDL) statement to define the table
RENTAL.
327 | P a g e
Tick one box in each row to identify whether each field is a primary key or a foreign key.
Javier uses Data Definition Language (DDL) and Data Manipulation Language (DML)
statements in his database.
Complete the following DML statements to return the number of cars for sale in each
shop.
SELECT COUNT(RegistrationNumber)
FROM CAR
GROUP BY ShopID
Complete the DML statement to include the following car in the table CAR.
328 | P a g e
EMPLOYER(EmpId, EmpName, EmpAddress, EmpPhoneNumber)
WORKER(WkId, WkFirstName, WkLastName, WkAddress, WkPhoneNumber)
CONTRACT_TYPE(ConTypeId, ConName)
CONTRACT(ConId, ConTypeId, EmpId, WkId, RefConNumber)
Complete the entity-relationship (E-R) diagram for this part of the database
Write a Data Definition Language (DDL) statement to change the CONTRACT table to remove
the attribute RefConNumber.
329 | P a g e
An attribute (or set of attributes) that could be a primary key
Describe what is meant by a secondary key.
• An attribute that can be indexed...
• …for faster searching
• An attribute that is a candidate key...
• …but is not the primary key
A teacher uses a relational database, MARKS, to store data about students and their test
marks.
The database has the following structure:
STUDENT(StudentID, FirstName, LastName)
TEST(TestID, Description, TotalMarks)
STUDENT_TEST(StudentID, TestID, Mark)
Describe the advantages of using a relational database compared to a file-based approach.
Reduced data redundancy // less repeated data
…because each item of data is only stored once
Maintains data consistency // improves data integrity
…changes in one table will automatically update in another
linked data cannot be entered differently in two tables
Program-data independence
…changes to the data do not require programs to be re-written
Complex queries are easier to run
Can provide different views
….so users can only see specific aspects of the database
Give the highest level of Normal Form (NF) the database MARKS is in and justify your choice
3NF
There are no repeated attributes // it is already in 2NF
Each field is fully dependent on the corresponding primary key // no
partial dependencies
No transitive dependencies
330 | P a g e
Write a Structured Query Language (SQL) script to create the table STUDENT_TEST.
CREATE TABLE STUDENT_TEST (
StudentId INTEGER,
TestID VARCHAR,
Mark INTEGER,
PRIMARY KEY(StudentID,TestID),
FOREIGN KEY(TestID) REFERENCES TEST(TestID),
FOREIGN KEY(StudentID) REFERENCES STUDENT(StudentID)
);
Write a Structured Query Language (SQL) script to find the average mark of students in
test A7
SELECT AVG(Mark)
FROM STUDENT_TEST
WHERE TestID = "A7";
A database, FILMS, stores information about films and actors.
Part of the database is shown:
ACTOR(ActorID, FirstName, LastName, DateOfBirth)
FILM_FACT(FilmID, FilmTitle, ReleaseDate, Category)
FILM_ACTOR(ActorID, FilmID)
Complete the entity-relationship (E-R) diagram.
331 | P a g e
A composite primary key consists of two or more attributes that together form the primary key.
Explain why the table FILM_ACTOR has a composite primary key.
Neither key uniquely identifies each tuple by itself
One actor cannot appear in the same film twice so together they are
unique
Complete the SQL script to return the IDs of all the actors in the film with the title Cinderella.
ELECT FILM_ACTOR.ActorID / ActorID
FROM FILM_ACTOR
INNER JOIN FILM_FACT
ON FILM_FACT.FilmID = FILM_ACTOR.FilmID
WHERE FILM_FACT.FilmTitle = "Cinderella" ;
Write an SQL script to count the number of films that were released in January 2022
SELECT COUNT(FilmID)
FROM FILM_FACT
WHERE ReleaseDate >= #01/01/2022# AND ReleaseDate <=
#31/01/2022#;
// WHERE ReleaseDate BETWEEN #01/01/2022# AND
#31/01/2022#;
// WHERE ReleaseDate = “January 2022”;
A Database Management System (DBMS) is used to create and manipulate the database.
Complete the descriptions of the features and tools found in a DBMS using the given terms.
332 | P a g e
Not all terms will be used.
333 | P a g e
The database is normalised and is in Third Normal Form (3NF).
Describe the characteristics of a database that is in Third Normal Form (3NF).
• no repeating groups of attributes // data is atomic
• no partial key dependencies
• no non-key dependencies // no transitive dependencies
The table shows some sample data for the table PHOTO_DATA.
334 | P a g e
WHERE CameraID LIKE 'CAN*'; // WHERE CameraID LIKE
'CAN%';
Write an SQL script to include two new fields in CAMERA_DATA to store the number of
photographs currently on the camera and the date the camera was last used
LTER TABLE CAMERA_DATA
ADD NumberStored INTEGER, LastUsed DATE;
A relational database, GARDEN, has the following tables:
OWNER(OwnerID, FirstName, TelephoneNo, TreeID, TreePosition)
TREE(TreeID, ScientificName, MaxHeight, FastGrowing)
he database is not in Third Normal Form (3NF).
Explain how the database can be normalised to 3NF.
Solution 1:
• removing the many-to-many relationship between Owner and Tree
• ... by removing TreeID and TreePosition from the Owner table
• ... and creating a linking table between Owner and Tree
• ... that contains OwnerID, TreeID and TreePosition
• ... (composite) primary key of the linking table should be OwnerID and
TreeID // insert a named new primary key in the linking table
Solution 2:
• removing the many-to-many relationship between Owner and Tree
• move TreePosition into TREE table
• ... put OwnerID into TREE table
• create a new table with suitable name (for the species of tree)
• ... containing ScientificName, MaxHeight and FastGrowing
• ... with ScientificName as primary key // or another suitable primary key
Write the Structured Query Language (SQL) script to add a new record in the table TREE to
store the following data
335 | P a g e
Option 1:
INSERT INTO
TREE(TreeID, ScientificName, MaxHeight, FastGrowing)
VALUES('LOW_1276', 'Salix_Alba', 30.00, TRUE);
Option 2:
INSERT INTO
TREE
VALUES('LOW_1276', 'Salix_Alba', 30.00, TRUE);
336 | P a g e
• the overview of a database structure
• models the problem / situation
• ... by using methods such as an ER diagram
• independent of any particular DBMS
An organisation uses a database to store data about the types of bird that people have seen
The database is managed using a Database Management System (DBMS).
State what is meant by a data dictionary and give one example of an item typically found
in a data dictionary
Data about the data in the database // data about the structure of the
database // metadata for a database
Examples:
table names
data types
field names
State what is meant by data integrity and give one example of how this is implemented
in a database.
Methods of making sure the data is consistent
Examples:
Enforcing referential integrity
If data in one table is deleted/edited all tables are updated // cascading
update/delete
Validation/verification rules
The database, Birds, stores information about the types of bird and the people who have
seen them.
Data about each bird seen is stored with its location and data about the person who saw the
bird.
Database Birds has the following tables:
BIRD_TYPE(BirdID, Name, Size)
BIRD_SEEN(SeenID, BirdID, Date, Location, PersonID)
PERSON(PersonID, FirstName, LastName, EmailAddress)
337 | P a g e
Complete the table by identifying two foreign keys and the database table where each is
found.
338 | P a g e
The database only supports these data types:
• character
• varchar
• Boolean
• integer
• real
• date
• time
Write a Structured Query Language (SQL) script to define the table Bird_Type.
CREATE TABLE BIRD_TYPE(
BirdID CHAR(4) NOT NULL,
Name VARCHAR(9),
Size VARCHAR(6),
PRIMARY KEY (BirdID)
);
The database tables are repeated here for reference:
BIRD_TYPE(BirdID, Name, Size)
BIRD_SEEN(SeenID, BirdID, Date, Location, PersonID)
PERSON(PersonID, FirstName, LastName, EmailAddress)
Complete the SQL script to return the number of birds of each size seen by the person
with the ID of J_123.
SELECT BIRD_TYPE.Size, COUNT(BIRD_TYPE.BirdID) AS
NumberOfBirds
339 | P a g e
FROM BIRD_TYPE, BIRD_SEEN
WHERE BIRD_SEEN.PersonID = "J_123"
AND BIRD_TYPE.BirdID = BIRD_SEEN.BirdID
GROUP BY BIRD_TYPE.Size;
A horse riding school uses a database, Lessons, to store data about lesson bookings.
This database is created and managed using a Database Management System (DBMS).
The table contains names and descriptions of DBMS features and tools.
Complete the table by writing down the missing names and descriptions
340 | P a g e
Referential Integrity makes sure that if data is changed in one place the
change is reflected in all related records
Referential Integrity makes sure any queries return accurate and complete
Results
The database Lessons has the following tables:
HORSE(HorseID, Name, Height, Age, HorseLevel)
STUDENT(StudentID, FirstName, LastName, RiderLevel, PreferredHorseID)
LESSON(LessonID, Date, Time, StudentID, HorseID, LessonContent)
Dates in this database are stored in the format #DD/MM/YYYY#.
The fields RiderLevel and HorseLevel can only have the values: Beginner,
Intermediate or Advanced.
Describe two methods of validating the field RiderLevel.
Presence check to make sure that the (rider level) is entered
Look-up / Existence check to make sure the rider level is only Beginner,
Intermediate or Advanced
Length check to make sure the rider level entered is either 8 or 12
characters
Type check to make sure the rider level is alphanumeric
Write a Structured Query Language (SQL) script to return the names of all the horses
that have the horse level intermediate or beginner.
SELECT Name
FROM HORSE
WHERE HorseLevel = "Intermediate"
OR HorseLevel = "Beginner";
The following SQL script should return the number of riders that have the rider level
beginner and have a lesson booked on 09/09/2023.
SELECT SUM(STUDENT.RiderLevel) AS NumberOfRiders
FROM STUDENT, LESSON
WHERE StudentID = StudentID
OR Date = #09/09/2023#
341 | P a g e
AND STUDENT.RiderLevel = Beginner;
There are four errors in the script.
Identify and correct each error.
SUM should be COUNT // SELECT COUNT(STUDENT.RiderLevel)
The WHERE statement needs the table names before each field name
// WHERE STUDENT.StudentID = LESSON.StudentID
The OR should be AND // AND Date = #09/09/2023#
Beginner is missing the speech marks // STUDENT.RiderLevel =
"Beginner";
A shop manager has designed a relational database to store customer orders.
The database will have the following tables:
CUSTOMER(CustomerID, FirstName, LastName, Town)
SHOP_ORDER(OrderNo, CustomerID, OrderDate)
SUPPLIER(SupplierID, EmailAddress, TelephoneNumber)
ITEM(ItemNumber, SupplierID, Description, Price)
ORDER_ITEM(ItemNumber, OrderNo, Quantity)
Complete the entity-relationship (E-R) diagram for the relational database.
342 | P a g e
• Allows for views / improved privacy
• Allows for program-data independence
• Complex queries can be executed
Write a Structured Query Language (SQL) script to define the database called SHOP.
CREATE DATABASE SHOP;
Write the SQL script to return the total quantity of items that the customer with the ID of
HJ231 has ordered
Either:
SELECT SUM(Quantity)
FROM ORDER_ITEM, SHOP_ORDER
WHERE ORDER_ITEM.OrderNo = SHOP_ORDER.OrderNo
AND SHOP_ORDER.CustomerID = 'HJ231';
OR
SELECT SUM(Quantity)
FROM ORDER_ITEM (INNER) JOIN SHOP_ORDER
ON ORDER_ITEM.OrderNo = SHOP_ORDER.OrderNo
WHERE SHOP_ORDER.CustomerID = 'HJ231';
State what is meant by the following terms in a relational database model.
Entity:
• An object about which data can be stored
Primary key:
• The unique attribute / combination of attributes used to identify the
record / tuple
Referential integrity:
• Makes sure that if data is changed in one place the change is reflected in
all related records - cascading update/delete
• Makes sure that data that does not exist cannot be referenced
• Ensures that every foreign key has a corresponding primary key
// A logical dependency of a foreign key on a primary key
• Ensures that the data in the database is consistent / up to date
343 | P a g e
• Prevents records from being added/deleted/modified incorrectly
• Makes sure any queries return accurate and complete results
Explain how to modify the table to put it into First Normal Form (1NF).
• Identify repeating groups of attributes ...
• ... Subject and SubjectCode
• Ensure each field is atomic
• ... StudentName should be split into e.g. FirstName and LastName
• Identify the primary key for the table
The company uses a database, COURSES, to store data about the courses and their tutors.
Each course starts at different times of the year and may have a different tutor.
The database has the following structure:
COURSE_INFORMATION(CourseID, Description, Cost)
TUTOR(TutorID, TelephoneNumber, EmailAddress, TutorName)
COURSE_SCHEDULE(CourseID, DateStarted, TutorID)
Complete the entity‑relationship (E‑R) diagram for the database COURSES
344 | P a g e
Write the Structured Query Language (SQL) script to return the total number of courses
that have started after 9 September 2023.
The value returned must have an appropriate field name.
SELECT Count(CourseID) AS NumOfCourses FROM
COURSE_SCHEDULE
WHERE DateStarted > "09/09/23";
A company is developing a website that will allow users to create an account and then play a
quiz
every day. The data about the users and the quizzes are stored in a database.
A user must select a unique username and enter a valid email address to create an account. All
users must be over the age of 16. A new quiz is given to the users every day. Each quiz is
stored
in its own text file.
The database stores the filename of each quiz and the date it can be played. The user gets a
score for each quiz they complete, which is stored in the database. The scores are used to give
each user a rating, for example Gold
Create a 3-table design for this database normalised to Third Normal Form (3NF).
Give your table design in the format:
TableName(PrimaryKey, Field1, Field2, …)
User table with the username as the Primary Key
… containing at least email address, date of birth / age and rating
345 | P a g e
Quiz table with Quiz ID or date or file name as the Primary Key.
… containing at least the other field(s) not used as the PK
A joining table with an appropriate name including at least fields for user
identification, quiz identification and score
… with an appropriate Primary Key
and Foreign Keys matching the Primary Keys of the other two tables
USER(Username, Email, DateOfBirth, Rating)
QUIZ(QuizID, Date, Filename)
USER_QUIZ(Username, QuizID, Score)
The company is using a Database Management System (DBMS) to set up the database.
Describe what is meant by the following DBMS features:
Data dictionary:
Data about the data in the database // metadata
Identifies the characteristics of the data that will be stored
Appropriate example e.g. field names, table name, validation rules, data
types, primary / foreign keys, relationships etc.
Logical schema:
Conceptual design
Platform/database independent overview of the database
Is used to design the physical structure
Appropriate example e.g. Design of entities / E-R diagram / views
The company has another database, FARMING, for a different game.
The database FARMING has a table named EVENT which is shown with some sample data.
346 | P a g e
The database FARMING has a second table created named PLAYER that has the primary
key PlayerID.
The field PlayerID in EVENT needs to be set up as a foreign key to link to PlayerID in
PLAYER.
Write a Structured Query Language (SQL) script to change the table definition for EVENT
to link the foreign key to PLAYER.
ALTER TABLE EVENT
ADD FOREIGN KEY(PlayerID)REFERENCES PLAYER(PlayerID);
Write an SQL script to return the number of events that each player has completed
SELECT PlayerID, COUNT(EventID)
FROM EVENT
GROUP BY PlayerID;
An assessment board wants to store the marks students achieved in exams in a database
named
RECORDS.
Part of the database design includes these two tables:
EXAM(ExamID, Subject, Level, TotalMarks)
EXAM_QUESTION(ExamQuestionID, ExamID, QuestionNumber, Question, MaxMark)
Identify the relationship between EXAM and EXAM_QUESTION.
1-to-many
347 | P a g e
Sample data for the table EXAM is shown:
Write a Structured Query Language (SQL) script to define the table EXAM
CREATE TABLE EXAM(
ExamID varchar NOT NULL,
Subject varchar,
Level int,
TotalMarks int,
PRIMARY KEY(ExamID)
);
The table EXAM_QUESTION has been created but the foreign key has not been linked.
Write an SQL script to update EXAM_QUESTION and link the foreign key to EXAM
ALTER TABLE EXAM_QUESTION
ADD FOREIGN KEY (ExamID) REFERENCES EXAM(ExamID);
The database also needs to store data about the students, the exams the students have
taken and the marks the students achieved in each question of each exam.
Describe the additional tables that will need to be included in the database and explain how
all the tables in the database will be linked.
STUDENT table identified with suitable Primary Key
A linking table between STUDENT and EXAM with suitable Primary Key
and appropriate name
… that includes the Primary Key of the STUDENT table as a Foreign Key
to join with STUDENT
348 | P a g e
and includes the Primary Key of the EXAM table as a Foreign Key to
join with EXAM
A linking table between STUDENT and EXAM_QUESTION with suitable
Primary Key and appropriate name
… that includes the Primary Key of Table 2 as a Foreign Key to join with
Table 2
… that stores the ExamQuestionID and the mark for that question
A theatre wants to use a database to store data about the shows that are scheduled, their
customers and the seats that the customers have booked.
In the theatre:
• Each show can take place on multiple dates.
• Some dates can have more than one performance.
• There are multiple rows of seats.
• Each seat can be individually booked by its row letter and seat number, for example row E
seat 2.
Part of the database design includes these tables:
SHOW(ShowID, Title, Duration)
SEAT(SeatID, RowLetter, SeatNumber)
PERFORMANCE(PerformanceID, ShowID, ShowDate, StartTime)
Identify the relationship between the tables PERFORMANCE and SHOW.
many to 1 // there are many performances of each show
Sample data for the table PERFORMANCE is shown:
349 | P a g e
Write a Structured Query Language (SQL) script to define the table PERFORMANCE.
CREATE TABLE PERFORMANCE(
PerformanceID varchar NOT NULL,
ShowID varchar,
ShowDate Date,
StartTime Time,
PRIMARY KEY(PerformanceID),
FOREIGN KEY(ShowID) REFERENCES SHOW(ShowID)
);
Write an SQL script to return the number of times each show is scheduled. For example, in
the sample data in part (b), the show MK12 is scheduled three times.
The result needs to include the show name and a suitable field name for the number of times
it is scheduled.
Example 1:
SELECT SHOW.Title, Count(PERFORMANCE.PerformanceID)
AS NumberOfShowings
FROM PERFORMANCE, SHOW
WHERE PERFORMANCE.ShowID = SHOW.ShowID
GROUP BY SHOW.Title;
Example 2:
SELECT SHOW.Title, Count(PERFORMANCE.PerformanceID)
AS NumberOfShowings
350 | P a g e
FROM PERFORMANCE INNER JOIN SHOW
ON PERFORMANCE.ShowID = SHOW.ShowID
GROUP BY SHOW.Title;
Customers give their first name, last name and email address when they are making a
booking. One booking can include multiple seats.
Describe the additional tables that will need to be included in the database and explain how
these tables will be linked within the database.
CUSTOMER table identified with suitable Primary Key and appropriate
name
… and other suitable fields including name and email
BOOKING TABLE identified with suitable Primary Key and appropriate
name
… that stores the Primary Key of the CUSTOMER table as a Foreign Key
to join with CUSTOMER table
… and stores the Primary Key of the PERFORMANCE table as a Foreign
Key to join with PERFORMANCE table
A linking table between Table 2 and SEAT with suitable Primary Key and
appropriate name
… that includes the Primary Key of Table 2 as a Foreign Key to join with
Table 2
… that stores the SeatID
A shop repairs electronic devices, for example mobile phones and tablet computers. The shop
owner stores the data about the repairs using a file-based approach.
Give one limitation of using a file-based approach to store the data and explain how a
relational database addresses this limitation.
Data redundancy // data duplication
• Separate linked tables are used
• Data items are stored once so reduces data duplication / data
redundancy
Data inconsistency / Poor data integrity
351 | P a g e
• Data changed once in one place will automatically update elsewhere
• Linked data cannot be entered differently in two tables
• Referential integrity can be enforced
The data structure used depends on the application
• Changes to the data structure are managed by the DBMS
• … and queries are not dependent on the structure of the data
• … and changes to the data do not require programs to be re-written
The shop owner creates a relational database called FIXIT.
The database stores data about the customers and the devices for repair.
Some devices need new parts that are ordered from suppliers.
The database FIXIT is designed to include the following tables:
PART(PartID, Description, Price, SupplierID)
CUSTOMER(CustomerID, FirstName, LastName, ContactNumber)
REPAIR(RepairNumber, StartDate, EndDate, CustomerID, Device)
REPAIR_PART(PartID, RepairNumber, Quantity)
Complete the entity-relationship (E-R) diagram for the given tables
352 | P a g e
Write a Structured Query Language (SQL) script to define the table REPAIR_PART.
Include constraints (restrictions) on the data that can be entered into each field where
Appropriate
CREATE TABLE REPAIR_PART(
PartID VARCHAR(20) NOT NULL,
RepairNumber VARCHAR(4) NOT NULL,
Quantity INT NOT NULL,
PRIMARY KEY (PartID, RepairNumber)
);
Suppliers send invoices to the company for the parts that are used. A new table,
INVOICE, stores the data about each invoice and whether it has been paid or not.
The design for the table INVOICE is shown:
INVOICE(InvoiceID, SupplierID, AmountDue, Paid, DatePaid)
The table shows sample data for the table INVOICE.
Write an SQL script to return the total amount due to the supplier with the ID of JK675 for
353 | P a g e
all the invoices that have not currently been paid.
SELECT SUM(AmountDue)
FROM INVOICE
WHERE SupplierID = "JK675" AND Paid = FALSE;
Complete the table by writing a definition for each of the database terms.
A company uses a relational database to store data about its customers, employees and the
individual repair jobs that customers have booked.
Explain the benefits of using a relational database instead of a file-based approach.
• There is reduced data redundancy // less repeated data
• … because each item of data is only stored once
• Data consistency is maintained // Data integrity is improved
• … changes in one table will automatically update in another
• ... linked data cannot be entered differently in two tables
• Program-data independence is ensured
• … changes to the data do not require programs to be re-written // queries
are not dependent on the structure of the data
• Complex queries are easier to run
• Different views can be provided
• …. so users can only see specific aspects of the database
354 | P a g e
• Multiple concurrent access is possible
• ... through record locking
The company decides which employees will work on each repair job. An employee can log
into the database to access information about their repair jobs.
The database is normalised and includes these tables:
• CUSTOMER stores personal data about each customer
• EMPLOYEE stores personal data about each employee
• LOGIN_DATA stores the username and password for each employee
• JOB stores the data about each repair job
• JOB_EMPLOYEE stores the employees that are working on each repair job.
Identify each relationship between the database tables and explain how each relationship
can be implemented in the normalised database.
• CUSTOMER to JOB is 1 to many
• … implemented by Primary Key in CUSTOMER is Foreign Key in JOB
• EMPLOYEE to LOGIN_DATA is 1 to 1
• … implemented by Primary Key in EMPLOYEE is Foreign Key in
LOGIN_DATA
• JOB to JOB_EMPLOYEE is 1 to many
• … implemented by Primary Key in JOB is Foreign Key in
JOB_EMPLOYEE
• EMPLOYEE to JOB_EMPLOYEE is 1 to many
• … implemented by Primary Key in EMPLOYEE is Foreign Key in
JOB_EMPLOYEE
The database also has the table INVOICE that stores data about each invoice that is
sent to a customer.
Example data from the table INVOICE is given.
355 | P a g e
Write a Structured Query Language (SQL) script to return the total amount of all the
invoices sent in the year 2023 that have been paid.
SELECT SUM(Amount)
FROM INVOICE
WHERE Paid = "Y"
AND DateSent >= #01/01/2023# AND DateSent <=
#31/12/2023#
A company makes ice cream and sells it to shops.
The ice cream is made in batches: a large quantity of one type and flavour of ice cream that is
then split into smaller quantities for sale.
The company’s owner has designed a relational database, ICECREAM, to store data about their
ice cream and customers.
Some of the tables in the database are given. The database is not normalised.
BATCH(BatchID, Type, Flavour, Size, SellingPrice, EndDate)
CUSTOMER(CustomerID, CompanyName, EmailAddress, TelephoneNumber)
SALE(SaleID, BatchID, CustomerID, Quantity, Date)
Identify two foreign keys in the table SALE and the table that each foreign key references.
• Foreign key: BatchID, table BATCH
• Foreign key: CustomerID, table CUSTOMER
Write an SQL script to return the total quantity of ice cream sold to the customer with the ID of
0034E in the year 2023.
SELECT SUM(Quantity)
FROM SALE
WHERE CustomerID = "0034E"
356 | P a g e
AND Date >= #01/01/2023# AND Date <= #31/12/2023#;
The table definition for BATCH is repeated here:
BATCH(BatchID, Type, Flavour, Size, SellingPrice, EndDate)
Sample data for the table BATCH is given:
357 | P a g e
SellingPrice)
Complete the following table by defining each database term.
Entity:
• A real-life object that is represented as a table
Attribute:
• An item of data about an entity
A Database Management System (DBMS) supports data integrity.
Explain how a DBMS supports data integrity.
• Referential integrity is enforced
• … such as cascade update/delete // if the data is changed in one place it
is updated in every other place
• ... and ensures each foreign key has a corresponding primary key
9. Security
Describe two methods of preventing accidental loss of data.
• frequent (or equivalent) backup EITHER to secondary media/to 3rd party
server/cloud/removable devices/continuous backup OR stored remotely
• disk-mirroring strategy/RAID
• UPS (uninterruptable power supply)/backup generator
Describe one way of ensuring the security of the data against malicious damage.
• protection of data (or equivalent) with passwords/using password and username for logging on
include e.g. fingerprint scanning
• encryption
• installation and use of up to date anti-malware/anti-virus
• give different access rights to different users
• use a firewall,
• physical methods/lock doors and use secure entry devices/CCTV
Give the definition of the terms firewall and authentication. Explain how they can help with the
security of data.
Firewall
• sits between the computer or LAN and the Internet/WAN and permits or blocks traffic to/from
the network
358 | P a g e
• can be software and/or hardware
• software firewall can make precise decisions about what to allow or block as it can detect
illegal attempts by specific software to connect to Internet
• can help to block hacking or viruses reaching a computer
Authentication
• process of determining whether somebody/something is who/what they claim to be
• frequently done through log on passwords/biometrics
• because passwords can be stolen/cracked, digital certification is used
• helps to prevent unauthorised access to data
Describe two differences between data integrity and data security
• integrity deals with validity of data/freedom from errors/data is reasonable
• security deals with protection of data
• security protects data from illegal access/loss
• integrity deals with making sure data is not corrupted after, for example, being transmitted
State two ways of maintaining data integrity at the input stage. Use examples to help explain
your answer
• validation (to ensure data is reasonable)
• examples include range checks, type checks, length checks, …
• verification (checks if data input matches original/if transmitted data matches original)
• can use double data entry or visual check/other methods such as parity checks
• doesn’t check whether or not data is reasonable
State two ways of maintaining data integrity during data transmission. Use examples to help
explain your answer.
• parity checking
• one of the bits is reserved as parity bit
• e.g. 1 0 1 1 0 1 1 0 uses odd parity
• number of 1s must be odd • parity is checked at receiver’s end
• a change in parity indicates data corruption
• check sum
• adds up bytes in data being sent and sends check sum with the data
• calculation is re-done at receiver’s end
359 | P a g e
• if not the same sum then the data has been corrupted during transmission
Give a brief description of each of the following terms:
validation
– check whether data is reasonable / meets given criteria
verification
– method to ensure data which is copied / transferred is the same as the original
– entering data twice and computer checks both sets of data
– check entered data against original document / source
Explain what is meant by a parity check. Give an example to illustrate your answer
– parity can be even or odd
– parity check uses the number of 1s in a binary pattern
– if there is an even / odd number of 1s, then the parity is even / odd
– following transmission …
– parity of each byte checked
– a parity bit is used to make sure binary pattern has correct parity
– example: 1 0 0 1 0 1 1 1 has parity bit set to 1 in MSB since system uses odd parity
(original data: 0 0 1 0 1 1 1 which has four 1 bits)
Explain the term computer virus
– malicious code / software / program
– that replicates / copies itself
– can cause loss of data / corruption of data on the computer
– can cause computer to “crash” / run slowly
– can fill up hard disk with data
A virus checker has been installed on a PC. Give two examples of when a virus checker should
perform a check.
– checks for boot sector viruses when machine is first turned on
– when an external storage device is connected
– checks a file / web page when it is accessed / downloaded
Describe what is meant by these terms. For each method, explain why it is needed.
Verification
360 | P a g e
– needed to ensure that the data entered exactly matches the original source/data is consistent
– comparison of two versions of the data
– examples include double entry, visual checking, proof reading etc...
– does not check data is sensible/acceptable
Validation
– needed to check that the data entered is sensible/reasonable/acceptable/matches required
criteria
– automatic check by computer
– examples include range, type, length, etc.
– does not check data is correct
Give a brief description of each of the following terms:
Validation
– check whether data is reasonable / meets given criteria
Verification
– method to ensure data which is copied / transferred is the same as the original
– entering data twice and computer checks both sets of data
– check entered data against original document / source
Data are to be transferred between two devices. Parity checks are carried out on the data.
Explain what is meant by a parity check. Give an example to illustrate your answer.
– parity can be even or odd
– parity check uses the number of 1s in a binary pattern
– if there is an even / odd number of 1s, then the parity is even / odd
– following transmission …
– parity of each byte checked
– a parity bit is used to make sure binary pattern has correct parity
– example: 1 0 0 1 0 1 1 1 has parity bit set to 1 in MSB since system uses odd parity
(original data: 0 0 1 0 1 1 1 which has four 1 bits)
Explain the term computer virus.
– malicious code / software / program
– that replicates / copies itself
361 | P a g e
– can cause loss of data / corruption of data on the computer
– can cause computer to “crash” / run slowly
– can fill up hard disk with data
Give two examples of when a virus checker should perform a check.
– checks for boot sector viruses when machine is first turned on
– when an external storage device is connected
– checks a file / web page when it is accessed / downloaded
Describe the difference between security and integrity of data.
• Security is keeping the data safe.
• Integrity is making sure that the data is correct / valid.
• Security is the prevention of data loss.
• Integrity ensures that the data received is the same as the data sent / data copied is the
same as the original.
• Example of ensuring security, e.g. usernames and passwords, firewalls etc...
• Example of ensuring integrity, e.g. parity checks, double entry etc...
Describe three security measures that the bank could implement to protect its electronic data.
• Installing a firewall and ensuring it is switched on.
• To stop unauthorised access / hackers gaining access to the bank’s computer network.
• Use authentication methods such as passwords and usernames.
• Passwords should be strong / biometrics.
• Encrypt the data.
• So that if data is accessed it will be meaningless / only accessed by those with
decryption key.
• Set up access rights...
• To stop users reading/editing data they are not permitted to access.
• Installing and running an up to date anti-malware program (anti-virus/anti-spyware etc.).
• To detect / remove / quarantine viruses / key-loggers etc.
• Make regular backups of the data.
• To separate device or off site to enable recovery if necessary.
• Employ measures for physical security.
362 | P a g e
• Example of a measure for physical security.
Explain why each answer is incorrect.
“Encryption prevents hackers breaking into the company’s computers.”
• Hackers can still access the data (and corrupt it, change it or delete it)
• Encryption simply makes data incomprehensible (without decryption key / algorithm)
“Data validation is used to make sure that data keyed in are the same as the original data
supplied.”
• This is an explanation of data verification (not validation)
• Data validation ensures that data is reasonable / sensible / within a given criteria
• Original data may have been entered correctly but is not reasonable (e.g. age of
210)
“The use of passwords will always prevent unauthorised access to the data stored on the
computers.
• A password does not prevent unauthorised access, it makes it more difficult
• Password can be guessed (if weak) // Password can be stolen // A relevant example
of misappropriation of password
Name two security measures to protect computer systems.
• Physical measures
• Access rights
• Encryption
• Firewall
• Use authentication methods such as usernames and passwords
• Anti-malware
The Patient ID is a seven digit number. The database designer decides to use a check
digit to verify each foreign key value that a user keys in for a Patient ID.
When a user assigns a primary key value to a Patient ID, the DBMS adds a modulus-11
check digit as an eighth digit. The DBMS uses the weightings 6, 5, 4, 3, 2 and 1 for
calculating the check digit. It uses 6 as the multiplier for the most significant (leftmost)
digit.
Show the calculation of the check digit for the Patient ID with the first six digits 786531.
363 | P a g e
Name and describe two validation checks that the DBMS could carry out on each primary key
value that a user keys in for a Patient ID.
Uniqueness check
Each PatientID must be unique
Length check
Each PatientID is exactly 7 characters
Format check / Type check
All 7 characters must be digits
Presence check
PatientID must be entered
Explain the difference between security and privacy of data.
• Security is keeping the data safe
• From accidental / malicious damage /loss
• By example of need for security
• Privacy is the need to restrict access to personal data
• To avoid it being seen by unauthorised people
• By example of need for privacy
Give an example for this application where privacy of data is a key concern.
364 | P a g e
For example: Personal data of students / staff
Name and describe two security measures the Network Manager has in place to protect the
security of the data held in the DBMS.
Physical measures
• Locked doors/keyboards etc.
• Secure methods of access, keypads/ biometric scans etc.
Backup of data
• Regular copies of the data are made
• If the data is corrupted it can be restored
Disk-mirroring
• All activity is duplicated to a second disk in real time so that if the first disk fails
there is a complete copy available
Access rights
• Different access rights for individuals/groups of users
• To stop users editing data they are not permitted to access
• By example
Encryption
• If accessed, data cannot be understood by unauthorised personnel
• Accessed only by those with the decryption key
Firewall
• To stop unauthorised access/hackers gaining access to the computer network
Use authentication methods such as passwords and usernames
• Passwords should be strong / biometrics
• To prevent unauthorised access to data
Anti-malware program
• To detect / remove / quarantine viruses / key-loggers etc.
• Carrying out regular scans
Concurrent Access Controls // Record locking
• Closes a record to second user until first update complete
• To prevent simultaneous updates being lost
365 | P a g e
Describe what is meant by verification
• Checking that the data entered matches / is consistent with that of the source.
• Comparison of two versions of the data
• Examples include double entry, visual checking, proof reading etc...
• In the event of a mismatch – the user is forced to re-enter the data
• By example, e.g. creation of a password
• Does not check data is sensible/acceptable
Parity is not the only method to verify the data has been sent correctly.
Name and describe one other method of data verification during data transfer
• Check sum
• A calculation is done on a block of data
• The result is transmitted with the data
• Calculation repeated at receiving end
• Results compared
• If different an error has occurred
• Hash total
• Total of several fields of data
• Including fields not usually used in calculations
• The result is transmitted with the data
• Calculation repeated at receiving end
• Results compared
• If different an error has occurred
Put one tick (3) in each row to indicate whether the measure is validation or verification.
366 | P a g e
State what is meant by data integrity. Give an example of how the manager can ensure data
integrity in the PURPLEGAME database.
• Ensure data is consistent / accurate // keep data consistent / accurate
• Validation rules
• Referential integrity
• Verification
• Input masks
• Setting data types
• Removing redundant data
• Backup data
• Access controls
• Audit trail
Draw one line from each error detection measure to indicate whether it is verification or
Validation
Kim needs to make sure the program is secure against unauthorised access. She has already
set up a username and password on her laptop.
Identify two additional electronic measures that Kim can use to keep the program secure
• Biometric authentication // by example
• Two-step authentication // by example
367 | P a g e
• Firewall / proxy
• Encryption
• Different access rights for different users
• Password protect file (using a different password)
• Anti-malware
Users need to enter their name and email address to create an account. The information is
stored in a database on Arnold’s computer.
Give three ways that Arnold can ensure users’ details are kept secure.
• Firewall / proxy
• Encryption
• Username and Password
• Physical security
• Biometric authentication // by example
• Two-step authentication // by example
• Anti-malware
The software company stores information about customers and the software licences they
have purchased. The company considers a file-based approach for the storage and retrieval
of data.
Give three limitations of a file-based approach to store the data
• Data redundancy // data is repeated in more than one file
• Data dependency // changes to data means changes to programs
accessing that data
• Lack of data integrity // entries that should be the same can be different
in different places
• Lack of data privacy // all users have access to all data if a single flat file
The software development company uses data backup and disk-mirroring to keep their data
secure.
Explain how data backup and disk-mirroring allow the company to recover from data loss
Data backup
• A copy of data will have been made and stored elsewhere.
368 | P a g e
• If the original is lost, the backup can be used to restore the data.
Disk-mirroring
• The data is stored on two disks simultaneously.
• If the first disk drive fails, the data is accessed from the second disk.
Explain the difference between security and integrity
• Security ensures that data is safe from unauthorised access // safe from
loss
• Integrity ensures that data is accurate / consistent / up to date
Name and describe two security features provided by a DBMS
• Access rights // User accounts
• Restrict actions (e.g. read / read-write) of specific users // unauthorised
users cannot access the database
• Views
• Restrict which parts of the database specific users can see
• Password // Biometrics // PIN code
• Prevents unauthorised access
• Automatic Backup
• Create regular copies of data in case of loss
• Encryption
• Data is incomprehensible to unauthorised users
• User accounts
• User has a username and password Access to resources can be limited
to specific accounts
• Cannot access system without valid username and password // prevents
369 | P a g e
unauthorised access to the system
• Firewall
• All incoming and outgoing network traffic goes through firewall
• Blocks signals that do not meet requirements
• Keeps a log of signals
• Applications can have network access restricted
• Anti-malware
• Scans for malicious software
• Quarantines or deletes any malicious software found
• Scans can be scheduled at regular intervals
• Should be kept up to date
• Auditing
• Logging all actions/changes to the system
• In order to identify any unauthorised use
• Application Security (accept equivalent)
• Applying regular updates / patches
• Finding, fixing and preventing security vulnerabilities in any (installed)
Application
Identify two ways Mica can prevent illegal copies of the software being installed
• Encryption
• Assign a unique code so it will not install without this // product key
• Limit the number of times that version of the software can be installed
• Set a time limit within which the software must be installed
Identify one way Mica can distribute the software without the source code
• Provide an .exe file // Compile the source code // Use a compiler
The supermarket is concerned about the security and integrity of the data on the server.
Identify two methods that can be used to minimise the security risk to the data, and one
method to protect the integrity of the data.
Security
370 | P a g e
• encryption
• access rights
• username and password // biometrics // user accounts
• backup // disk mirroring
• firewall
• Physical methods (e.g. CCTV, locked rooms etc.)
Integrity
• checksum
• parity
• validation on input
A computer program makes use of data validation routines and verification of data input.
Complete these two sentences about data validation and verification.
Validation checks that the data entered is reasonable. One example is a
presence check.
Verification checks that the data entered is the same as the original. One
example is double entry.
The program is installed on a computer system that has security measures in place to protect
its data.
Complete the following table.
The company needs to keep the data on its servers secure from online threats.
Describe how a firewall will help to protect the data on the servers from online threats.
371 | P a g e
• Prevents unauthorised access to the data
• Monitors incoming and outgoing traffic
• Blocks transmissions from unauthorised sources / websites / ports
• Maintains an allow list / deny list of IP addresses
Give one additional security measure that the company can use to protect the data on
the servers from online threats.
• Running up-to-date antivirus software
• Use of proxy server
• Strong / Biometric passwords
• Etc.
Wei is developing a program. He wants to make sure the source code is secure on his laptop.
Explain how encrypting the source code can keep it secure
• Encryption scrambles the source code (so it is meaningless)
• … using an encryption key / algorithm
• If the file is accessed without authorisation it will be meaningless
• It requires a decryption key / algorithm to unscramble
New pet owners complete a paper-based form to register their pets at the surgery
Describe two verification checks that can be carried out when the data from the paperbased
form is entered into the database.
• Double entry // The data from the form is entered twice (by two different
people)
• and automatically compared
• Visual check // the data is compared (by two different people) after entry
• ... to the paper form manually
Appointments can be booked between 09:00 and 16:50 on Monday to Friday.
Describe the ways in which the appointment date and time can be validated to make
sure they are reasonable
• Time can have range check to make sure it is within the opening hours
of 09:00 and 16:50
• Date can have existence check to compare against list of dates they are
372 | P a g e
Open
The surgery wants to keep all data secure. The surgery network is not connected to the
Internet.
Identify two authentication techniques the surgery could use to restrict access to the
data.
• Usernames and Passwords
• Biometrics // fingerprint recognition // iris scanner
• Two-step verification
• Token authentication // use of dongle // swipe cards
The teacher wants to implement validation to make sure that all data entered into the
database RESULTS are reasonable.
Name three different methods of data validation that can be used in the RESULTS
database. Describe how each method will limit the data that can be entered in this
database.
• Length check
• Limit the target grade to 1 character
• Range check
• The mark for each test must be between 0 and MaxMarks
• Existence check
• The test topic must be in a pre-existing list
• Presence check
• A mark must be entered / not null
• Format check
• The data for a class must be one digit followed by one letter, e.g.3A
• Type check
• The maximum marks for a test must be an integer
The teacher stores the database on the desktop computer in her classroom.
Explain why it is important to keep the database secure.
373 | P a g e
• Stop unauthorised access // limit access to personal data about students
• Prevent loss of data // avoid students’ test mark being deleted.
• Prevent unauthorised changes to data // prevent students changing
grades
Explain the ways in which the teacher can use data backup and disk mirroring to limit the
amount of data lost in the event of hardware failure.
Backup
• A copy of the RESULTS database is made
• ... at regular intervals // Sensible frequency of backups, e.g. daily, weekly
etc.
• ... and stored in a different location
• So, in the event of data loss, (most of) the original data may be
recovered.
Disk mirroring
• Data is written to different disks simultaneously
• So, in the event of hardware failure, a second identical copy is
immediately available.
The laptop includes a parity bit in each byte it transmits.
Explain how parity checks protect the integrity of the data.
• Automatically checks for errors on receipt of data
• Alerts if data has been received incorrectly // requests data to be re-sent
• Provides a verification check on data
Zak’s company holds details about clients in a database.
Give three security measures that Zak can implement to make sure that only authorised
employees can access the data.
• Password
• Biometrics
• Access rights
• Swipe cards
374 | P a g e
• Physical access measures, e.g. security guards
• Implement a firewall/proxy to monitor remote access requests
• Two-step authentication
Complete the following table by identifying the most appropriate term for each description.
Each term must be different.
Checksum is one method used for verification of transmitted data within a network.
Name and describe one other method of verifying transmitted data.
Parity check
• Counts if the number of 1s or 0s in each byte is odd or even
• Adds a bit to make the number odd or even
• Parity is re-calculated at receiving end and a change in parity indicates
corruption
Upali works for a company that stores data on a web server.
Describe two security measures that can be used to protect a web server from unauthorised
access.
• Firewall
• …denies access to data that does not conform to set rules
• ... maintains a blacklist/whitelist of IP addresses
• Proxy
• …denies access to data that does not conform to set rules
375 | P a g e
• … prevents some requests ever reaching the server
• Authentication
• ... makes use of usernames and strong passwords...
• ... without a correct unique combination of characters data on the server
cannot be accessed
• ... makes use of biometrics ...
• ... unique features of individuals that cannot be guessed
• ... makes use of two step verification ...
• ... a verification code is sent to a mobile phone or other device
The field WkPhoneNumber cannot be empty and must have a maximum of 14 characters.
Describe two ways the field WkPhoneNumber can be validated.
• Presence check
• …to make sure the phone number is entered // to make sure the field is
not left empty
• Length check
• …to make sure there are a maximum of 14 characters
Each of the following algorithms performs data validation.
State the type of validation check that each of the algorithms performs.
Range (check)
376 | P a g e
Presence (check)
Existence (check)
A company has several security measures in place to prevent unauthorised access to the data
on
its computers.
Describe the difference between the security and privacy of data.
• Security protects data against loss
• Privacy protects data against unauthorised access
Each employee has a username and password to allow them to log onto a computer. An
employee’s access rights to the data on the computers is set to either read-only, or read and
write.
Identify one other software-based measure that could be used to restrict the access to the
data on the computers.
• Two factor authentication
• Biometric passwords
• Key Card Access
377 | P a g e
• Firewall
The company is also concerned about threats posed by networks and the internet.
Identify two threats to the data that are posed by networks and the internet.
• Malware // viruses // spyware // by example
• Hacking
• Phishing
• Pharming
Xanthe wants to maintain the integrity and security of data stored on her computer
Explain the difference between data security and data integrity.
• security is protecting data from loss / corruption
• integrity is ensuring the consistency / accuracy of the data
Xanthe uses both data validation and data verification when entering data on her computer.
Describe how data validation helps to protect the integrity of the data. Give an example
in your answer.
• validation checks that data is reasonable / sensible
• example e.g. checking data is the right number / type of characters
Describe how data verification helps to protect the integrity of the data. Give an example
in your answer.
verification checks that data is the same as the original
• by example e.g. double entry
Two malware threats are spyware and viruses.
Give two similarities and one difference between spyware and a virus
Similarity
• Both are pieces of malicious software
• Both are downloaded / installed/run without the user's knowledge
• Both can pretend to be / are embedded in other legitimate software when
downloaded // both try to avoid the firewall
• Both run in the background
Difference
• Virus can damage computer data; spyware only records / accesses data
378 | P a g e
• Virus does not send data out of the computer; spyware sends recorded
data to third party
• Virus replicates itself; spyware does not replicate itself
Describe the ways in which access rights can be used to protect the data in Javier’s database
from unauthorised access.
• Access rights give managers / himself access to different elements
• … by having different accounts / logins
• … which have different access rights e.g. read only // no access / read /
write
• Specific views can be assigned to himself and to the managers
• … e.g. managers can only see the data for their own shop(s)
Checksum is one method used for verification of transmitted data within a network.
Name and describe one other method of verifying transmitted data.
Parity check
• Counts if the number of 1s or 0s in each byte is odd or even
• Adds a bit to make the number odd or even
• Parity is re-calculated at receiving end and a change in parity indicates
corruption
Echo check
• Receiver sends data back to sender
• Sender compares data received with original
• Sender either confirms or resends data
Automatic repeat request (ARQ)
• Uses error detection method to detect errors in individual packets
• Sends a negative acknowledgement if an error
• Uses timeouts to detect missing packets
• Automatically asks for a repeat of the data from the sender
Upali works for a company that stores data on a web server.
Describe two security measures that can be used to protect a web server from unauthorised
access.
379 | P a g e
• Firewall
• …denies access to data that does not conform to set rules
• ... maintains a blacklist/whitelist of IP addresses
• Proxy
• …denies access to data that does not conform to set rules
• … prevents some requests ever reaching the server
• Authentication
• ... makes use of usernames and strong passwords...
• ... without a correct unique combination of characters data on the server
cannot be accessed
• ... makes use of biometrics ...
• ... unique features of individuals that cannot be guessed
• ... makes use of two step verification ...
• ... a verification code is sent to a mobile phone or other device
The field WkPhoneNumber cannot be empty and must have a maximum of 14 characters.
Describe two ways the field WkPhoneNumber can be validated
• Presence check
• …to make sure the phone number is entered // to make sure the field is
not left empty
• Length check
• …to make sure there are a maximum of 14 characters
A teacher is writing examination papers on a laptop computer. The computer is connected to the
internet. The teacher is concerned about the security and privacy of the papers.
State the difference between the security of data and the privacy of data.
Security prevents against loss while privacy prevents unauthorised access
Identify and describe two threats to the data. Identify one security measure to protect against
each threat. Each security measure must be different.
Malware
Malicious software that replicates and can delete/damage the
examination papers
380 | P a g e
Install and run anti-malware
Hacker/unauthorised access
Illegal access in order to delete/damage the examination papers
Use a firewall // strong passwords
Spyware
Software installed on the computer without the teacher’s knowledge
which records keystrokes and sends the data gathered about the
examination papers to a third party
Use a firewall / install and run anti-spyware / use a virtual (onscreen)
Keyboard
The mark a student is awarded in a test will be entered into the database. This mark needs to
be a whole number between 0 and the maximum number of marks for that test (inclusive).
Explain how data validation and data verification can be used when a mark is entered
range check to make sure it is between 0 and max marks
presence check to make sure a mark is entered
type check to make sure an integer value is entered
double entry - enter the mark twice and the computer compares them
visual check – manually compare the mark entered with the mark on the
input document
A school stores personal data about its staff and students on its computer system
Explain why the school needs to keep both its data and its computer system secure from
unauthorised access.
Data
Data needs protecting from someone amending / deleting or taking it
Computer System
Computer system need protecting to stop people for example, installing
malware or damaging the system
Complete the table by identifying two security threats to the data on a computer.
Describe each threat.
Give a different prevention method for each threat.
381 | P a g e
Data is encrypted when it is transmitted within the school network, or externally such as over
the internet.
Describe what is meant by encryption and explain why it is used
Data is turned into cipher text // Data is encoded
Used so that it cannot be understood if intercepted without the
decryption key
Draw one line from each security feature to its most appropriate description
382 | P a g e
State the difference between data verification and data validation.
data verification is checking if input data is the same as the original whereas
data validation is checking that the data is reasonable / sensible
A checksum can be used to detect errors during data transmission.
Describe how a checksum is used.
• checksum value is calculated from the data before transmission //
correct description of a checksum algorithm
• ... this calculated value is transmitted with the data
• receiving computer recalculates the checksum from the received data
• if the checksum received and calculated match, no error has occurred //
if the checksum received and calculated do not match, an error has
occurred
One validation method is a presence check.
383 | P a g e
Describe two other validation methods that can be used to validate non-numeric data.
• to make sure data is in the required format // only expected characters
allowed
• to make sure the data is already present in the system
• to make sure the data contains the correct number of characters
• to ensure that non-numeric data is entered
A student uses a networked laptop computer to send an email to a colleague
Explain how a digital signature ensures the email is authentic.
• (email) message put through hashing algorithm to produce a digest
• Digest encrypted with sender’s private key (to create the digital signature)
• the (digital) signature can only be decrypted with matching sender’s
public key
Describe how a firewall protects the data on the computer.
• monitors incoming and outgoing packets / traffic
• checks against an allow list / deny list of IP addresses // checks against
a set of rules for acceptable data / ports etc.
• blocks transmissions that do not meet criteria / rules // allows through is
satisfies the criteria /rules
Authentication is one method a Database Management System (DBMS) can use to improve
the security of a database.
Describe other methods that a DBMS can use to improve the security of a database.
• Backup / recovery procedures
• … automatically takes copies of the database and store off site on a
regular basis / weekly, etc.
• ... so that the data can be recovered if lost
• Use of access rights
• … some users are given different access permissions to different tables
• ... read/write, read only, full access, etc.
• Views
• … different users are able to see different parts of the database
384 | P a g e
• ... only see what users need to see // by example
• Record and table locking
• … prevents simultaneous access to data
• ... so updates are not lost // data is not overwritten
• Encryption
• ... the data is turned into ciphertext
• ... so it cannot be understood without a decryption key
State the meaning of privacy of data.
Either
• Ensuring data can only be accessed by / disclosed to authorised persons
Or
• Ensuring data cannot be accessed by / disclosed to unauthorised
persons
385 | P a g e
Firewall:
• Monitors incoming and outgoing traffic and rejects any traffic that does not
meet the set rules
Encryption:
• Ensures that if data is intercepted / obtained it cannot be understood
without the decryption key
Passwords:
• Ensures only users with the correct password can access the resources //
prevents unauthorised access
An example of a tutor ID is NK16C6.
An administrative officer enters the tutor ID into the TUTOR table.
Explain how data verification can be used when the tutor ID is entered
• The administrator completes a visual check / checks by eye
• …that the tutor identifier input matches the tutor identifier on the original
document
• Double entry check // the administrator (or a second person) enters the
number a second time
• …and the system compares it with the first entry
Data verification is one method of protecting the integrity of data.
Describe one other method of protecting the integrity of data.
• Validation // a validation method named or described
• …protects the data by ensuring that the data is reasonable / sensible and
within specified bounds
State one difference and one similarity between pharming and phishing.
Difference:
• Pharming is malicious code that redirects to a fake website. Phishing
uses an email to prompt user action.
• Pharming is automatic. Phishing requires user action.
Similarity:
• Both try to obtain financial or personal information
386 | P a g e
• Both are a false representation of an official organisation, e.g. a bank
• Both make use of fake websites
The bank wants to protect the integrity of its data while transferring the data to other banks.
Parity check is one example of data verification.
Complete the description of parity check when Computer A is transmitting data to Computer B
Computer A and Computer B agree on whether to use odd or even parity.
Computer A divides the data into groups of 7-bits. The number of 1s in each
group is counted. If the agreed parity is odd and the group has an even
number of 1s a parity bit of 1 is appended, otherwise a parity bit of 0 is
appended.
In a parity block check the bytes are grouped together, for example in a grid.
The number of 1s in each column (bit position) is counted. A bit is assigned to
387 | P a g e
each column to make the column match the parity. These parity bits are
transmitted with the data as a parity byte.
The bank also needs to keep its customers’ data private and secure
The bank’s network has a firewall.
Explain how a firewall can help protect the customers’ data.
Compares all incoming and outgoing transmissions
against set criteria/whitelist/blacklist
Blocks all transmissions that do not meet rules
Blocks data entering from specific ports
Blocks unauthorised/unknown internal software transmitting data
An assessment board scans exam papers and stores the digitised papers on a server. Exam
markers download the digitised papers to mark. The exam markers then upload the mark for
each
paper.
The assessment board needs to make sure the data stored on the server is secure.
Authentication methods can help to protect the server against hackers.
Identify one other security measure that helps to protect the server from hackers.
Describe how the security measure works.
Firewall
Checks incoming connections
against criteria
Blocks data from entering specific ports
Blocks data that does not meet whitelist that meets blacklist
Proxy server
Prevents devices accessing the web server directly
Intercepts any requests
Forwards the request using its own IP address
Screens returning data before sending it to the user
Identify one security measure that helps to protect the data when it is being transmitted
to its destination. Describe how the security measure works.
388 | P a g e
Encryption
Encodes/scrambles data
so if it is intercepted it cannot be understood
Algorithm/key is required to decode the data
The data from the robots is transmitted to a central computer using a wireless connection
Complete the table by identifying and describing two methods of data verification that
can be used during data transfer
Explain how encryption can protect the security of data during transmission.
Encodes/scrambles data
so if it is intercepted it cannot be understood
Algorithm/key is required to decode the data
The file containing the final program code will be sent by email for beta testing.
Identify one security method that can be used to protect the program code from unauthorised
access during email transfer.
Explain how your chosen method protects the program code.
Security method:
389 | P a g e
Encryption
Explanation
• File contents are converted to cipher text
• If intercepted the data cannot be understood without the decryption key
10. Memory
Five statements about DRAM and SRAM are shown below.
DRAM:
requires data to be refreshed periodically in order to retain the data
requires higher power consumption which is significant when used in battery-powered devices
SRAM
has more complex circuitry
does not need to be refreshed as the transistors hold the data as long as the power supply is on
used predominantly in cache memory of processors where speed is important
Describe three differences between RAM and ROM.
RAM
• loses contents when power turned off/volatile memory/temporary memory
• stores files/data/operating system currently in use
• data can be altered/deleted/read from and written to
• memory size is often larger than ROM
ROM
• doesn’t lose contents when power turned off/non-volatile memory/permanent memory
• cannot be changed/altered/deleted/read only
• can be used to store BIOS/bootstrap
DVD-RAM and flash memory are two examples of storage devices. Describe two differences in
how they operate
DVD-RAM
• data is stored/written using lasers/optical media
• DVD-RAM uses phase changing recording, in which varying laser intensities cause targeted
areas in the phase change recording layer to alternate between an amorphous and a crystalline
state.
• uses a rotating disk with concentric tracks
390 | P a g e
• allows read and write operation to occur simultaneously
flash memory
• most are NAND-based flash memory
• there are no moving parts
• uses a grid of columns and rows that has two transistors at each intersection
• one transistor is called a floating gate
• the second transistor is called the control gate
• memory cells store voltages which can represent either a 0 or a 1
• essentially the movement of electrons is controlled to read/write
• not possible to over-write existing data; it is necessary to first erase the old data then write the
new data in the same location
For each device, describe the type of media used.
Hard disk – magnetic (storage media)
DVD-RW – optical (storage media)
Flash memory – solid state (memory device)
Describe the internal operation of the following devices:
DVD-RW
– uses a single spiral track
– only allows write OR read operation to occur as separate operations
– requires special packet reading/writing software
– in order to write new data to the disc the existing data must be completely erased
– performance degrades/becomes unreliable after 1000 record/erase cycles
– single sided, 4.7Gb capacity
– disc rotates at different speeds/constant linear velocity
DVD-RAM
– uses several concentric tracks
– allows simultaneous read/write operations
– requires no special read/write software
– makes use of sectors to store data
– repeatedly read, write and erase/100000 record/erase cycles possible
391 | P a g e
– single or double sided, 4.7Gb capacity per side
– disc rotates at a constant speed/constant angular velocity
State two differences between Static RAM (SRAM) and Dynamic RAM (DRAM)
• DRAM has to be refreshed / charged
// SRAM does not request a refresh
• DRAM uses a single transistor and capacitor
// SRAM uses more than one transistor to form a memory cell
// SRAM has more complex circuitry
• DRAM stores each bit as a charge
// SRAM each bit is stored using a flip-flop / latch
• DRAM uses higher power( because it requires more circuitry for refreshing)
// SRAM uses less power (no need to refresh)
• DRAM less expensive (to purchase / requires fewer transistors )
// SRAM is more expensive (to buy as it requires more transistors)
• DRAM has slower access time / speed (because it needs to be refreshed)
// SRAM has faster access times
• DRAM can have higher storage / bit / data density
// SRAM has lower storage / bit / data density
• DRAM used in main memory
// SRAM used in cache memory
Describe two differences between RAM and ROM
• RAM loses content when power turned off / volatile memory / temporary memory
ROM does not lose content when power turned off / non-volatile memory / permanent
memory
• Data in RAM can be altered / deleted /read from and written to
ROM is read only / cannot be changed / altered /deleted
• RAM stores files / data/ operating system currently in use
ROM is used to store BIOS/ bootstrap / pre-set instructions
State three differences between Dynamic RAM (DRAM) and Static RAM (SRAM)
• DRAM has to be refreshed / charged
392 | P a g e
// SRAM does not request a refresh
• DRAM uses a single transistor and capacitor
// SRAM uses more than one transistor to form a memory cell
// SRAM has more complex circuitry
• DRAM stores each bit as a charge
// SRAM each bit is stored using a flip-flop/latch
• DRAM uses higher power (because it requires more circuitry for refreshing)
//SRAM uses less power (no need to refresh)
• DRAM less expensive (to purchase /requires fewer transistors)
// SRAM is more expensive (to buy as it requires more transistors)
• DRAM has slower access time / speed (because it needs to be refreshed)
// SRAM has faster access times
• DRAM can have higher storage /bit/data density
// SRAM has lower storage / bit /data density
• DRAM used in main memory
// SRAM used in cache memory
The user is considering the purchase of a new laptop computer. She has read many product
reviews and knows that there are different types of internal secondary storage available.
List two options for internal secondary storage.
Hard disk drive // HDD
Solid state drive //SSD // flash memory
One from:
Hard disk
Inexpensive per unit of storage
Larger storage capacity than flash drive
Solid state storage
No moving parts / noise
Robust
Low latency // Fast read/write time
The user is considering the purchase of a removable device for secondary storage.
393 | P a g e
Name one suitable device.
• External hard disk drive // SSD
• External CD / DVD drive
• Pen drive
• Blu-ray drive
Describe two possible uses for this device on a home Personal Computer (PC)
• Additional secondary file storage // storing files
• Backup of files
• Archiving of files
• Transfer files to second computer
394 | P a g e
• RAM can change and ROM (usually) can't be changed
• ROM is read only, RAM is read/write
Give one use for RAM in the games console
• Current game
• Currently running processes
• Current graphics/sound
Give one use for ROM in the games console.
• Start-up instructions / boot program
• Kernel of Operating System
Give the most appropriate secondary storage device for this computer system.
Describe two reasons for your choice.
Hard drive
• Large capacity...
• to store videos / images / sound files with large file sizes
• Reasonably fast access speed...
• Users will not have to wait for videos to load
• Inexpensive per unit storage...
• If a large number of needed for different exhibits, the cost can be kept low
• Does not need to be moved «
• So moving parts unlikely to be damaged
• Slower degradation of data «
• So will last longer / be more reliable under heavy use
Solid state
• Large capacity«
• To store videos/images/sound files with large file sizes
• Fast access speed...
• Users will not have to wait for videos to load
• Reliable...
• Can be dropped/damaged and will likely still work / no moving parts
• Quiet...
395 | P a g e
• No moving parts
This computer system has Random Access Memory (RAM) and Read Only Memory (ROM).
State what will be stored in RAM and ROM for this computer system
RAM
• Currently running data / video / music / images / software
ROM
• Boot up instructions / OS kernel
There are two types of RAM: dynamic RAM (DRAM) and static RAM (SRAM).
The following table shows five statements about DRAM and SRAM
396 | P a g e
requires more circuitry for refreshing) // SRAM uses less power (no
need to refresh)
• DRAM less expensive to purchase (requires fewer transistors) // SRAM
is more expensive to buy (as it requires more transistors)
• DRAM has slower access time/speed (because it needs to be
refreshed) // SRAM has faster access times
• DRAM can have higher storage/bit/data density // SRAM has lower
storage/bit/data density
• DRAM used in main memory and SRAM used in cache memory
Aaron needs to store a large number of applications and data on his computer. He needs
at least 50GB of secondary storage space.
Identify one internal secondary storage device for Aaron’s computer.
Magnetic hard disk drive // solid state drive
The tablet computer’s secondary storage is solid state (flash) memory.
Give one reason why the tablet computer needs secondary storage
To store files / software long term
Describe solid state memory.
• No moving parts
• Solid state memory is non-volatile
• Makes use of blocks / arrays of
• « Semiconductors // NAND gates // NOR gates // transistors // integrated
circuits
• SSD Controller manages the components
• Uses a grid of columns and rows that has two transistors at each intersection
• One transistor is called a floating gate
• The second transistor is called the control gate
• Memory cells store voltages which can represent either a 0 or a 1
• Essentially the movement of electrons is controlled to read/write
• Not possible to overwrite existing data // it is necessary to first erase the old
data then write the new data in the same location
397 | P a g e
The tablet computer has RAM and ROM memory.
State the purpose of RAM and ROM memory in the computer.
• RAM stores currently running parts of files / programs / processes / OS
• ROM stores boot up instructions / OS kernel // data permanently // store the
firmware for the tablet
The self-checkout machines use Static RAM (SRAM) for their cache.
The following table has statements about SRAM or Dynamic RAM (DRAM).
Tick (✓) one box in each row to identify whether the statement is about SRAM or DRAM
398 | P a g e
• Stores the operating software for the 3D printer // OS for the 3D printer
• Stores the boot-up/start-up instructions for the 3D printer
The laser printer has both RAM and ROM.
Describe the purpose of RAM and ROM in the laser printer
RAM
• Stores currently running parts of the printer software
• Stores the data being printed // contents of buffer
• Stores current progress of printing
• Stores the data about the printer, e.g. toner levels
ROM
• Stores the printer operating software // OS for the printer
• Stores the boot-up/start-up instructions for the printer
• Printer fonts stored in ROM
Oliver needs to increase the secondary storage on his computer. He already has several hard
disks.
Identify two other secondary storage devices that Oliver could use. Each device must be
different.
• Optical Disc Drive // CD/DVD Drive/Writer
• Solid State Drive // USB Flash drive
399 | P a g e
Static RAM (SRAM) or Dynamic RAM (DRAM).
Draw one or more lines from each type of RAM to its appropriate description(s).
A computer has Random Access Memory (RAM) and Read Only Memory (ROM).
Tick (✓) one or more boxes in each row to identify whether each statement refers to RAM, ROM
or both.
400 | P a g e
A computer has Random Access Memory (RAM) and Read Only Memory (ROM).
Tick (✓) one or more boxes in each row to identify whether each statement refers to RAM, ROM
or both
401 | P a g e
• … made of aluminium/glass
• The platters are coated with ferrous oxide which is capable of being
magnetised
• The platters/disks are mounted on a central spindle.
• The disks are rotated at high-speed
• Each surface of the disk has a read-write head mounted on an arm
positioned just above the surface
• Electronic circuits control the movement of the arm and hence the heads
• The surface of the platter/disk is divided into concentric tracks and
sectors
• The data is encoded as a magnetic pattern for each block
• When writing to disk, a variation in the current in the head produces a
variation in magnetic field on the disk
• When reading from disk, a variation in magnetic field produces a variation
in current through the head
A computer has hardware and software.
The hardware includes different types of memory.
Complete the description of computer memory.
Random Access Memory (RAM) and Read Only Memory (ROM) are both
examples of primary memory.
One item that is stored in RAM is currently running software/data/part of
OS.
One item that is stored in ROM is the start-up/boot-up instructions/BIOS.
RAM can be either Static RAM (SRAM) or Dynamic RAM (DRAM).
SRAM uses transistors arranged as flip-flops/latches.
DRAM uses transistors and capacitors.
402 | P a g e
multiple times.
EPROM needs to be removed from device EEPROM can be erased in
situ.
EPROM and can be erased using UV light, EEPROM can be erased
using voltage // is flash storage .
EPROM must be entirely erased before rewriting, EEPROM does not
have to be entirely erased before rewriting.
403 | P a g e
Data from the CCTV cameras is transmitted to a central computer.
This computer has both Read Only Memory (ROM) and Random Access Memory (RAM).
Describe the contents of the ROM in the central computer
Stores the bootstrap program // start-up instructions for the central
computer // BIOS
Stores the start-up instructions for the CCTV system/cameras //
firmware for CCTV
Stores the kernel of the Operating System // stores parts of the
Operating System
The central computer has Dynamic RAM (DRAM).
Identify two advantages of using DRAM instead of Static RAM (SRAM)
Costs less per unit
Higher storage density
Simple design – uses fewer transistors
The central computer stores the video files on secondary storage.
Describe two reasons why magnetic storage is more appropriate than solid state storage for
this computer.
404 | P a g e
A virtual reality headset and a laser printer are connected to the laptop
Explain why Static RAM is used in the laptop instead of Dynamic RAM.
• Static RAM has faster access time
• …because it does not need to be refreshed
• …used on the CPU for improvement of CPU cache speed
• Static RAM has lower
Identify two reasons for using Electrically Erasable Programmable ROM (EEPROM) in a
virtual reality headset
• EEPROM allows frequent / multiple read / write / erase operations
• …which means that the contents of the firmware in the headset can be
changed easily
• …without fully erasing the contents of the firmware in the headset first
The video doorbell has a solid state (flash) secondary storage device.
Complete the table by writing the answer or answers to each statement about the
principal operation of solid state (flash) memory.
The VR headset has Electrically Erasable Programmable Read Only Memory (EEPROM).
Explain the benefits of using EEPROM instead of other types of Read Only Memory (ROM) in
the VR headset.
EEPROM allows frequent/multiple read/write/erase operations
… so the headset can take advantage of new features
… without fully erasing the contents of the firmware in the headset first //
405 | P a g e
can erase a particular byte or the whole EEPROM
… without removing the chip(s)/firmware from the headset
the contents of the firmware in the headset can be changed by the user
without technical expertise
Cheaper to manufacture so headset will be cheaper to purchase
Identify two disadvantages of using Dynamic RAM (DRAM) instead of Static RAM (SRAM) in
a computer system.
• DRAM requires constant refresh cycles unlike SRAM
• DRAM has lower access speed than SRAM
Give two differences between Erasable Programmable ROM (EPROM) and Electrically
Erasable Programmable ROM (EEPROM).
• EPROM uses ultraviolet light to erase data whilst EEPROM uses an
electrical signal to do this
• EPROM has to be removed from the circuit board when changing the
data whilst EEPROM remains in the circuit when the data is changed
• EPROM erases all the data, EEPROM can erase parts of the data
A memory buffer uses Dynamic RAM (DRAM).
Identify two differences between DRAM and Static RAM (SRAM).
• DRAM requires constant refreshing, but SRAM does not need to be
constantly refreshed
• DRAM generally has greater capacities per chip, but SRAM generally has
lower capacities per chip
• DRAM has slower access times than SRAM
Explain how a memory buffer is used when a computer is transferring data to its magnetic
hard disk drive.
• The computer and the hard disk drive transmit and receive at different
speeds // The computer transfers data faster than the HDD can receive
• The buffer is used for temporary storage
• … so that the computer can transfer data to the buffer at the higher speed
• ... and is not held up waiting for data to transfer
406 | P a g e
• … and so that data is transferred to hard disk drive from the buffer at the
slower rate
11. IP
407 | P a g e
Consider the URL:
http://cie.org.uk/computerscience.html
Give the meaning of the following parts of the URL.
http – enables browser to know what protocol is being used to access information in the
domain
cie.org.uk – cie.org.uk is the domain name
computerscience.html – actual web page / file being viewed
Sometimes the URL contains the characters %20 and ?.
Describe the function of these characters
%20 – because <space> not allowed in a URL, %20 is the coding for a space (32 in
denary)
? – separates the URL from all parameters or variables
State what IP stands for.
Internet Protocol
The following table shows four possible IP addresses. Indicate for each IP address whether it is
valid or invalid and give a reason.
408 | P a g e
Describe two differences between public and private IP addresses
• Public address can be reached across the Internet.
• Private address can only be reached internally/through the LAN/Intranet // private
address cannot be reached across the Internet.
• NAT (Network Address Translation) is necessary for a private IP address to access the
Internet directly.
• A private address is more secure than a public address // A public address is less secure
than a private address.
• Public addresses are provided by ISP / assigned by InterNIC // Private addresses are
assigned by the router (of the network concerned).
• Public addresses are unique (to the Internet) // Private addresses (are unique within their
network, but) can be duplicated within other (discrete) networks.
• 10.0.0.1 to 10.255.255.254 and 172.16.0.1 to 172.31.255.254 and 192.168.0.1.to
192.168.255.254 form the private address space // IP addresses from the private
409 | P a g e
address space are never assigned as public.
A device needs an IP address to connect to the Internet. IPv4 is the more common type of IP
address. Describe, using an example, the format of an IPv4 address.
• Four numbers separated with ‘.’
• Each number is between 0 and 255 / 00 and FF in Hex / stored in one byte.
• 32 bits long
• Correct example
State how Computer A could access the web page without using a Domain Name Service
(DNS).
Use the IP address instead of the URL
The following table shows four IPv6 addresses.
State if each address is valid or invalid.
The following table shows four statements about either public or private IP addresses.
Gopal types the Uniform Resource Locator (URL) of a website into a web browser.
(a) The following sequence (1 to 5) describes the steps that take place. There are three missing
statements.
410 | P a g e
1 Gopal types into the web browser
2 B (Web browser sends URL to Domain name Service (DNS))
3 DNS looks up URL in a table
4 A (DNS finds corresponding IP address)
5 C (DNS returns IP address to web browser)
Describe the purpose of an IP address.
• Gives each device on a network an identifier // IP address used to
locate a device on a network
• Each address is unique within the network
• Allows a device/gateway/node to send data to the correct destination / a
specific device/gateway/node
Ava needs to view a website and she knows the Uniform Resource Locator (URL).
Complete the series of steps that take place.
Write the letter of the appropriate statement in each space.
1 C - Ava types the URL into a web browser
2 URL goes to Domain Name Service (DNS)
3 B - DNS looks up URL in table
4 A - DNS finds corresponding IP
5 DNS returns IP address to client
An IPv4 address has been entered as 12.258.3
Give two reasons why this IP address is invalid.
• 258 is too large/largest individual numbers is 255
• 4 numbers needed/1 number missing/only 3 groups of numbers given
An IPv6 address has been entered as 15EF:5L63::2014:BB::60AA
Give two reasons why this IP address is invalid.
• L not a valid hexadecimal number
• Only one double colon is allowed
The table shows four descriptions of IP addresses.
Tick (✓) one box in each row to identify whether each description applies to a public or private
IP address.
411 | P a g e
Circle either Valid or Invalid to indicate whether each address is valid or invalid. Explain your
decision.
3A.21.2H.1 Invalid
H is not a valid hexadecimal digit
299.53.2.2 Invalid
299 is not in the correct range
192.2.1.0 Valid
Consists of four numbers in the range 0–255 separated by
full stops
Describe how a URL is converted into its matching IP address.
• URL is parsed to obtain the Domain name
• Domain name is sent to the nearest Domain Name Server (DNS)
• DNS holds a list of Domain names and matching IP addresses
• DNS name resolver searches its database for the Domain name
• If DNS does not find the Domain name, the request is forwarded to a higher level DNS
• If the Domain name is found, the IP address is returned
• If the Domain name is not found, the request is passed to a higher level server
• If the Domain name is finally not found, an error message is generated
Give an example of a valid IPv4 address: 192.168.0.1
412 | P a g e
A computer’s IPv6 address is:
C100:2235::1000:25AA:AA50
Explain why this IPv6 address would be an invalid IPv4 address.
• Too many digits per group
• Too many groups of digits
• The address is more than 32 bits / 4 bytes
• Colons are used as separators
Each computer in the network has a private IP address.
Give two reasons why the computers do not have public IP addresses.
• Improved security because the IP address is not visible outside the network
• An internet presence is not required for each employee computer
• Only the router needs a public IP address, as only the router needs to be externally visible
• Reduces number of (public) IP addresses needed
Joshua’s laptop is connected to the router on his home network.
The laptop has a private IP address. The router has both public and private IP addresses.
Explain the reasons why Joshua’s laptop has a private IP address only, but the router has both
a private and a public IP address.
• The router needs a public IP address so it can be identified on the
Internet
• The router needs a private IP address so it can be identified on the
home network
• The router has a public and a private IP address so that it can route
data between the two networks (home and Internet)
• The laptop needs a private IP address so it can be identified on the
home network // so the router knows where to send data
• The laptop does not have a public IP address because it does not
connect directly to the Internet
• ... this is more secure because it hides the laptop from the outside world
• … all data from the Internet must be transmitted via the router
Joshua visits a website by entering its Uniform Resource Locator (URL).
Describe how the URL is converted into a matching IP address.
413 | P a g e
• The browser parses the Uniform Resource Locator (URL) to obtain the Domain Name
• The domain name is looked-up in the locally cached list of
corresponding IP addresses. If it is not found…
• The domain name is sent to the closest Domain Name Server (DNS)
• The DNS stores a table of Domain Names and corresponding IP
addresses // searches its database of Domain Names and corresponding IP
• If the DNS finds the Domain Name, it returns the IP address
• If it cannot find the Domain Name, it sends the request to a higher DNS / upstream server
• If the Domain Name is not found, an error is returned
Give one example of a valid IPv4 address.
192.168.0.1
A web server has a public IPv4 address.
Draw lines to link each characteristic to its appropriate IP address.
414 | P a g e
• … the DNS does not need updating
• … which might be delayed causing ‘address not found’ errors
• The webserver may be accessed directly using just the IP address // the IP address is still held
in cache memory
A laptop on a home network connects to the Internet through a router. The laptop has an IP
address.
Give the reasons why the laptop has an IP address.
• To identify the laptop on the home network
• To allow the router to send data to the laptop from the Internet / another device on the home
network
The laptop’s IP address is private.
Give the reasons why the laptop does not have a public IP address
• The router has the public IP address for the home network
• All data comes through the router
• The laptop is not accessible / visible to the outside world
• … to ensure security // to protect the laptop from external threats
The router has an IPv4 address.
Give three differences between the format of an IPv4 address and an IPv6 address.
• IPv4 has 4 groups of digits, IPv6 has 8 groups of digits
• In IPv4 each group is from 0-255, in IPv6 each group is from 0-65535
• IPv4 uses a full-stop between each group, IPv6 uses a colon between each group
• IPv4 is 32-bit, IPv6 is 128-bit // IPv4 uses 4 bytes, IPv6 uses 16 bytes
Identify two differences between a public IP address and a private IP address.
• Private IP is only known within the LAN // Public IP is known outside of the LAN/ on Internet
• Public is allocated by ISP // Private is allocated by the router
• Public addresses are unique throughout the Internet, private addresses are unique only within
the LAN
• Private IP addresses are more secure than public IP addresses
Computers on the Internet have IP addresses.
Describe the format of an IP address.
IPv4
• Four groups of (denary or Hexadecimal integers
415 | P a g e
• Numbers between 0 and 255 / 0 and FF
• Each stored in 1 byte / 8 bits // the whole is stored in 32 bits / 4 bytes
• Separated by full stops
• Correct example
OR
IPv6
• Eight groups of (Hexadecimal) digits
• Numbers between 0 and FFFF
• Each stored in 2 bytes/16 bits // the whole stored in 128 bits / 16bytes
• Separated by colons
• The first instance of multiple groups of zero can be replaced by a double colon
• correct example
Draw one line from each term to its most appropriate description
416 | P a g e
The CCTV cameras are connected to a network and transfer their data wirelessly to the central
computer.
Each device on the network has an IP address.
Complete the description of IP addresses.
An IPv4 address contains 4 groups of digits. Each group is represented in 8 bits and the groups
are separated by full stops
An IPv6 address contains 8 groups of digits. Each group is represented in 16 bits. Multiple
groups that only contain zeros can be replaced with a :: //double colon.
The server has the IP address 192.168.3.2
Explain why this is not an IPv6 address.
417 | P a g e
• Only has four groups of digits // IPv6 has eight groups
• Uses dotted notation instead of colons
• Because it is a 32 bit / 4 byte address // IPv6 is 128 bits / 16 bytes
The following incomplete table contains types of IP addresses and their descriptions.
Complete the table by writing the missing types of IP addresses and the missing descriptions.
The LAN will connect to the internet through a router. The router has a public IPv6 address.
State why the router has a public IP address.
to be visible to and accessible by other devices on the internet
One difference between an IPv4 and IPv6 address is that the numbers in an IPv4 address are
separated by full stops and in an IPv6 address they are separated by colons.
Identify two other differences between an IPv4 and IPv6 address.
IPv4 has 4 groups of digits whilst IPv6 has 8 groups
IPv4 is usually represented in denary whilst IPv6 is usually represented in hexadecimal
IPv4 groups are between 0 and 255 whilst IPv6 is between 0 and FFFF
IPv4 is 32 bits whilst IPv6 is 128 bits
The devices in the office have static private IP addresses.
418 | P a g e
State what is meant by a static private IP address.
Static means the IP for that device does not change and Private means it can only be
accessed/seen/used within the LAN
The LAN has a router. The router has a public IP address and a private IP address.
State the purpose of a public IP address and a private IP address.
Public IP address:
• So that the router is visible to the Internet/external network/WAN
Private IP address:
• So that the router is identified to computers within the LAN
12. Ethics
Paul works part-time for a large software company. The company sells security software to a
number of banks. He also runs his own software company that produces and sells computer
games.
Ethical
To allow him to concentrate on his games software, Paul has frequently turned down job
opportunities in his day job
Because his workload is increasing, Paul is now using overseas companies to write some of the
routines used in his games software.
Paul carries out training on how to write games software in his spare time.
Unethical
To save time, Paul fakes the test results when testing the bank security software
Paul uses the software developed in his day job to help write some of the games software
routines.
To make the games software more realistic, Paul uses password protection code used in the
bank security software.
Bobby is a senior programmer at a software house which produces intruder detection software.
He also runs his own software company which develops and sells various computer
applications.
The following table shows seven activities which Bobby carries out.
419 | P a g e
Three types of software licensing and four descriptions are shown in the table below.
420 | P a g e
• PRODUCT / Software engineers shall ensure that their products and related modifications
meet the highest professional standards possible.
o Example in context
• JUDGEMENT / Software engineers shall maintain integrity and independence in their
professional judgment.
o Example in context
• MANAGEMENT / Software engineering managers and leaders shall subscribe to and promote
an ethical approach to the management of software development and maintenance.
o Example in context
• PROFESSION / Software engineers shall advance the integrity and reputation of the
profession (consistent with the public interest).
o Example in context
• COLLEAGUES / Software engineers shall be fair to and supportive of their colleagues.
o Example in context
• SELF / Software engineers shall participate in lifelong learning regarding the practice of their
profession and shall promote an ethical approach to the practice of the profession.
o Example in context
Explain what is meant by open source software.
• The source code comes with the software.
• The user can edit the source code.
• Once edited, the software is re-distributed with the changes. Explain what is meant by
commercial software.
• The software is purchased.
• With a licence which restricts the number of users / possible time period for use.
• The program code for the software cannot be edited.
Identify four benefits to the company in choosing the commercial software option
• Support / training is readily available so help can be accessed if needed.
• More robust software / fewer bugs as it has been tested more thoroughly/by more users.
• Forums / user groups will exist for popular software.
• Software upgrade path likely to be available (at minimal cost).
• Manufacturer develops patches that can be automatically downloaded.
• Compatibility is inbuilt for other commercial software.
421 | P a g e
Describe what is meant by ethics.
• A system of moral principles
• That guide behaviour / decision making
• Based on philosophical / religious views
• By example, e.g. respectful and considerate behaviour
422 | P a g e
The table that follows the diagram describes each incident.
423 | P a g e
• « which may be limited in features
• No access to source code // Program cannot be edited
• Then they have to pay / sign-up after the expiry date // Then they have to pay / sign-up to get
full functionality // Then they have to pay / sign-up to stop unwanted pop-ups, etc.
Tick one box to indicate the licence Hugo should use. Justify your choice.
Open Source
For example:
• Hugo does not have to set up ways to take funds
• Others may enhance / improve the program
• Hugo can charge a fee for the App
Or
Shareware
For example:
• Hugo can charge for the App
• Not giving away the code/people can't copy the code
• « Hugo gets the sole recognition for the program
• Possible legal consequences if someone does copy the code
• If users need to sign up, their data can be used for marketing etc.
• Customers have peace of mind that the software hasn’t been
maliciously edited / bugs introduced
For each of the following scenarios, tick one box for each scenario to indicate whether you
think the person’s behaviour is ethical or unethical. Justify your choice.
Kevin is a software engineer who has recently started a job with a new company. He is using
program code from his previous employer in his new employer’s programs.
Either Unethical
• Work belongs to the company it was created for // copyright
• « Kevin cannot use it without permission
• It reduces the integrity of the person / profession / new company
• Reference to IEEE standards in context
Or Ethical
424 | P a g e
• The program code could be open source
• Kevin might own the copyright of code
• Kevin may have permission to use the code
• Reference to IEEE standards in context
Nadya is a software developer. She has accepted a new job. She has never worked with the
programming languages used by this new company. Nadya is planning to increase her
knowledge of these programming languages before she starts her new job
Either Unethical
• Nadya has accepted a role / work she knows she cannot do
• This reduces the integrity of the person
• She may let down the new organisation who are expecting her to be able to do the work
• Reference to IEEE standards in context
Or Ethical
• She is taking steps to prepare for the role
• « Without expecting the company to do it
• Nadya may have told the company that she didn’t know the languages but that she would
learn them
• Reference to IEEE standards in context
Maria finds that one of her team members has produced some inventive code. She presents
this to her manager, stating that it was produced by the team. She does not mention the
individual’s name.
Either Ethical
• The individual works as part of the team «
• « therefore, the team should / will get the credit
• Maria is not lying about who produced it
• Reference to IEEE standards in context
Or Unethical
• Maria should identify who / where the idea originated
• It prevents the individual getting recognition
• Maria is not being supportive of the individual
• Reference to IEEE standards in context
425 | P a g e
This question presents three scenarios. For each scenario, tick (✓) one box to show whether
you
think the person’s behaviour is ethical or unethical. Justify your choice.Wendy is a software
engineer who is developing a program for her company. Her friend Noah, is developing a
program for a different company. Wendy looks at the code that Noah is writing to get ideas for
her own program.
Either Unethical
• Noah’s work may be confidential
• Wendy shouldn't claim someone else’s ideas / work as her own
• She is bringing the profession into disrepute
• Reference to IEEE standards in context
Or Ethical
• The code could be open source
• Wendy may have permission from Noah
• Wendy isn’t copying the code, just getting ideas
• Reference to IEEE standards in context
Amit is fixing some bugs in the computer system of a large multinational company. He is asked
to sign a confidentiality agreement. He sees some confidential information which contains the
names of other multinational companies that have broken the law. He copies this information
and releases it on the Internet.
Either Unethical
• Amit has a responsibility to his company
• He should have taken it to the police rather than putting it on the
Internet
• He has a signed agreement to say he will not give anything away
• Reference to IEEE standards in context
Or Ethical
• Amit is acting in the public interest
• Amit may not have actually signed the confidentiality agreement
• If acting illegally, the multinational company should be brought to justice
• Reference to IEEE standards in context
Farah is providing a company with an estimate for the cost of writing a program. The company
she works for is in financial difficulty so she increases the estimate by 10%.
426 | P a g e
Either Ethical
• It might save people’s jobs
• Farah is acting in the best interest of her company
• Reference to IEEE standards in context
Or Unethical
• Farah has a responsibility to act in the best interest of her client
• It could give her company a bad reputation
• Reference to IEEE standards in context
This question presents three scenarios. Tick (✓) one box for each scenario to indicate whether
you think the person’s behaviour is ethical or unethical. Justify your choice.
Mason is using his work computer to book a holiday whilst at work
Either Ethical
• He is booking the holiday in his own time / lunchtime // he is self-employed
• He has been given permission
• Reference to IEEE in context
Or Unethical
• Should not use company computer for personal use
• Should be working whilst at work
• Reference to IEEE in context
Ethan is supervising a trainee. The trainee asks Ethan for a reference for another job. Ethan
does not want to lose the trainee, so refuses to give him a reference.
Unethical:
• Company will get a bad reputation
• Should be supporting his colleague
• Reference to IEEE in context
Margarita finds that one of her team members has produced some inventive code. She
presents this to her manager, praising the individual by name
Either Ethical
• She is supporting her colleague
• Working in the best interests of the company
427 | P a g e
• Reference to IEEE in context
Or Unethical
• Praising one team member instead of the whole team
• Others in the team may also have contributed, so she is not being
supportive of the whole team
• Reference to IEEE in context
Describe what is meant by a commercial licence.
• Restricted use
• Source code not provided // source code protected
• Anyone can purchase/download if agree to the terms
• Limited number of installations allowed // Software key needed to install
Name and describe one other type of licence that Arnold can consider using.
Either
Open Source
• The source code is released with the program
• Users can change / edit the source code to enhance the game
• Users can re-release the game under the same terms // the game might spread more easily
Or
Shareware
• Users get free trial or limited access for set time
• Users do not have access to the source code // source code may not be edited
• At end of trial period, users may have to pay or register to continue using the game // Can get
people ‘hooked’ and then charge a fee
Or
Freeware
• There is no fee for the game
• The game could be copyrighted
• Modification, re-distribution or reverse engineering of the game without permission is
prohibited
Write the type of software licence that best fits each description. Use a different type of licence
for each description.
428 | P a g e
1. The software can be legally used, only after a fee has been paid
• Commercial Licence
2. The source code comes with the software. If the software is modified, the edited source
code must be released under the same conditions as the original software.
• Free Software Licence
3. The software is free for a trial period and then a fee is requested, or expected, if the
user
wants to continue to use the software.
• Shareware Licence
4. The source code comes with the software. The software is free to be downloaded,
edited,
and distributed, possibly without restriction.
• Open Source Licence
Two principles of the ACM/IEEE Software Engineering Code of Ethics are:
• developers must act consistently with the public interest
• developers must act in the best interest of their client and employer.
Name and describe three other principles in the ACM/IEEE Software Engineering Code of
Ethics.
• Product
• Software engineers shall ensure that their products and related
modifications meet the highest professional standards possible.
• Judgement
• Software engineers shall maintain integrity and independence in their
professional judgement.
• Management
• Software engineering managers and leaders shall subscribe to and
promote an ethical approach to the management of software
development and maintenance.
• Profession
• Software engineers shall advance the integrity and reputation of the
profession consistent with the public interest.
• Colleagues
429 | P a g e
• Software engineers shall be fair to and supportive of their colleagues.
• Self
• Software engineers shall participate in life-long learning regarding the
practice of their profession and shall promote an ethical approach to the
practice of the profession.
430 | P a g e
Freeware
• There is no charge for the software
• The software could still be copyrighted
• She can set her own restrictions on what a user can do with the
program
One principle of the ACM/IEEE Software Engineering Code of Ethics is to always act in the
best interest of the client.
Explain how Frankie can ensure that he is acting in the best interest of his client.
For example: He should ...
• ...Keep the client’s personal data private
• ...Involve the client in the development // «Communicate with the client
• «Provide the solution that the client asked for
• ...Keep the project running on time // budget
• ...Keep the client informed of any problems/delays
Give two benefits to Mica of using a commercial licence
• So that she can sell the software for a fee // make money from the software
• A commercial licence prohibits unauthorised/further copies being made
and/or distributed
• A commercial licence prohibits any changes to the software
Name two other types of software licence.
• Open Source
• Free Software
• Shareware
• Freeware
Sophie is about to start a new job as a junior software developer
She is worried about joining a new team of people.
State one ethical action that Sophie can take to help her to feel more confident about
starting work.
• Read about the languages she will be using
• Visits the office prior to starting
431 | P a g e
• Speaks to her manager about concerns
State two ethical actions that Sophie’s manager can take to help Sophie to feel more
confident about starting work.
• Prepare an induction
• Invite Sophie in before starting
• Introduce Sophie to the team
• Give Sophie a mentor
State one ethical action that Sophie’s new colleagues can take to help Sophie to feel
more confident about starting work.
• Prepare a greeting/introduction
• Provide structured support
• Invite Sophie to social event(s) before/at the start to meet people
Explain why Sophie is asked to sign a professional code of conduct before starting work.
• Sophie is confirming that she understands the code of conduct
• To make sure Sophie knows what behaviour is expected of her
• To make sure Sophie understands there may be consequences of some
actions
• To ensure all employees adhere to the same standards
Annchi needs to decide which type of software licence to use for the game.
Give two benefits to Annchi of using a commercial licence.
• She can charge a fee for the game
• She retains the copyright
• ... so, the game cannot be re-distributed by a third-party without her permission
Give one benefit to the customers of the game being released using a commercial
licence.
• Potentially better support, as she is charging a fee
• Likely to have fewer bugs / less prone to malware than if distributed under other
licences e.g. open source
• Redress available if the game does not function correctly
Describe one benefit to the customers of the game being released using a shareware
licence.
432 | P a g e
• They can check it works // check if it meets their requirements
• ... without having to paying a fee if it does not
Ria manages a team of software developers. The team is creating a mobile application game for
a
client.
Ria wants to ensure that her team works to the ACM/IEEE Software Engineering Code of
Ethics.
Explain the ways in which Ria and her team can ensure that they follow the Code of Ethics in
relation to the product and their colleagues.
Product:
For example:
• Ensure product is of a high standard
• Ensure product meets requirements
• Ensure the product is delivered within time
• Ensure the product is delivered within budget
• Ensure product development is well-documented
• Ensure product is tested thoroughly // free of bugs
Colleagues:
For example:
• Need to be fair// do not show any prejudices
• To be supportive of colleagues
• Work together as a team
• Listen to each other’s ideas
• Assist colleagues in professional development
• Fully credit the work of other members of the team
• Make colleagues aware of expected standard ways of working
) Ria’s client wants to sell the game for a profit. The client cannot decide which type of software
licence to use to distribute the game.
Identify two types of licence that Ria could recommend to her client and justify the use of
each licence.
• Commercial / proprietary...
433 | P a g e
• ...Software is sold for a fee therefore giving the client the income
• Shareware...
• ...Free for a trial period / limited features, and then users must pay for it
Malika thinks that her colleagues do not like her, so she asks her manager for help.
Describe the actions the manager could take to support Malika in an ethical way
• Discuss the problems with her
• Discuss the concerns with her colleagues
• Assign her a mentor who can reassure her
• Team building exercises
Lara is managing a team of software developers who are writing a computer program.
Benedict is one of the developers. He is struggling to keep up with his workload.
Describe the ways in which Lara can ethically support Benedict.
• Reduce his workload // Review his work demands
• Redistribute his work
• Arrange a meeting with him
434 | P a g e
• ... to discuss the reasons why he is struggling
Lara has identified that when a specific sequence of actions is performed in the program, a
run-time error causes the program to crash.
She has decided there is not enough time to debug the code because the client needs the
system urgently, and there is a possibility that the client may never perform this sequence of
actions.
Explain the reasons why Lara is not acting ethically.
• Not acting in best interest of the client
• ... The error could cause significant problems for the client if encountered
• The product does not meet the highest possible standard
• Not acting in the best interest of the development company
• … if the error occurs, it could lead to repercussions for the development
Company
The client wants to copyright the final program so that no one else can copy or amend it.
State the purpose of copyrighting the computer program.
• Protects the intellectual property
• Allows legal action against anyone else who claims it as their own
• Formally / Legally identify the client as the owner of the software
Identify two software licences that would be appropriate for the program.
• Commercial
• Shareware
Identify one software licence that would not be appropriate for the program. Justify your
choice.
• Open Source // Free Software
• Anyone can modify/copy the source code and re-distribute which is not
what the client wants
Draw one line from each software licence to its correct description
435 | P a g e
This question presents three scenarios.
Tick one box for each scenario to indicate whether you think the behaviour shown is ethical or
unethical. Justify your choice.
Marina has a very short deadline to create a piece of software for a client. Algorithm A is quick
to code and simpler to test but has an inefficient run time. Algorithm B is more complex to
code and test but has a more efficient run time. She decides to implement algorithm A.
Either Unethical
• Marina knowingly produces a solution that is not as efficient as it could
be
• …and this does not enhance the reputation of the person/company
• Reference to IEEE standards in context
Or Ethical
• Marina acts in the best interests of the employer to complete a working
product on time
• …that is more likely to be correct as the coding is simpler
• Reference to IEEE standards in context
Doug is managing a project for a client that has fallen behind schedule. He asks all members
436 | P a g e
of the project team to work extra hours and to cancel any holiday plans to get the project back
on schedule.
Either Unethical
• Doug has a management responsibility
• …to be fair to his colleagues
• …but is showing a lack of personal integrity by applying pressure
• Reference to IEEE standards in context
Or Ethical
• Doug is trying to act in the best interests of his employer/client
• …and may be asking employees to voluntarily offer to work additional
hours
• …he may be paying them extra
• Reference to IEEE standards in context
Debbie is programming a car safety management system. She thinks that the test plan she
has been given is not adequate. She decides to discuss her concerns on a public internet
forum.
Either Unethical
• Debbie may be breaking company policy discussing current projects //
confidentiality
• …and has a duty to act in the best interests of his company
• …and should have raised her concerns internally
• Reference to IEEE standards in context
Or Ethical
• Debbie may feel that in the public interest the problem should be
discussed
• …to ensure that a safety critical system is fully tested
• …so as to prevent potential loss of life
• Reference to IEEE standards in context
This question presents three scenarios.
Tick one box for each scenario to indicate whether you think the named person’s behaviour is
437 | P a g e
ethical or unethical. Justify your choice.
Latifah has changed jobs and has started to work for a new company. The company uses an
Integrated Development Environment (IDE) to develop code. Latifah decides not to use the
IDE that the company has because she is familiar with a different IDE.
Either Ethical
• Latifah believes that her productivity is better using an IDE that she has
experience of
• … and the work is still compatible with other IDEs
• …the IDE is open source so does not cost anything extra
• Reference to IEEE standards in context
Or Unethical
• Latifah is knowingly using software that is not provided or supported by
the company
• …and this may lead to issues with future software
compatibility/maintenance
• Reference to IEEE standards in context
Samid is in charge of a project to write a banking application. He is employing staff to work
on the application. His daughter is a computer security expert. She is looking for a new job.
Samid decides to employ his daughter.
Either Ethical
• Samid believes his daughter is qualified and would be the best person
for the job
• …and believes that it is in the best interest of his client to secure a highquality employee as
soon as possible
• … they may have interviewed her with a third party and she came out
as the best candidate
• Reference to IEEE standards in context
Or Unethical
• Samid shows poor judgement by favouring his daughter
• …rather than using a fair and open recruitment process
438 | P a g e
• there may be people with better qualifications that are being overlooked
• Reference to IEEE standards in context
Jason works for a social media company. He is concerned that users of the company’s social
media website have not been told how their personal data is being used.
Jason tells his manager his concerns. His manager tells him not to worry because there have
been no complaints from the users. Jason takes no further action.
Either Ethical
• Jason has already raised his concerns (to his manager)
• …and has fulfilled his professional responsibilities by doing so.
• Reference to IEEE standards in context
Or Unethical
• Jason should continue to raise any concerns he has with a higher level
of management in the company
• …because it may be against the public interest for users to have their
data used in this way without them explicitly knowing it.
• Reference to IEEE standards in context
Explain the reasons why Jackie should copyright her program
• Formal / legal recognition of ownership // To protect her intellectual
property rights
• Formal / legal restrictions on the use of the program
Anya made sure that the image was not subject to any copyright before scanning it.
Describe what is meant by copyright
• The formal and legal rights to ownership // intellectual property rights
• Protects against unauthorised reproduction of work
• Provides for legal right of redress
Aisha manages a team of software developers.
Explain the reasons why it is important that Aisha acts ethically in relation to her team
members.
• To make sure the team members feel valued
439 | P a g e
• To get the best work out of the team
• To enable them to work well together
• To enable them to create the best product for the client
Francis is starting his first job as a software developer for a multinational company.
Francis has been advised to join a professional ethical body.
Describe the benefits to Francis of joining a professional ethical body.
• He has ethical guidelines to follow
• … so clients/other staff know the standards being applied
• … so he does not have to decide what is ethical it's written down
• Clients / staff know he is reputable
• … recognition of his skills / knowledge
• … there may be a test / requirements for entry
• They provide help and support
• … for example if he needs legal advice
440 | P a g e
• They run training courses
• … to keep his skills up-to-date
Francis is shown the software he will be working on. He is unfamiliar with the Integrated
Development Environment (IDE) he is required to use.
Describe the ways in which Francis can act ethically in this situation
• He can tell the manager he has not used it
• … and how he will get up-to-date
• He can perform his own research on how to use it
• He can explain to the manager that he needs additional training
• He can(ask the manager to book on a training course
• He can ask for a mentor / to shadow someone
• He can practice at home before starting
Francis is part of a team writing a program. He finds an error in part of the program that
has already been tested. He decides not to tell anyone because he is worried about the
consequences.
Explain the reasons why Francis acted unethically in this situation
• He didn’t act in best interest of product
• … because the product might fail because he didn’t report the error
• He didn’t act in best interest of client
• … because if the product does not work then they have been let down
because he didn't report the error
• He didn’t act in the best interest of the profession
• … he is letting his profession down because he didn't report the error
• He didn’t act in best interest of the company
• ... not correcting the error early could lead to later problems
441 | P a g e
The programmer wants to allow users to edit, improve and redistribute the program.
Identify two different types of software licence that the programmer could use.
Open Source Initiative
Free Software Foundation
State two benefits to a programmer of distributing a program using a shareware licence.
• Users are able to trial the program and may offer the programmer
constructive feedback
• More people might try the program because the trial is free of charge
• Allows bugs to be found and corrected on a wide range of computer
system configurations improving the programmer’s original program
• Users that find the trial useful will buy the program so programmer gets
income
• Allows the program to be copyrighted and so protects the programmer’s
intellectual property rights // no illegal modification allowed
442 | P a g e
• There is no initial cost
• Users who try the software may spread the word so the developer gets
more custom
• The developer can get feedback to improve the program
Give two benefits of distributing software using a commercial software licence.
• The owner/developer can earn a fee
• Comprehensive support is usually offered so problems can be easily
solved
• The software is usually well tested so few bugs
A computer programmer is learning about the importance of acting ethically at work.
Explain the reasons why the computer programmer needs to act ethically towards colleagues
and the public.
Colleagues:
The programmer should:
• Treat colleagues fairly and avoid acts of discrimination
• Be prepared to accept / offer critique
• … so that technical work can be improved
• Credit the contributions of colleagues
• … so that they feel valued / respected
• Help / train colleagues
The public:
The programmer should:
• Maintain the health, safety and welfare of the public
• … so as not to endanger anyone
• Be honest / realistic in making claims about the software
• … so that public trust is maintained
• Maintain the security of the public's data
etc.
The programmer writes a program to be used in a business. The source code of the program
can be modified by the business. The business pays the programmer for the maintenance
and security updates.
443 | P a g e
Identify one suitable type of software licence for the program and describe the reasons
for your choice.
Type of software licence
• Open Source Initiative // Free Software Foundation
Reason for choice:
• Allows program source code to be examined
• … so that the business can adapt/modify the program to meet their needs
• Allows the programmer to earn money for the software and updates
Explain the reasons why the programmer should copyright their program.
• To identify themselves as the owner/author // To gain formal recognition
of ownership
• To allow for legal consequences if anyone steals/copies it
• To restrict competition
A computer programmer writes programs that are distributed with a software licence.
Complete the table by writing the type of software licence each statement describes.
Explain the reasons why it is important for the computer programmer to join a professional
ethical body.
• The professional ethical body has ethical guidelines to follow
• … so clients/other staff know the standards being applied
• … so the computer programmer does not have to decide what is ethical
it's written down
• Clients/staff know the computer programmer is reputable
444 | P a g e
• … there may be a test/requirement for entry
• … giving recognition of the computer programmer's skills/knowledge
• The professional ethical body provides help and support
• … for example, if the computer programmer needs legal advice
• The professional ethical body runs training courses
• … to keep the computer programmer's skills up to date
13. Translator
445 | P a g e
Describe two differences between a compiler and interpreter.
• Compiler creates an executable//an interpreter does not create an executable.
• The compiled program can be independently distributed.
• Compiler reports all errors at the end of compilation//an interpreter stops when it reaches an
error.
• Interpreter executes each statement immediately after decoding/checking it//a compiler checks
the whole program for errors.
• The interpreter software/source code must be present in main memory every time the program
is executed//the compiled program does not require compiler/source code to be present.
446 | P a g e
• Cross-compilation is possible/compile on one hardware platform to run on another.
447 | P a g e
Explain how the assembler made these entries to the symbol table.
448 | P a g e
• The assembler scans the assembly language instructions in sequence
• When it meets a symbolic address checks to see if already in symbol table
• If not, it adds it to the symbol table in the symbolic address column
• If it is already in symbol table check if absolute address known
• If the absolute address is known, it is entered in the appropriate cell
• If the absolute address is not known mark / leave as unknown
Name the second table needed when the assembler software carries out the second Pass
The op code / mnemonic / instruction table
Benefits of a compile
• Once translated the compiler software is not needed to run the program
• Compiled code should execute faster
• Compiler produces an executable file
• The executable file produced by a compiler can be distributed without users having sight of the
source code // source code is kept secure // users are unable to make changes to the program
• Cross-compilation is possible
Benefits of an interpreter
449 | P a g e
• Easier de-bugging
• The interpreter stops when error encountered
• error can be corrected in real time
• The interpreter translates a statement then executes it immediately
• Parts of the program can be tested, without all the program code being available.
An assembly language program can contain both macros and directives.
Explain what is meant by these terms.
Macro
• A group of instructions given a name // subroutine
• A group of instructions that need to be executed several times within the same program
• The statements are written once and called using the name whenever they need to be
executed
• Macro code is inserted into the source file at each place it is called
• By example
Directive
• An instruction that directs the assembler to do something
• A directive is not a program instruction
• It is information for the assembler
• By example
Give an example of the use of a directive.
For example: State the start address for the program //tell the assembler to set aside space for
variables // include an external file etc.
450 | P a g e
451 | P a g e
Kim develops her program and makes it ready for use. To do this, she uses first an interpreter
and then a compiler.
Explain why Kim needs to use both an interpreter and a compiler
Interpreter:
• Used during development
• Debugging is easier
• « Because errors are reported as they are found // No need to wait until the end of the process
for the error report
• « Because errors can be corrected as they are found
Compiler:
• Compiler used when development complete // compiler used when program ready for
distribution
• Produces an executable file (.exe)
• « After compilation the compiler does not need to be present for the program to run
• « The program can be given to others without access to (source) code
• « Final program does not need to be re-compiled each time it is run
• Cross-compilation, the program can be compiled to run on different platforms
State one benefit of Kimmy using an interpreter during the development of the program.
• Errors can be corrected as they occur
• Can run a partially complete program when developing
• The effect of any change made to the code can be seen immediately
State three benefits of Kimmy using a compiler when the program is complete.
• Produces an executable file
• User does not have access to source code
• It will (probably) be faster to run the executable
• Code does not have to be compiled each time it is run
• Does not need the compiler to be present at run-time
The table contains some of the tasks performed by a two-pass assembler.
Tick (✓) one box in each row to indicate whether the task is performed at the first or second
pass. The first row has been completed for you.
452 | P a g e
State the purpose of a language translator.
• To convert a (higher level) programming language to a different form
State two benefits of Biyu using an interpreter instead of a compiler while writing the program.
• Easier de-bugging
• «because errors can be corrected in real time
• The effect of any change made to the code can be seen immediately
• Parts of the program can be tested, without all the program code being Available
Name a translator other than an interpreter and a compiler
Assembler
When the program is complete, Frankie uses a compiler to prepare the program for the client.
Explain why Frankie uses a compiler instead of an interpreter.
• He uses a compiler because it creates a separate executable file
• The executable means the client cannot access the source code // edit the program
• The executable means the client does not need the IDE / compiler
• It will (probably) be faster to run the executable than to interpret the source code every time
the program is run
The following statements describe features of a low-level language.
Complete the statements by writing the appropriate terms in the spaces.
A macro is a sequence of instructions that are given an identifier. These instructions may need
to be executed several times.
A directive is an instruction that tells the assembler to do something. It is not a program
instruction.
The processor’s instruction set can be put into several groups. One of these groups is data
movement // input and output // arithmetic operations //jump instructions // compare
instructions // modes of addressing.
453 | P a g e
Aaron creates a web page using JavaScript code and HTML tags.
Describe how the JavaScript code is translated using an interpreter.
• The code is translated one line at a time
• ... and executed immediately
• The interpreter stops as soon as it finds an error
The computer games are written in a high-level language. Bart does not need a compiler or an
interpreter to run the games he buys for his console.
Explain why the games run without the need for a compiler or an interpreter.
• Software will have been built using a compiler // the software is precompiled
• Software is an executable file // the game is already in machine code // the game is already
set-up to run on the console
• Source code is not provided so does not need compiling/interpreting
2 B
4 A
5 C
454 | P a g e
Each member of the group is creating a different part of the game. Each person needs to test
their part of the game independently before they are combined.
Identify the most appropriate type of translator that should be used to test each part of the game
independently. Justify your choice.
• The interpreter translates and executes line by line
• The interpreter stops translation when an error is found
• …the error can be corrected, and the program continues running from where it stopped
• There is no need for an executable file (at this stage)
Draw one or more lines to link each language translator to the most appropriate statement(s)
Hannah is writing a computer program using a high-level language. She uses both a compiler
and an interpreter.
Describe the ways in which Hannah will use an interpreter while writing the program.
• To run / test the incomplete program
• To locate individual errors in the program because the interpreter stops
455 | P a g e
• … and allows the programmer to correct errors in real-time
• To change the program and see the effects of the changes in real-time
Explain the reasons why Hannah uses a compiler when she has finished writing the program.
• To run / test the program multiple times without re-compiling
• To produce an executable file
• … so that it can be distributed without the source code
Some high-level languages are partially compiled and partially interpreted.
Give one benefit and one drawback of using a language that is partially compiled and partially
Interpreted
Benefit:
• Programs may be interpreted on different platforms
Drawback:
• Intermediate code / program still needs to be interpreted on the user’s computer, which may
run slowly
• Extra CPU resources may be required
Jay is developing a computer game that allows users to create stories.
Jay uses a language translator to develop the computer game.
Tick one or more boxes in each row to identify the language translator(s) each statement
describes.
456 | P a g e
Identify two benefits of using a compiler
• The compiler is not required to run the program
• The program can be distributed without the source code
• A compiler produces code that executes faster than the equivalent for an interpreter
Janaka is developing a new computer program. She decides to use an interpreter instead of a
compiler.
State three benefits of using an interpreter
• Easier de-bugging
• Errors can be corrected in real time
• Errors are reported as the interpreter finds them.
• An error can be corrected and translation continued from where it
stopped
• The effect of any change made to the code can be seen immediately
• Parts of the program can be tested, without all the program code being available.
State one drawback of using an interpreter.
Source code is needed at run time
// No executable file produced, (so source code can be edited)
// Translation software needed every time the program is run
// execution time increased
Jackie will use language translation software to run her HLL program.
Identify and describe one type of language translator
Interpreter
• Converts high level language code into low level code
• Translates and runs one line at a time
• Stops when an error occurs
• Allows errors to be corrected in real time // errors can be corrected and translation continued
from that point
Compiler
• Converts high level language code into low level code
• Translates the whole program before attempting to run it
• Creates an executable file/object code...
457 | P a g e
• ... if there are no errors
• Generates a report of all the errors
Francis’s team use language translators.
Complete the descriptions of language translators by writing the missing words
Compilers are usually used when a high-level language program is complete.
They translate all the code at the same time and then run the program. They produce
executable/.exe/object code files that can be run without the source code.
Interpreters translate one line of a high-level language program at a time, and then run that line
of code. They are most useful while developing the programs because errors can be corrected
and then the program continues from that line.
Assemblers are used to translate assembly code into binary/machine code.
Jackie will use language translation software to run her HLL program.
Identify and describe one type of language translator
Interpreter
• Converts high level language code into low level code
• Translates and runs one line at a time
• Stops when an error occurs
• Allows errors to be corrected in real time // errors can be corrected and translation continued
from that point
Compiler
• Converts high level language code into low level code
• Translates the whole program before attempting to run it
• Creates an executable file/object code...
• ... if there are no errors
• Generates a report of all the errors
A programmer uses language translators when writing and testing a program
Describe the operation of a compiler
Attempts to translate the whole source code
Creates a separate error report at the end of the translation process
If translation successful / no errors creates an executable file
Describe the operation of an interpreter
Reads each line then translates it and executes it
458 | P a g e
Stops when an error is encountered // displays errors where it finds Them
Tick one or more boxes in each row to indicate whether the task is performed in the first pass or
the second pass of a two-pass assembler.
Compilers and interpreters translate programs written in a high-level language into a low-level
language.
State two drawbacks of using a compiler compared to an interpreter during program
development.
• larger amounts of source code take time to compile
• slower to produce the object code than an interpreter
• code cannot be changed without recompilation
• the program will not run if there are any errors
• errors cannot be corrected in real-time
• one error may result in other false errors being reported
• cannot easily test specific sections of the source code // cannot easily test unfinished source
code
Explain why high-level language programs might be partially compiled and partially interpreted.
• partially compiled programs can be used on different platforms as they are interpreted when
run
• code is optimised for the CPU as machine code is generated at run time
A program is written in assembly language.
The program is converted into machine code by a two‑pass assembler.
Draw one or more lines to identify the pass or passes in which each action takes place
459 | P a g e
The development team needs to use a translator whilst writing the program for the client.
Identify whether an interpreter or a compiler would be more appropriate at this stage of the
program development.
Justify your choice
Interpreter
Allows the developer to make real-time changes
… so the program can be debugged at each stage
the effect of any changes made by the developer can be seen
immediately
The developer can test when incomplete
… so small parts can be tested without having to test the rest of the program
… if one section does not work others can still be tested
To avoid dependent errors
Compiler
The developer can debug multiple errors simultaneously
460 | P a g e
Produces an executable file
… so that the developer can test the program multiple times without recompiling
A programmer uses both a compiler and an interpreter to translate a program written in a high-
level Language
Describe the advantages of using the interpreter compared to the compiler to translate the
Program
• easier to debug the program
• … because it translates line-by-line and stops when an error is found whereas the compiler
translates all the program at the same time
• … only reporting one error at a time
• … which allows the error to be corrected in real time
whereas the program would need to be corrected and recompiled
• ... and the program can restart at same point when error occurred
with a compiler the program needs to be re-run
• The effect of any changes made by the programmer can be seen
immediately with a compiler the effects can only be seen after re-running
• A partially completed program can be translated / tested on its own a compiler cannot translate
a partial program
State one reason why some high-level languages are partially compiled and partially
interpreted.
• Partially compiled programs can be used on different platforms as they are interpreted when
run
• Code is optimised for the CPU as machine code is generated at run time
• Source code does not need recompiling so more efficient to run
Identify the purpose of the first pass of a two-pass assembler.
• To create a symbol table
A software developer is writing a computer program.
The developer uses an interpreter while writing the program code because it is easier for
debugging.
Explain one reason why it is easier to debug the program code using an interpreter instead of a
compiler
The interpreter will stop when an error is found
so the error can be corrected in real-time, and the result of changes seen immediately
461 | P a g e
Only one error is displayed at a time
… so fewer errors to correct simultaneously and no dependent errors
The program is ready to be sold to customers.
The developer uses a compiler because it creates an executable file.
Explain the reasons why the need to create an executable file makes the complier the
appropriate choice when the program is complete.
Program can be distributed without source code
so it cannot be edited/stolen/plagiarised
Users do not require the translator to run the program
… so time is not spent retranslating by user
14. Error Check
Describe how the data logger calculates the parity bit for each of the bytes in the data Block
• Count the number of one bits in the first seven bit positions
• Add a 0 or 1 to bit position 0, to make the count of one bits an odd number
State the two missing parity bits labelled A and B.
A=1
B=1
Describe how the computer uses the parity byte to perform a further check on the
received data bytes.
462 | P a g e
• A parity bit is worked out for each column
• The computer checks the parity of each bit position in parity byte // the computer
generates copy of the parity byte and compares
• If incorrect parity then there is an error in the data received // No parity error
means no error in the data received
• The position of the incorrect bit can be determined
463 | P a g e
• Identify any row with incorrect parity
• Repeat the process for each column in sequence
• Identify where a row and column with incorrect parity intersect
Describe how the data logger calculates the parity bit for each of the bytes in the data block.
• Count the number of one bits in the first seven bit positions
• Add a 0 or 1 to bit position 0, to make the count of one bits an odd number
State the two missing parity bits labelled A and B.
A=1
B=1
Describe how the computer uses the parity byte to perform a further check on the received data
bytes.
• A parity bit is worked out for each column
• The computer checks the parity of each bit position in parity byte // the computer
generates copy of the parity byte and compares
• If incorrect parity then there is an error in the data received // No parity error
means no error in the data received
• The position of the incorrect bit can be determined
464 | P a g e
Explain how you arrived at your answers for part (b)(i)
• Consider each row in sequence
• Identify any row with incorrect parity
• Repeat the process for each column in sequence
• Identify where a row and column with incorrect parity intersect
465 | P a g e
00100000
In the following parity block, the first column contains the parity bits, and the last row contains
the parity byte. A device transmits the data using even parity.
466 | P a g e
00100000
467 | P a g e
In the following parity block, the first column contains the parity bits, and the last row contains
the parity byte. A device transmits the data using even parity.
Circle the error in the data being transmitted.
Describe how a parity block check can identify a bit that has been corrupted during
468 | P a g e
transmission.
• Each byte has a parity bit // horizontal parity
• An additional parity byte is sent with vertical (and horizontal) parity
• Each row and column must have an even/odd number of 1s
• Identify the incorrect row and column
• The intersection is the error
Give a situation where a parity block check cannot identify corrupted bits.
• Errors in an even number of bits (could cancel each other out)
15. IDE
Jennifer uses an Integrated Development Environment (IDE) to write her computer program.
The IDE allows Jennifer to use both an interpreter and a compiler while creating her
computer program.
Describe the ways in which Jennifer can use both a compiler and an interpreter while
developing the program.
Interpreter:
• Use an interpreter while writing the program
• … to test/debug the partially completed program
• … because errors can be corrected and processing continue from where
the execution stopped // errors can be corrected in real time // errors are
identified one at a time
Compiler:
• Use the compiler after the program is complete
• … to create an executable file
• Use the compiler to repeatedly test the same (completed) section
• … without having to re-interpret every time // compiler not needed at runtime
Identify two debugging tools that a typical IDE can provide
• Breakpoints
• Single stepping
469 | P a g e
• Report windows
Explain how a programmer can make use of a typical Integrated Development Environment
(IDE) when writing and testing a program.
Writing e.g.
470 | P a g e
Enter code into an editor
Pretty printing to identify key terms
Context-sensitive prompts to help complete statements
Expand and collapse code blocks
Auto-complete to suggest what to type next
Auto-formatting to indent code blocks
Dynamic syntax checking
Testing e.g.
Single stepping to run the code line by line
Breakpoints to stop the code at set points to check values
Report window to see how variables change
Identify two features that support the debugging of the code in a typical IDE.
• Single stepping
• Breakpoints
471 | P a g e
• Report window
• Variable expressions
A programmer uses an Integrated Development Environment (IDE) to develop a program that
monitors air quality.
Describe the following features of a typical IDE
Context-sensitive prompts:
• As the code is being written
• …the options to complete the statement are shown
Single stepping:
• allows the programmer to execute the program one line at a time
• …so that the effects of each statement can be seen
A programmer uses an Integrated Development Environment (IDE) to write a computer
program.
The IDE has both a compiler and an interpreter as built-in translators.
The programmer decides to use the compiler when testing the final program.
Describe the benefits of using the compiler during testing.
Creates an executable file
… so the code can be tested multiple times without having to recompile
… so repeated testing takes less time
IDEs have many features other than built-in translators.
Complete the table by identifying one other common IDE feature that can be used for each
purpose. Describe how each feature helps the user during program development.
Each feature must be different. Do not give translator as one of your features.
472 | P a g e
The programmer uses program libraries when developing the program.
Describe two benefits to the programmer of using program libraries.
Saves programming/testing time as code does not have to be written/rewritten from scratch //
code does not have to be tested
Code is already tested so it is more robust/likely to work
The programmer does not need to maintain the library // library routines
are updated automatically
Can perform complex calculations that the programmer may be unable to
do
Makes code more easily readable
473 | P a g e
The program code is written using an Integrated Development Environment (IDE).
One presentation feature found in a typical IDE is prettyprint.
Identify and describe one other presentation feature found in a typical IDE.
• Expand/collapse code blocks…
• … sections of source code that are part of the same block can be
expanded to see the content or collapsed so that the overall code is seen
• Auto-indentation // auto-formatting...
• ... automatically indents/formats code as the user types so that the
structure is clear // aids readability
474 | P a g e
• … view how the data changes as the program is running
16. AI
The team are developing a computer game where the user plays a board game (such as
chess) against the computer.
Describe how the computer would use Artificial Intelligence (AI) to play the board game.
• The rules / past moves / decision making algorithms of the game will be
stored
• The AI program is trained, by playing many times
• AI will look (ahead) at possible moves
• ... and/or analyse the pattern of past choices
• … and choose the move most likely to be successful
• Computer could learn how to improve // learn from previous mistakes
• … by storing the positive/negative result of choices
• ... and changing its future choices
Describe one application of Artificial Intelligence (AI)
Police identifying wanted people
Uses image recognition
to identify features/characteristics/items in an image
Natural language interfaces
Use speech recognition to identify words that are spoken
and adapts to learn regional accents
Self-driving cars
Detects its position on the road and within the traffic
Follows a route // Collision avoidance // Self-parking etc.
Spoken Interfaces
Use natural language processing
to take a sentence and work out its meaning
Game playing
Models characters in a computer game
475 | P a g e
to allow computer characters to react according to the player's
Movements
One use of Artificial Intelligence (AI) is for facial recognition software.
Describe the social impact of using facial recognition software to identify individuals in an airport
• incorrect recognition of faces leads to mistakes such as
• ... access to facilities / systems may be denied
• privacy issues / people do not like data being stored
• individuals will feel safer
• ... there might be a reduction in crime
• faster boarding
• catching criminals
The CCTV system uses Artificial Intelligence (AI) to identify the presence of a person in the
house and to track their movements.
Describe how AI is used in this system.
Examples:
Uses image recognition
Monitors every image taken to identify matching
images/shapes/features to a 'person' …
… starts recording to secondary storage/permanently when a person is
identified
System identifies direction of movement of person and uses this to
decide where/how to move the camera/record
System identifies other cameras to start recording based on direction of
movement
One section of the program being developed will convert user’s speech into commands.
Explain how Artificial Intelligence (AI) can be used in this program
Uses speech recognition
which identifies key phrases / words spoken
… and matches these to a database
476 | P a g e
and generates the most likely sentence / command / word
Customers need to use biometric authentication to access their accounts.
One biometric authentication method is facial recognition.
Facial recognition uses Artificial Intelligence (AI).
Describe how AI is used in facial recognition.
Captures an image of the face
Uses image recognition
Trained to identify the features of a face in an image
… using a large number of images
Analyse images for facial features
Uses the probability of a match
A robot navigates through the restaurant to the table it is serving.
The robot uses Artificial Intelligence (AI) to communicate with the customers. The customers
speak to the robot to order their food and drinks.
Explain how AI will be used in this part of the robot.
Voice/speech recognition is used
to identify if someone speaking
The sound is recorded and analysed
The audio recordings are compared to a database of words/sound waves
to identify the word that has the highest probability of being said
Natural language recognition is used
Words are combined and compared to known sentences
… programmed action(s) for matching sentence(s) are performed
A car park system uses a camera to record the registration number of each car as it enters and
leaves the car park.
Explain how artificial intelligence is used in the car park system to identify the car’s registration
Number
• It uses image recognition
• The pixels of each image from the camera are stored
477 | P a g e
• … and matched to the expected shape/size/colour of registration number
• It uses optical character recognition
• The pixels within the registration number area identified are analysed
• … and compared to expected characters/letters/numbers
478 | P a g e