/en-s5-ict-data-representation-file-size-subnetting-database-query-program-trace-multimedia-security-practice-paper/
/en-s5-ict-data-representation-file-size-subnetting-database-query-program-trace-multimedia-security-practice-paper/
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

S5 ICT Practice Paper | Data representation and file size, subnetting, database queries, program trace, multimedia compression, information security

S5 ICT Practice Paper | Data representation and file size, subnetting, database queries, program trace, multimedia compression, information security

  • 2026-11-17

Senior Secondary ICT

S5 ICT practice paper with answers: binary and hex conversion, bitmap and sound file size, subnetting, transmission time, SQL, program trace, compression and hashing.

Paper details S5 ICT practice paper with answers: data representation and file size, subnetting and transmission time, database query, program trace, compression and security.

Question 1: Data representation and multimedia file size (18 marks)

Data representation

# Question Answer and marking notes
1 (a) Convert the binary number 1101 0110 to denary and to hexadecimal, and state how many bytes it occupies (8 bits = 1 byte). Denary = 128+64+16+4+2 = 214. Split into nibbles: 1101 = D, 0110 = 6, so hex = D6. 8 bits = 1 byte.
2 (b) A 1920 × 1080 bitmap uses 24-bit true colour. Find its uncompressed size in bytes and in MiB (1 MiB = 1 048 576 bytes), correct to 2 decimal places. Pixels = 1920 × 1080 = 2 073 600. At 3 bytes per pixel: 2 073 600 × 3 = 6 220 800 bytes = 5.93 MiB.
3 (c) A stereo sound clip is sampled at 44.1 kHz with 16-bit depth and lasts 180 seconds. Find its uncompressed size in bytes and in MiB, correct to 2 decimal places. Per second: 44 100 × 16 × 2 = 1 411 200 bits = 176 400 bytes. For 180 s: 31 752 000 bytes = 30.28 MiB.
4 (d) If both the width and the height of that bitmap are halved, what fraction of the original uncompressed size remains? Give the answer as a percentage. Halving both dimensions gives 1/2 × 1/2 = 1/4 of the pixels, so the size becomes 25% of the original.

Question 2: Subnetting and transmission time (17 marks)

Networking

# Question Answer and marking notes
5 (a) A network uses the subnet mask 255.255.255.192 (/26). How many usable host addresses does each subnet provide, and how many addresses are in each subnet block? Host bits = 32 − 26 = 6, so each block has 2⁶ = 64 addresses; minus the network and broadcast addresses, 62 are usable.
6 (b) The subnets of 192.168.10.0/26 start at .0, .64, .128 and .192. State the broadcast address of the third subnet and explain why. The third subnet starts at 192.168.10.128 and covers .128 to .191, so its last address 192.168.10.191 is the broadcast address; the next subnet starts at .192.
7 (c) A 24 MB file is sent over a 12 Mbps link at 80% efficiency. How many seconds does the transfer take? (1 MB = 8 Mb) File = 24 × 8 = 192 Mb; effective rate = 12 × 0.8 = 9.6 Mbps; time = 192 ÷ 9.6 = 20 s.
8 (d) Another 60 Mbps leased line uploads a 480 MB backup with no overhead. How many seconds does it take? 480 MB = 3 840 Mb; 3 840 ÷ 60 = 64 s.

Question 3: Database keys, SQL and normalisation (16 marks)

Databases

# Question Answer and marking notes
9 (a) A student table has the fields StudentID, Name, Class and Score. Which field is the best primary key? State two requirements that a primary key must satisfy. StudentID is best. A primary key must (i) uniquely identify each record and (ii) never be null. Name and Class can repeat and Score changes.
10 (b) The 6 records are (4A,72) (4B,55) (4A,58) (4A,91) (4B,67) (4C,48). What does SELECT COUNT(*) FROM Students WHERE Class = ‘4A’ AND Score >= 60; return? Class = 4A gives 72, 58 and 91; requiring Score >= 60 leaves 72 and 91, so COUNT(*) = 2.
11 (c) The original table stores Activity1 and Activity2 in one record. To reach first normal form (1NF), how many tables are needed and how many records does each hold? The repeating group must be removed, giving 2 tables: Student with 6 records and Enrolment with 6 × 2 = 12 records.
12 (d) If a DateOfBirth field is added, which data type is suitable? Give one validation method suitable for the Score field. Use a Date (date/time) type for DateOfBirth. For Score, use a range check, e.g. an integer from 0 to 100.

