/en-s4-ict-number-systems-logic-gates-data-representation-spreadsheet-network-addressing-algorithm-tracing-practice-paper/
/en-s4-ict-number-systems-logic-gates-data-representation-spreadsheet-network-addressing-algorithm-tracing-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 Information and Communication Technology Practice Paper: Number Systems and Coding, Logic Gates and Truth Tables, Image and Audio File Size, Spreadsheet Formulas and Absolute References, IP Addressing and Subnetting, Algorithm Tracing and Complexity

S4 Information and Communication Technology Practice Paper: Number Systems and Coding, Logic Gates and Truth Tables, Image and Audio File Size, Spreadsheet Formulas and Absolute References, IP Addressing and Subnetting, Algorithm Tracing and Complexity

  • 2026-11-22

ICT · S4

S4 ICT practice paper: 24 parts, 100 marks, 75 minutes on number bases, logic gates, file sizes, spreadsheet formulas, subnetting and algorithm tracing, with answers.

Paper details S4 ICT practice paper: number systems, logic gates, file size, spreadsheets, subnetting, algorithms

Question 1: Number Base Conversion and Character Encoding (20 marks)

A computer stores data in binary, and programmers often use hexadecimal as a short form. One 8-bit byte can hold an unsigned integer from 0 to 255, and the two’s complement form is used for negative values.

# Question Answer and marking notes
1 Convert the binary number 1101 0110 to decimal and to hexadecimal. The place values give 128 + 64 + 16 + 4 + 2 = 214, and grouping bits in fours gives the hexadecimal value D6.
2 Express -58 in 8-bit two’s complement, showing both binary and hexadecimal. The binary form of 58 is 0011 1010; inverting gives 1100 0101 and adding 1 gives C6 in hexadecimal. Check: 256 – 58 = 198.
3 Convert 3400 to hexadecimal and state how many 4-bit nibbles are needed. 3400 = D48, which is 3 nibbles, that is 12 bits.
4 In UTF-8 an English letter takes 1 byte and a common Chinese character takes 3 bytes. Compare the bytes used by 1000 letters and 1000 Chinese characters. 1000 letters take 1000 x 1 = 1000 bytes; 1000 Chinese characters take 1000 x 3 = 3000 bytes. The difference is 2000 bytes, three times as much.

Question 2: Logic Gates and Truth Tables (16 marks)

A combinational logic circuit has the output Y = (A AND NOT B) OR (A AND B), where A and B are the inputs. AND, OR, NOT, NAND and XOR gates each have their own truth table.

# Question Answer and marking notes
5 Give the value of Y for the four input combinations from 00 to 11 and state what the circuit actually does. For A=0 B=0 the output is 0; A=0 B=1 gives 0; A=1 B=0 gives 1; A=1 B=1 gives 1. The truth table equals A itself, so Y = A and the B input is redundant.
6 Use De Morgan laws to write equivalent expressions for NOT (A OR B) and NOT (A AND B). NOT (A OR B) = (NOT A) AND (NOT B); NOT (A AND B) = (NOT A) OR (NOT B).
7 How can a single NAND gate be wired to produce NOT A? Tie both inputs of the NAND gate to A; the output is then NOT A, since A NAND A = NOT A.
8 What is the minimum number of NAND gates needed to build one XOR gate? Four NAND gates are needed; NAND is a universal gate from which any basic logic function can be built.

Question 3: File Size of Images and Audio (18 marks)

The size of digital media depends on resolution, colour depth, sampling rate and bit depth. Use 1 MB = 1048576 bytes and 1 kB = 1 000 bytes.

