/en-s4-ict-binary-hex-file-size-logic-gates-half-adder-spreadsheet-functions-absolute-reference-network-bandwidth-transmission-time-pseudocode-tracing-system-testing-practice-paper/
/en-s4-ict-binary-hex-file-size-logic-gates-half-adder-spreadsheet-functions-absolute-reference-network-bandwidth-transmission-time-pseudocode-tracing-system-testing-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 Conversion, Image and Audio File Size, Logic Gates and the Half Adder, Spreadsheet Functions and Absolute References, Network Bandwidth and Transmission Time, Pseudocode Tracing and System Testing

S4 ICT Practice Paper (Set 2): Binary and Hexadecimal Conversion, Image and Audio File Size, Logic Gates and the Half Adder, Spreadsheet Functions and Absolute References, Network Bandwidth and Transmission Time, Pseudocode Tracing and System Testing

  • 2026-11-22

ICT · S4

S4 ICT practice paper with full answers: binary and hex conversion, image and audio file size, logic gates, the half adder, spreadsheet functions, bandwidth and testing.

Paper details S4 ICT practice paper with full worked answers on binary and hexadecimal conversion, image and audio file size, logic gates and the half adder, spreadsheet functions and absolute references, network bandwidth and transmission time, pseudocode tracing, binary search and software testing.

Question 1: Data Representation and File Size (16 marks)

A computer stores all data in binary. Each bit is either 0 or 1 and eight bits make one byte. A 24-bit colour image uses three bytes per pixel, while uncompressed audio size depends on sampling rate, bit depth and the number of channels. Take 1 MB = 1,024 KB and 1 KB = 1,024 bytes.

# Question Answer and marking notes
1 Convert decimal 45 into an 8-bit binary number and write its hexadecimal form. Repeated division by 2 gives 00101101; grouping into nibbles 0010 1101 gives 2D.
2 Convert binary 11011010 into decimal and hexadecimal. 128 + 64 + 16 + 8 + 2 = 218; nibbles 1101 1010 give DA, so the values are 218 and DA.
3 How many MB does an uncompressed 1,024 x 768 24-bit colour image occupy? 1,024 x 768 x 3 = 2,359,296 bytes; dividing by 1,048,576 gives 2.25 MB.
4 How many MB (two decimal places) does an uncompressed 3-minute stereo recording at 44,100 Hz and 16-bit occupy? 44,100 x 2 bytes x 2 channels x 180 s = 31,752,000 bytes; dividing by 1,048,576 gives 30.28 MB.

Question 2: Logic Gates and the Half Adder (17 marks)

A circuit takes inputs A and B with X = NOT (A AND B). A half adder is built from an XOR gate and an AND gate: sum S = A XOR B and carry C = A AND B. A full adder uses two half adders and one OR gate.

# Question Answer and marking notes
5 Complete the truth table of X = NOT (A AND B) for inputs (0,0), (0,1), (1,0) and (1,1). AND gives 1 only for (1,1), so NOT gives 0 there; the other three rows give 1, i.e. 1, 1, 1, 0.
6 When A = 1 and B = 1, what are the values of X, S and C? A AND B = 1 so X = 0; A XOR B = 0 so S = 0; A AND B = 1 so C = 1.
7 When A = 0 and B = 1, what are the half adder outputs S and C? 0 XOR 1 = 1 so S = 1; 0 AND 1 = 0 so C = 0, that is 1 + 0 needs no carry.
8 A full adder receives A = 1, B = 1 and carry-in = 1. Find the sum and carry-out. First half adder gives S1 = 0 and C1 = 1; the second gives Sum = 0 XOR 1 = 1 and C2 = 0; the OR gate gives carry-out 1, so Sum = 1 and carry-out = 1 (1 + 1 + 1 = 11 in binary).

Question 3: Spreadsheet Functions and Absolute References (17 marks)

In a spreadsheet cells A1 to A5 hold 12, 8, 15, 8 and 30; B1 holds the tax rate 0.05 and B2 contains the formula =A2*B$1. All other cells are empty.

# Question Answer and marking notes
9 What is the result of =SUM(A1:A5)? 12 + 8 + 15 + 8 + 30 = 73.
10 What is the result of =AVERAGE(A1:A5)? 73 / 5 = 14.6.
11 What is the result of =COUNTIF(A1:A5,”>=10″)? The values 12, 15 and 30 are at least 10, so the count is 3.
12 What is the value of B2, and what does the formula become if it is copied from B2 to C3? B2 = 8 x 0.05 = 0.4. The relative reference A2 shifts one column right and one row down to B3, while the locked row of B$1 stays B$1, so C3 contains =B3*B$1.

Question 4: Network Bandwidth and Transmission Time (17 marks)

A 150 MB file is uploaded over the Internet with an upload bandwidth of 20 Mbps. Use 1 byte = 8 bits and 1 MB = 8 Mb, and ignore protocol overhead. Each round trip of a data packet takes 25 ms.

# Question Answer and marking notes
13 How many Mb does the file contain? 150 x 8 = 1,200 Mb.
14 At 20 Mbps, how many seconds does the upload take in theory? 1,200 / 20 = 60 seconds.
15 If the bandwidth rises to 50 Mbps, how long does it take and what percentage of time is saved? 1,200 / 50 = 24 seconds; (60 – 24) / 60 x 100% = 60%, so 60% is saved.
16 The transfer needs four round trips. What is the total latency in seconds, and what percentage of the 60-second transfer time is it? 25 x 4 = 100 ms = 0.1 s; 0.1 / 60 x 100% is about 0.17%, so latency is a small share.

Question 5: Pseudocode Tracing and Search Algorithms (17 marks)

Consider this pseudocode: SET total = 0; SET n = 1; WHILE n <= 5 repeat total = total + n * n and n = n + 1; after the loop PRINT total. A second part considers searching 1,024 items already sorted by size.

# Question Answer and marking notes
17 What are the successive values of total when n = 1, 2 and 3? At n = 1 total = 1; at n = 2 total = 1 + 4 = 5; at n = 3 total = 5 + 9 = 14.
18 What does the program finally print? 1 + 4 + 9 + 16 + 25 = 55.
19 If the loop condition becomes n <= 8, what is the final total? 55 + 36 + 49 + 64 = 204.
20 Searching 1,024 sorted items, how many comparisons do linear search and binary search need at most, and roughly how many times faster is binary search? Linear search needs 1,024 comparisons in the worst case; binary search halves the range each time, 1,024 to 512 down to 1, needing 10 comparisons, about 102 times faster.

Question 6: System Development and Software Testing (16 marks)

A school develops a results management system. The system development life cycle has five stages: system analysis, system design, implementation, testing and maintenance. The system has nine modules and testing finds 45 defects in total.

# Question Answer and marking notes
21 Arrange the five stages in the correct order. System analysis, system design, implementation, testing and maintenance.
22 What is the average number of defects per module? 45 / 9 = 5, so five defects per module on average.
23 Briefly distinguish unit testing, integration testing and acceptance testing. Unit testing checks each module on its own; integration testing checks the interfaces and data flow between modules; acceptance testing lets users confirm the system meets their requirements before release.
24 How do black-box testing and white-box testing differ? Give one suitable test item for each. Black-box testing looks only at inputs and outputs, for example rejecting a mark of 101; white-box testing examines internal logic and paths, for example checking that every IF branch is executed once.

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 →