Question 4: Program trace and loop counts (18 marks)

Programming

# Question Answer and marking notes
13 (a) Trace the program and write the value of total after each iteration (6 values) and the final output.
total := 0
FOR i := 1 TO 6
IF i MOD 3 = 0 THEN total := total + i * 2 ELSE total := total + i
NEXT i
OUTPUT total
i=1: 1; i=2: 3; i=3 (MOD 3 = 0): 3 + 6 = 9; i=4: 13; i=5: 18; i=6: 18 + 12 = 30. Output is 30.
14 (b) How many times is the THEN branch (the multiplication) executed, and at which values of i? i MOD 3 = 0 holds for i = 3 and i = 6, so the branch runs twice.
15 (c) Another program: n := 100; count := 0; WHILE n > 1 DO n := n DIV 2; count := count + 1; END WHILE. List the successive values of n and the final value of count. n goes 100 -> 50 -> 25 -> 12 -> 6 -> 3 -> 1, i.e. 6 iterations; the loop stops when n = 1, so count = 6. (DIV is integer division: 25 DIV 2 = 12.)
16 (d) For the nested loops FOR i := 1 TO 4; FOR j := 1 TO i; OUTPUT i * j; NEXT j; NEXT i, how many times does the inner body run in total? For i = 1, 2, 3, 4 the inner loop runs 1, 2, 3, 4 times: 1 + 2 + 3 + 4 = 10 times.

Question 5: Multimedia compression and video files (16 marks)

Multimedia

# Question Answer and marking notes
17 (a) An 800 × 600 8-bit greyscale image is uncompressed. Find its size in bytes and in KiB. 800 × 600 = 480 000 pixels at 1 byte each: 480 000 bytes = 468.75 KiB.
18 (b) With lossless compression at a 4:1 ratio, what is the compressed size in bytes and in KiB, correct to 2 decimal places? 480 000 / 4 = 120 000 bytes = 117.19 KiB. Lossless compression restores the image exactly.
19 (c) A 1280 × 720, 24-bit, 25 fps video lasting 120 s is compressed to 8% of its raw size. Find the compressed size in bytes and in GiB, correct to 2 decimal places. Per frame: 1280 × 720 × 3 = 2 764 800 bytes; frames = 3 000; raw = 8 294 400 000 bytes; × 0.08 = 663 552 000 bytes = 0.62 GiB.
20 (d) Of MP3, PNG and FLAC, which uses lossy compression? Give one reason. MP3 is lossy: it discards frequency components the ear barely notices, so the original samples cannot be restored, giving smaller files than lossless PNG or FLAC.

Question 6: Cipher, hashing and backup (15 marks)

Information security

# Question Answer and marking notes
21 (a) A Caesar cipher shifts every letter forward by 5 (A to F, Z to E). What plaintext gives the ciphertext XJHWJY? Shift each letter back by 5: X->S, J->E, H->C, W->R, J->E, Y->T, giving SECRET.
22 (b) A system stores only the hash of each password. State two properties of a hash function and explain why this is safer. Properties: (i) one-way, the original cannot be recovered from the digest; (ii) fixed-length output for the same input, with a large change for any small input change. A leaked database exposes only digests.
23 (c) Backing up 400 GB at 80 MB/s takes how many seconds, and how many minutes to 1 decimal place? 400 GB = 409 600 MB; 409 600 / 80 = 5 120 s = 85.3 minutes.
24 (d) Online banking requires a password plus an SMS code. Which type of authentication is this, and which attack does it reduce? Two-factor authentication: a knowledge factor (password) plus a possession factor (phone). A stolen password alone is not enough, reducing account takeover.

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 →