/en-s4-ict-data-representation-digital-media-networks-databases-programming-security-practice-paper/
/en-s4-ict-data-representation-digital-media-networks-databases-programming-security-practice-paper/
英文版
3
General Inquiry: info@TutorZone.com.hk
Office Hours: Monday to Saturday - 9:00 AM to 6:00 PM
WhatsApp Monday to Sunday - 24 hours
Hotline: +852 6828 1809
Instant Support: +852 9061 3106

S4 ICT Paper: Data Representation, Digital Media, Networks, Databases, Programming and Security (100 marks)

S4 ICT Paper: Data Representation, Digital Media, Networks, Databases, Programming and Security (100 marks)

  • 2026-11-12

S4 ICT Practice Paper

S4 ICT paper: 6 questions, 24 parts, 100 marks, 60 minutes, covering binary and hexadecimal conversion, file sizes, networks, SQL databases, Python and security.

Paper details S4 ICT practice paper with 6 questions and 24 parts on data representation, digital media, networks, databases, programming and security.

Section A: Data Representation and Storage (15 marks)

A student stores class data in a computer and keeps photographs on a 4 GB memory card, each photograph about 5 MB.

# Question Answer and marking notes
1 Convert the denary number 156 into an 8-bit binary number. Answer: 156 equals 128 plus 16 plus 8 plus 4, so the 8-bit pattern is 10011100. (Marking: 2 marks for correct place values, 2 marks for the answer.)
2 Convert the hexadecimal number 2F5 into denary. Answer: 2 times 256 plus 15 times 16 plus 5, that is 512 plus 240 plus 5, so 757. (Marking: 2 marks for the expansion, 2 marks for the answer.)
3 How many photographs can the card hold at most? Show your working. Answer: 4 GB is 4096 MB, and 4096 divided by 5 equals 819.2, so at most 819 photographs since a part photograph cannot be stored. (Marking: 2 marks for the conversion, 1 mark for the division, 1 mark for the whole-number answer.)
4 Compare ASCII and UTF-8 in storing Chinese characters. Answer: ASCII uses only 7 bits and covers English letters, digits and basic symbols, so it cannot represent Chinese characters, while UTF-8 is a variable-length encoding that uses three bytes for a common Chinese character and therefore handles Chinese and English together. (Marking: 2 marks for the limit of ASCII, 1 mark for variable length of UTF-8.)

Section B: Digital Imaging and Sound (17 marks)

An image of 1920 by 1080 pixels uses a colour depth of 24 bits. A piece of music is sampled at 44.1 kHz with 16-bit resolution in stereo for 60 seconds.

# Question Answer and marking notes
5 Find the file size of the uncompressed image in bytes. Answer: each pixel needs 24 divided by 8, that is 3 bytes, so 1920 times 1080 times 3 gives 6,220,800 bytes, about 5.93 MiB. (Marking: 2 marks for bytes per pixel, 1 mark for the pixel count, 2 marks for the answer.)
6 Find the uncompressed file size of the music in bytes. Answer: 44100 times 2 bytes times 2 channels times 60 seconds gives 10,584,000 bytes, about 10.09 MiB. (Marking: 2 marks for sampling rate and bytes per sample, 1 mark for channels, 2 marks for the answer.)
7 A 12 MB file is sent over a 48 Mbps network. Find the time needed. Answer: 12 MB is 96 megabits, and 96 divided by 48 gives 2.0 seconds. (Marking: 2 marks for the bit conversion, 1 mark for the division, 1 mark for the value with unit.)
8 Explain why the image is usually compressed before transmission. Answer: compression reduces the file size, so less bandwidth and time are needed for transmission and less storage is used, and the amount of data falls substantially for an acceptable loss of quality. (Marking: 1 mark for smaller size, 1 mark for saving bandwidth or time, 1 mark for the quality trade-off.)

Section C: Computer Networks (17 marks)

A school local area network connects to the Internet through a 100 Mbps line, uses the subnet 192.168.1.0/24 and has a round-trip delay of about 40 ms.

