National 5 Computing Science CS(N5)13AMS

National
Qualifications
CS(N5)14B / Computing Science
Marking Instructions

© 2013 Perfect Papers – All rights reserved
Number / Question / Instructions / Marks /
1. / Convert the 8-bit binary number 10110001 into a decimal value. Show your working. / 128 / 64 / 32 / 16 / 8 / 4 / 2 / 1
1 / 0 / 1 / 1 / 0 / 0 / 0 / 1 / 1
Answer: 177
2. / Name the bus used to trigger memory read and memory write operations. / Control bus (do not accept read or write line as these are only parts of the bus).
1 mark / 1
3. / The pseudocode below shows how a program creates a number of labels for ID badges.
(See paper)
State the most suitable data structure and data type for storing the both badgename and workgroup. / badgename:
Data structure: array
Data type: string
workgroup
Data structure: array
Data type: integer
1 mark for correct use of array in both
1 mark for string for badgename
1 mark for integer for workgroup / 3
4. / Explain why it is more efficient to store the number 12 as an integer than it would be to store it as text characters. / Integer can store the number in 4 bits (1100) (1 mark)
but to store it as characters would require a minimum of 16 bits (8 bits per character). (1 mark) / 2
5. / A web page can be found using the URL:
http://www.educationzone.org.uk/help/index.php
Identify the folder being accessed. / Folder is called ‘help’ (accept /help, help/ and /help/
1 mark / 1
6. / IT systems frequently use large amounts of energy.
State two ways that the energy usage of computer systems can be reduced. / ·  Lower power components
·  Sleep mode / reduce power when not in use
·  Automatic power off
·  Other valid
1 mark each, max 2 marks / 2
7. / (a) / State the type of graphic data being stored. / Vector (1 mark) / 1
7. / (b) / State one advantage of storing a graphic in this format. / ·  Resolution independent
·  Require less space that equivalent bitmap
·  Able to edit vector details without altering other elements of image
1 mark for any one bullet / 1
8. / State the type of data stored using MP4 files. / Video (1 mark) / 1
9. / Describe one disadvantage of using passwords for security. / ·  Passwords are often dictionary words.
·  Password are not strong enough (easy to crack)
·  Password doesn’t prove you are the owner, just that you know it.
·  Other valid
1 mark any bullet / 1
10. / Part of a database used to store information about laptops is shown below. (see paper)
Describe how the data above has been sorted. / Data is sorted on:
Price (ascending) and
Processor Speed (Hz) (descending)
1 mark for each sort field with direction, order of fields is important / 2
11. / The Computer Misuse Act makes it an offence to access a computer system without authorisation.
State one other offence defined in the Computer Misuse Act. / ·  Unauthorised modification of data
·  Unauthorised access of a computer system to commit a further crime.
Any 1 for 1 mark / 1
12. / Below is a section of code written in the programming language Java. (see paper)
(a) / This code makes use of indentation. Explain why indentation improves the readability of code. / ·  Related command words or operators are at the same level of indentation.
·  Can see the structure of code (what is inside loops, if statements etc.)
Any bullet for 1 mark / 1
(b) / State two other techniques that a programmer could use to make this code more readable. / ·  Use meaningful variable names
·  Use internal commentary
·  Use white space between lines of code.
1 mark each bullet, max 2 marks / 2
13. / A website is developed for music fans to discover information about bands. The site includes details of concerts, venues and prices.
When a fan visits the website a number of options are available to them, such as listening to music, watching videos or buying merchandise.
(a) / Describe two advantages of accessing this site from a tablet compared to accessing it from a smartphone. / ·  Display: Larger screen area on tablet verses small area on smartphone.
·  Battery life: able to access content for longer due to the larger size and capacity of the tablet battery when compared with the smartphone.
·  Often tablets have better processing capabilities than Smartphones (memory, processor) hence performance is better.
·  Other valid.
1 mark each bullet, max 2 marks / 2
(b) / Accessing the web site makes use of the client/server model of networking.
Describe the role of the server in this case. / The server holds the web page data and servers this to the client when requested.
(1 mark) / 1
(c) / The website stores audio files of bands music.
(i) / State a standard file format for audio files. / MP3 or WAV (also accept ACC or other less common audio formats). (1 mark) / 1
(ii) / The size of an audio file is decreased by reducing the sampling rate of the audio.
Explain why reducing the sampling rate decreases the size of the file. / Sampling rate is the number of times per second that the sound is recorded (1 mark)
Capturing the sound less often, reduces the number of captures and reduces the number of bits from captures in the file (1 mark) / 2
(iii) / State one further change that could be applied to the file to reduce its size. / ·  Compression could be applied
·  Reduce the sampling depth (accept sample size)
1 mark for any bullet / 1
(d) / The site uses an image with a colour depth of 24 bits and a resolution of 640 x 480 pixels.
Calculate the storage requirements for this image. Give your answer in appropriate units. Show your working. / 640 x 480 = 307200 pixels (1 mark)
307200 x 24 bits = 7372800 bits (1 mark)
7372800 / 8 = 921600 bytes
921600 / 1024 = 900 kilobytes (1 mark) / 3
14 / A programming language has several built in functions.
(see paper)
The following program is created to move an item “X” on the screen. The output of the program and associated notes are shown below.
(a) / Using the same initial direction, draw the motion path and indicate the end position of an object “X” which is moved using this program. /
1 mark for marking correct end for X
1 mark for correct initial step
1 mark for three iterations (including initial step) / 3
(b) / The program is translated using an interpreter.
(i) / Describe how an interpreter translates the program code. / Line of source code is translated and executed. (1 mark)
Loop constructs have to be translated multiple times as the translated code is not retained for the next iteration (1 mark) / 2
(ii) / State the name given to the translated binary instructions. / Machine code (1 mark) / 1
(c) / The following command is used in another program.
Move(4.25)
State how the number 4.25 would be stored by a computer system. / Stored as a real number using floating point representation (1 mark) using a mantissa and an exponent (1 mark) / 2
(d) / (i) / The program was designed using pseudocode. Name another design notation that could have been used instead. / ·  Structure diagram
·  Flow Diagram
·  Other valid
1 mark for any bullet / 1
(ii) / Describe one advantage of using this design notation rather than pseudocode. / ·  Structure diagram: Visible representation of program structure provides clear overview of modules or code.
·  Other valid
1 mark for any bullet / 1
15. / The home page for the web site “Every News” is shown below. It provides access to the four main sections of the website: World News, UK News, Strange News and Sport.
(a) / During testing the login button is checked to make sure the script is executed correctly and the data entered is validated correctly.
Describe one other test that should be carried out during testing. / ·  Checked links are valid.
·  Examine visual layout of page for errors
·  Other valid
1 mark for any bullet / 1
(b) / The website URL is http://www.everynews.com. State the meaning of the term URL. / Uniform Resource Locator (1 mark) / 1
(c) / Using examples from the web page shown, explain the difference between an internal and external hyperlink. / The topic links will be internal links so will remain within the domain (1 mark).
The links to news web sites are external links as they go outside the domain (1 mark). / 2
(d) / It is important that web pages are as accessible as possible. Describe two features of good design that could be used to improve accessibility. / ·  Responsive design ensuring access from any device.
·  Use of alt tags for image readers
·  Use of “Skip Navigation” link to bypass complex menus.
·  Use of breadcrumbs to signpost site pages.
·  Other valid
1 mark for each bullet, max 2 marks / 2
(e) / Here are two sample pages from the EveryNews website. (see paper)
The two web pages above use different types of navigation.
Draw a diagram for each page to represent the navigation structure used. / Top Headlines

1 mark
News Search

1 mark / 2
(f) / EveryNews stores user data securely and only for the amount of time that it is required.
(i) / State one other principle of the Data Protection Act that EveryNews must comply with. / ·  Don’t sure outwith EU area or outwith areas with similar data protection laws.
·  Process data fairly and lawfully
·  Keep data accurate and up-to-date
·  Provide access to data for data subjects when requested.
·  Process data for the specified purpose.
Any one for 1 mark / 1
(ii) / For your answer to (i) above, explain why compliance with this principal is important to users. / ·  Protects users data in other locations.
·  Only use the data to do things that are fair and within the law affecting the data subject.
·  Ensures that out-of-date data doesn’t adversely affect data subject.
·  Alls the subject to see and check the data as required.
·  The data cannot be used for other purposes so its use is limit.
Any one for 1 mark, must match with (i) above. / 1
16 / A countdown timer on a website is created to give a user 60 seconds to enter his or her passcode before it automatically blocks the user from access the site.
The code for the timer is shown below. (see paper)
(a) / The program stops when time is equal to 60. The design is changed to include a warning message when the time is more than 45.
Use pseudocode or a programming language you are familiar with to show how this additional feature could be implemented. / Add after Line 4
IF total_time > 45 then
SEND “Warning” TO DISPLAY
ENDIF
1 mark for IF (with END IF or equivalent)
1 mark for correct condition
1 mark for message / 3
(b) / This screenshot shows the interface used to enter a user’s passcode.

When the submit button is clicked the highlighted numbers are read into an array called usercode. This has to be matched with the passcode which is stored in an array called passcode.
Write below, using pseudocode or a language you are familiar with, code that would display the message “Unlocked” when the array elements in ‘usercode’ are equal to the equivalent elements in ‘passcode’. / unlocked = true
FOR roller = 1 TO 4
IF usercode[roller] > passcode[roller] THEN
unlocked = false
ENDIF
NEXT roller
IF unlocked = TRUE THEN
SEND “Unlocked” TO DISPLAY
END IF
1 mark for use of loop
1 mark for use of boolean flag
1 mark for displaying message
IF usercode[1]=passcode[1] AND
usercode[2]=passcode[2] AND
usercode[3]=passcode[3] AND
usercode[4]=passcode[4] THEN
SEND “Unlocked” TO DISPLAY
ENDIF
1 mark for use of IF
1 mark for use of AND in condition
1 mark for displaying message
DO NOT ACCEPT MULTIPLE NESTED IF STATEMENTS AS THIS IS INEFFICIENT / 3
(c) / Explain why exceptional test data will not be required to test the passcode screen program. / Exceptional test data is not required because there is no way to enter data that is outwith the accepted range (1 mark) / 1
(d) / An alternative to using the passcode is fingerprint recognition.
(i) / Describe one possible concern about using this technique with the web site. / ·  Security of fingerprint data
·  Need to enrol all fingers in system
·  Accuracy of system
·  Other valid
1 mark for any bullet
(ii) / Explain why biometric security is now often used to verify a person’s identity. / Biometrics security is more likely to prove that the user is there person specified because the secure uses a physical characteristic to establish identity.
1 mark / 1
(e) / Access to web sites can also be protected by a firewall. Describe how a firewall could protect a web server. / A firewall block access from/to specific ports on the server and/or from specific external IPs. This can prevent attacks to services or attacks from specific external networks.