# Question Answer and marking notes
9 How many bytes and how many MB does an uncompressed 1024 x 768 image with a 24-bit colour depth occupy? Pixels = 1024 x 768 = 786432; each pixel takes 3 bytes, so the total is 786432 x 3 = 2359296 bytes = 2.25 MB.
10 After lossless compression at a ratio of 8 to 1, what are the new size in bytes and in MB? Compressed size = 2359296 / 8 = 294912 bytes = 0.2812 MB.
11 How many bytes and how many MB does an uncompressed 44 kHz, 16-bit, stereo recording of 180 seconds occupy? Each second needs 44100 samples x 2 bytes x 2 channels = 176400 bytes; over 180 seconds that is 31752000 bytes = 30.28 MB.
12 A 4-minute MP3 at 128 kbps occupies how many bytes and how many MB? A bit rate of 128 kbps is 128000 / 8 = 16000 bytes per second; over 240 seconds that is 3840000 bytes = 3.66 MB.

Question 4: Spreadsheet Formulas and References (16 marks)

In a spreadsheet, columns A, B and C hold the item name, unit price and quantity, column D holds the amount (price x quantity), and cell E1 holds the tax rate of 5 per cent. Rows 2 to 4 hold three items, with B2 = 45 and C2 = 12.

# Question Answer and marking notes
13 If D2 contains =B2*C2, what does the formula become when copied to D4? Relative references shift by two rows, so D4 becomes =B4*C4.
14 E holds the tax for each item. Write the formula for E2 so that it can be copied down while still pointing at the tax rate cell. E2 = =D2*$E$1, where $E$1 is an absolute reference that does not change when copied.
15 Column F should show “Wholesale” when the quantity is 10 or more and “Retail” otherwise. Write the IF function for F2. F2 = =IF(C2>=10,”Wholesale”,”Retail”).
16 Using B2, C2 and the 5 per cent tax rate, find the amount in D2, the tax in E2 and the total including tax. Amount = 45 x 12 = 540; tax = 540 x 5% = 27; total = 540 + 27 = 567.

Question 5: IP Addressing, Subnetting and Transmission (16 marks)

A computer has the IP address 192.168.10.35 with the prefix /26, that is the subnet mask 255.255.255.192. The remaining parts are about file transfer and network topologies.

# Question Answer and marking notes
17 Find the network address, the broadcast address and the number of usable hosts of this subnet. A /26 subnet has a block size of 2^(32-26) = 64. The last octet 35 falls in the block 0 to 63, so the network address is 192.168.10.0, the broadcast address is 192.168.10.63 and there are 64 – 2 = 62 usable hosts.
18 A 5 MB file is sent over a 20 Mbps link. Ignoring overhead, find the time needed in seconds to three decimal places. 5 MB = 5242880 bytes x 8 = 41943040 bits; time = 41943040 / 20000000 = 2.097 seconds.
19 Give one advantage and one disadvantage of the star topology. Advantage: a faulty node or cable affects only that node, so faults are easy to isolate and the network is easy to expand. Disadvantage: everything depends on the central switch, so a failure there stops the whole network, and more cabling is needed.
20 A 100 Mbps leased line measures 62 Mbps of throughput. Find its efficiency as a percentage. Efficiency = 62 / 100 x 100% = 62 per cent.

Question 6: Algorithm Tracing and Complexity (14 marks)

The following pseudocode sums squares in a loop (the equals sign denotes assignment):
total = 0
FOR i = 1 TO 5
total = total + i x i
NEXT i
The remaining parts concern search algorithms and nested loops.

# Question Answer and marking notes
21 Trace the pseudocode, giving the value of total after each i, and state the final result. After i = 1 total is 1; i = 2 gives 5; i = 3 gives 14; i = 4 gives 30; i = 5 gives 55.
22 In 1000 sorted items, what is the maximum number of comparisons for a linear search and for a binary search? A linear search may compare every item, so up to 1000 comparisons; a binary search halves the range each step, and 2^10 = 1024 covers 1000 items, so 10 comparisons.
23 A double loop runs FOR j = 1 TO 3 inside FOR i = 1 TO 4. How many times does the inner loop body run in total? The inner body runs 4 x 3 = 12 times.
24 Replacing an O(n squared) algorithm by an O(n log n) one for 1000000 items, with log2 n = 20, how many million operations are saved and roughly how many times faster is it? O(n squared) = 1000000000000 operations, that is 1000000 million; O(n log n) = 1000000 x 20 = 20000000 operations, that is 20 million; about 50000 times faster.

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 →