/en-s4-ict-set-2-binary-hexadecimal-file-size-image-audio-hardware-software-python-trace-network-bandwidth-security-literacy-practice-paper/
/en-s4-ict-set-2-binary-hexadecimal-file-size-image-audio-hardware-software-python-trace-network-bandwidth-security-literacy-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

S4 ICT Practice Paper (Set 2): Binary and Hexadecimal, Image and Sound File Size, Hardware and System Software, Python Program Tracing, Network Bandwidth and Download Time, Information Security and Literacy (100 marks, with answers)

S4 ICT Practice Paper (Set 2): Binary and Hexadecimal, Image and Sound File Size, Hardware and System Software, Python Program Tracing, Network Bandwidth and Download Time, Information Security and Literacy (100 marks, with answers)

  • 2026-11-15

Junior Secondary Computer Studies

S4 ICT paper Set 2 with answers: binary and hex conversion, file size, hardware and software, Python tracing, bandwidth, security; 24 parts, 100 marks, 60 minutes.

Paper details S4 ICT practice paper Set 2 with full answers: 100 marks, 60 minutes.

Number Systems and Data Representation

These questions cover binary, hexadecimal and character encoding. Show your working.

# Question Answer and marking notes
1 Convert the binary number 10110110 to denary and list the place value of every bit. Answer: 10110110 = 128 + 32 + 16 + 4 + 2 = 182. From right to left the place values are 1, 2, 4, 8, 16, 32, 64 and 128, so the leading 1 stands for 128 and the value of the whole number is 182.
2 Convert the hexadecimal number A3C to denary and state one advantage of hexadecimal in computer systems. Answer: A = 10 and C = 12, so A3C = 10 x 256 + 3 x 16 + 12 = 2620. One hexadecimal digit maps exactly to four binary digits, so hex is much shorter to write and is used for colour codes, memory addresses and machine code.
3 The ASCII code of the character A is 65. Write 65 as an 8-bit binary number and state how many different characters one byte can represent. Answer: 65 = 01000001. A byte has 8 bits, so it can represent 2 to the power 8, that is 256, different characters.
4 Explain why computers work internally in binary rather than denary, giving one reason. Answer: Electronic components have only two stable states, high and low voltage, which map directly to 1 and 0. Two-state circuits are more reliable and cheaper to build than circuits that must distinguish ten voltage levels, and they are less affected by noise.

Image and Sound File Size

These questions cover the size of uncompressed images and digital sound. 1 MiB = 1 048 576 bytes.

# Question Answer and marking notes
5 An uncompressed image has 1024 x 768 pixels at a colour depth of 24 bits. Find its file size in bytes, KiB and MiB. Answer: pixels = 1024 x 768 = 786432; each pixel uses 24 bits, that is 3 bytes; size = 786432 x 3 = 2359296 bytes = 2304 KiB = 2.25 MiB.
6 An uncompressed stereo recording has a sampling rate of 44100 Hz, a resolution of 16 bits and a length of 60 seconds. Find its size in bytes and MiB (2 decimal places). Answer: bytes per second = 44100 x 2 x 2 = 176400; total = 176400 x 60 = 10584000 bytes, about 10.09 MiB.
7 Describe lossy and lossless compression, and give one common file format for each. Answer: Lossy compression permanently discards detail that people are unlikely to notice, giving a much smaller file, for example JPEG and MP3. Lossless compression only recodes the data so that it can be restored exactly, for example PNG, FLAC and ZIP.
8 Explain why JPEG is a poor choice for a scanned text document. Answer: JPEG is lossy, so it blurs the edges of letters and adds blocky artefacts. Strokes may merge and the text becomes hard to read or to recognise, so a lossless format such as PNG is preferred for text.

Hardware and System Software

These questions cover memory, the processor and system software.

# Question Answer and marking notes
9 Compare RAM and ROM in terms of writability, volatility and typical use. Answer: RAM can be read and written, and its contents are lost when power is removed, so it holds programs and data in use. ROM is normally read only and keeps its contents without power, so it stores the start-up program and firmware.
10 Explain the purpose of cache memory and why it improves performance. Answer: Cache is a small, very fast memory inside the processor that keeps recently or frequently used instructions and data. The processor can then fetch most of what it needs without waiting for slower main memory, which raises overall performance.
11 List three main functions of an operating system and give one example of each. Answer: First, memory management, for example allocating and reclaiming memory for programs. Second, file management, for example creating, reading and deleting files. Third, device management, for example controlling a printer or a USB device through drivers. A user interface, process scheduling and security are also acceptable.
12 Distinguish a compiler from an interpreter and state one suitable situation for each. Answer: A compiler translates the whole source program into machine code in one go and produces a stand-alone executable, which runs fast, so it suits released software. An interpreter translates and runs the code line by line with no separate executable, which makes debugging easier, so it suits learning and quick testing.