# Question Answer and marking notes
9 What is the theoretical minimum time to download a 250 MB file from the Internet? Answer: 250 MB is 2000 megabits, and 2000 divided by 100 gives 20 seconds. (Marking: 2 marks for the conversion, 2 marks for the division, 1 mark for the value with unit.)
10 How much time is spent on delay alone for a communication of six round trips? Answer: 40 ms times 6 gives 240 ms, that is 0.24 second. (Marking: 3 marks for the multiplication, 1 mark for the unit.)
11 How many host addresses can the subnet provide at most? Answer: a /24 mask is 255.255.255.0, leaving 8 host bits, and 2 to the power 8 minus 2 for the network and broadcast addresses gives 254. (Marking: 2 marks for the 8 host bits, 1 mark for removing two addresses, 1 mark for the answer.)
12 Compare a local area network and a wide area network in coverage and ownership. Answer: a local area network covers a room up to a building and is usually owned and managed by one organisation, while a wide area network spans cities, countries or the world and is generally owned by telecom operators whose lines users rent. (Marking: 2 marks for coverage, 2 marks for ownership.)

Section D: Relational Databases (17 marks)

A tutorial centre database has two tables: Student(StudentID, Name, Class) and Lesson(LessonID, StudentID, Date, Fee).

# Question Answer and marking notes
13 State the primary key of the Student table and two requirements of a primary key. Answer: the primary key is StudentID, and it must be unique for every record and must never be null. (Marking: 1 mark for naming the key, 1.5 marks for uniqueness, 1.5 marks for not null.)
14 Write an SQL statement listing the names of students in class 3A, sorted by name in ascending order. Answer: SELECT Name FROM Student WHERE Class equals 3A ORDER BY Name ASC. (Marking: 1 mark for SELECT and FROM, 2 marks for the condition, 2 marks for the ordering.)
15 Explain why StudentID in the Lesson table should be a foreign key. Answer: the foreign key refers to the primary key of the Student table so that every lesson record matches a student that really exists, which prevents orphan records and keeps referential integrity. (Marking: 2 marks for referring to the primary key, 2 marks for referential integrity.)
16 What kind of correspondence exists between the two tables? Give one example. Answer: it is one-to-many, because one student can have many lesson records while each lesson record belongs to exactly one student. (Marking: 2 marks for one-to-many, 2 marks for the example.)

Section E: Programming (17 marks)

Consider this Python code: total is set to 0, then for i in range(1, 6) total becomes total plus i. A second loop multiplies n, starting at 1, by 3 repeatedly until n exceeds 100.

# Question Answer and marking notes
17 What is the value of total after the code runs? Answer: 1 plus 2 plus 3 plus 4 plus 5 gives 15. (Marking: 3 marks for the running sum, 1 mark for the answer.)
18 How many times does the second loop run, and what is the final value of n? Answer: the values are 3, 9, 27, 81 and 243, so the loop runs five times and n ends at 243. (Marking: 2 marks for the sequence, 1 mark for the count, 2 marks for the final value.)
19 Write a function average(a, b, c) that returns the mean of three numbers. Answer: define a function named average taking a, b and c, then return the sum divided by 3. (Marking: 2 marks for the definition, 1 mark for the arithmetic, 1 mark for return.)
20 A student forgets to update the control variable inside a while loop. What happens and how can it be fixed? Answer: the condition stays true, so the loop never ends and the program falls into an infinite loop that consumes processor time; the control variable must be updated inside the loop, or a break added where appropriate. (Marking: 2 marks for the infinite loop, 2 marks for the fix.)

Section F: Information Security and Ethics (17 marks)

A tutorial centre must protect student personal data and let parents check results online, so the system deals with login, transmission and storage.

# Question Answer and marking notes
21 Compare symmetric and asymmetric encryption and give one use of each. Answer: symmetric encryption uses one shared key for both directions, is fast and suits bulk data, while asymmetric encryption uses a public key to encrypt and a private key to decrypt, which suits exchanging keys and digital signatures. (Marking: 2 marks for the keys, 1.5 marks each for speed or use.)
22 Explain the role of a firewall in this system. Answer: a firewall filters packets entering and leaving the network by rules, opens only the ports that are needed and blocks unauthorised access, which reduces attacks on the internal database. (Marking: 2 marks for packet filtering, 1 mark for limiting ports, 1 mark for protecting internal data.)
23 State two ways to recognise a phishing email. Answer: the sender domain does not match the official one, and the message pressures the reader to click a link or type a password and often carries poor wording or a suspicious attachment. (Marking: 2 marks for each point.)
24 Suggest two practices for the results page that follow personal data protection principles. Answer: collect and show only the minimum data needed for the purpose, and verify identity with an account and password, encrypt data in transit and set a retention period after which records are deleted. (Marking: 2 marks for each point.)

Find a tutor — freeTutor Registration →

A TutorZone practice paper; original questions and passages, not publisher material.

Join as a tutor or coach — academic, music, sports, arts, STEM. Free to register. See how it works →