Python Program Tracing

For each Python snippet, state the output or the error. Show your trace.

# Question Answer and marking notes
13 total = 0
for i in range(1, 6):
total = total + i * i
print(total)
State the output and explain the sequence produced by range(1, 6).
Answer: the output is 55. range(1, 6) starts at 1 and stops before 6, so i takes the values 1, 2, 3, 4 and 5. The squares add up to 1 + 4 + 9 + 16 + 25 = 55.
14 n = 20
steps = 0
while n > 1:
n = n // 2 if n % 2 == 0 else 3 * n + 1
steps = steps + 1
print(steps, n)
State the output.
Answer: the output is 7 1. The value of n goes 20 -> 10 -> 5 -> 16 -> 8 -> 4 -> 2 -> 1, so the loop body runs 7 times and stops when n becomes 1.
15 def average(a, b=10):
return (a + b) / 2
print(average(4))
print(average(4, 8))
State both lines of output and explain the role of b=10.
Answer: the first line is 7.0 and the second line is 6.0. b=10 is a default parameter value, so when the second argument is omitted b becomes 10 and average(4) gives (4 + 10) / 2 = 7.0.
16 scores = [45, 62, 78]
highest = 0
for s in scores:
if s > highest:
highest = s
print(highest)
Under what condition does this code give a wrong answer, and how would you fix it?
Answer: if every score is negative, for example [-5, -12], the starting value 0 is already larger than all the scores, so the printed answer stays 0 and is wrong. Fix it by starting with highest = scores[0], or simply use the built-in max(scores).

Network Bandwidth and Download Time

These questions cover transfer speed, addressing and protocols. Note that 1 byte = 8 bits.

# Question Answer and marking notes
17 A file of 240 MB is downloaded over a 20 Mbps link. Find the shortest download time in seconds, assuming no other overhead. Answer: the file is 240 x 8 = 1920 Mbit, so the time is 1920 divided by 20 = 96 seconds. Note that a byte is 8 bits, and mixing MB with Mbit is the most common mistake here.
18 Explain the difference between an IP address and a MAC address, and state one function of a router in Internet communication. Answer: a MAC address is burned into the network card by the manufacturer and identifies the hardware inside one local network, while an IP address is assigned by the network, can change and is used to locate a device across networks. A router assigns IP addresses with DHCP, forwards packets between networks and hides internal addresses with NAT.
19 State the difference between HTTP and HTTPS, and explain why HTTPS matters when signing in to an account over public Wi-Fi. Answer: HTTPS adds TLS encryption on top of HTTP and uses a certificate to prove the server identity. On public Wi-Fi, plain HTTP sends the user name and password in clear text so anyone on the same network can capture them; HTTPS encrypts the traffic and makes impersonation much harder.
20 Give one example each of a LAN and a WAN, and state how they differ in coverage. Answer: a LAN example is the network of one school or one office, usually within a single building. A WAN example is a company link between cities, or the Internet itself, whose coverage extends over cities, countries and the whole world.

Information Security and Literacy

These questions cover attacks, encryption, backup and protection of personal data.

# Question Answer and marking notes
21 List three features that help identify a phishing email, and state what to do on receiving one. Answer: the sender domain does not match the official domain or is misspelt; the message creates urgency and asks the reader to click a link to enter a password or pay; and the link target differs from the displayed text or the attachment is an unusual executable. Do not click or open anything, verify through official channels and report then delete.
22 Compare symmetric and asymmetric encryption, and explain why websites usually use both. Answer: symmetric encryption uses one key for both directions, which is fast but makes key distribution difficult. Asymmetric encryption uses a public key to encrypt and a private key to decrypt, which allows safe key exchange but is slower. Websites use asymmetric cryptography to authenticate and exchange a temporary symmetric key, then use that symmetric key for bulk data, giving both security and speed.
23 Explain the 3-2-1 backup rule and why syncing to a cloud folder alone is not a complete backup. Answer: 3-2-1 means three copies of the data, on two different types of media, with one copy off site. A synced cloud folder mirrors deletions and ransomware encryption almost at once, so the cloud copy is damaged along with the local one. An offline or non-rewritable backup is still needed.
24 Suggest three security measures a school should take when handling students personal data. Answer: grant access on a need-to-know basis with least-privilege accounts; encrypt data in storage and in transit and avoid memory sticks or personal email; set a retention period and securely delete records when it ends, keeping access logs. Regular staff training on phishing and weak passwords is also expected.

Find a tutor — freeTutor Registration →

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

© TutorZone · www.tutorzone.com.hk · For personal study and teaching use only.

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