IGCSE CCEA Computer Science: Typical Exam Questions Explained | IGCSE CCEA 计算机:典型例题详解

📚 IGCSE CCEA Computer Science: Typical Exam Questions Explained | IGCSE CCEA 计算机:典型例题详解

This article walks you through a series of typical exam-style questions for the CCEA IGCSE Computer Science specification. Each example is broken down step by step, with bilingual explanations to reinforce key concepts and improve your problem-solving skills. Topics include data representation, logic gates, networking, image file size, algorithm design, compression, SQL and encryption.

本文带你逐一解析 CCEA IGCSE 计算机科学考试中的典型例题。每个例题都配有详细的分步解答和双语讲解,帮助你巩固核心概念、提升解题能力,涵盖数据表示、逻辑门、网络、图像文件大小、算法设计、压缩、SQL 以及加密等重要主题。

1. Binary and Hexadecimal Conversion | 二进制与十六进制转换

Question: Convert the 8‑bit binary number 11010110₂ into hexadecimal. Show all steps clearly.

例题:将8位二进制数 11010110₂ 转换为十六进制,并清晰地展示所有步骤。

Step 1: Split the binary digits into groups of four, starting from the right. For 11010110₂, the grouping becomes 1101 and 0110.

步骤1:从二进制数的最右侧开始,每四位分成一组。11010110₂ 可分成 1101 和 0110 两组。

Step 2: Treat each 4‑bit group as an independent binary number and convert it to its hexadecimal equivalent. 1101₂ = 13 in decimal, which is D in hex. 0110₂ = 6 in decimal, which is 6 in hex.

步骤2:将每组视为一个独立的二进制数,转换为十六进制。1101₂ 的十进制值为 13,对应十六进制数字 D;0110₂ 的十进制值为 6,对应十六进制数字 6。

Step 3: Write the hexadecimal digits in the same order as the groups, giving D6₁₆. Therefore, 11010110₂ = D6₁₆.

步骤3:按分组顺序写出十六进制数字,得到 D6₁₆。所以,11010110₂ = D6₁₆。

11010110₂ → (1101 0110)₂ → D6₁₆


2. Logic Gates and Truth Tables | 逻辑门与真值表

Question: Draw the logic circuit for the expression Q = NOT(A AND B) OR C. Then construct the truth table for this circuit.

例题:绘制逻辑表达式 Q = NOT(A AND B) OR C 对应的逻辑电路,并构建其真值表。

Answer: The circuit consists of an AND gate taking inputs A and B, whose output feeds into a NOT gate. The output of the NOT gate and input C are then fed into an OR gate to produce Q.

解答:该电路由一个与门和其后连接的非门组成,非门的输出与输入 C 一同送入或门,最终产生输出 Q。

The truth table is built by evaluating the intermediate signal (A AND B), then NOT(A AND B), and finally combining it with C using OR.

真值表通过逐步计算中间信号 (A AND B)、NOT(A AND B) 以及最后与 C 进行或运算来构建。

A B C A AND B NOT(A AND B) Q
0 0 0 0 1 1
0 0 1 0 1 1
0 1 0 0 1 1
0 1 1 0 1 1
1 0 0 0 1 1
1 0 1 0 1 1
1 1 0 1 0 0
1 1 1 1 0 1

3. Network Topologies: Star vs Bus | 网络拓扑:星形与总线形

Question: Compare a star network topology with a bus topology. Give two advantages of a star network over a bus network.

例题:比较星形网络拓扑与总线形拓扑,并给出星形拓扑相较于总线形拓扑的两个优势。

Answer: In a bus topology all devices share a single central cable (the bus). In a star topology each device is connected to a central switch or hub with its own cable.

解答:在总线形拓扑中,所有设备共享一条中央电缆(总线);而在星形拓扑中,每台设备都通过独立电缆连接到中央交换机或集线器。

Advantage 1: If one cable fails in a star network, only that device is affected. In a bus network, a break in the backbone can bring down the entire segment.

优势1:星形网络中若某根电缆故障,仅该设备失效;总线形网络中骨干电缆断裂则可能导致整个网段瘫痪。

Advantage 2: It is easier to add new devices to a star network without disrupting existing communication, whereas adding devices to a bus often requires reconfiguration and temporarily halts the network.

优势2:向星形网络添加新设备更为简便,不会中断现有通信;而向总线添加设备通常需要重新配置,并导致网络暂时中断。


4. Image File Size Calculation | 图像文件大小计算

Question: A digital image has a resolution of 800 × 600 pixels and uses a 24‑bit colour depth. Calculate the uncompressed file size of this image in kilobytes (KB). State any assumption about the unit of measurement (1 KB = 1024 bytes).

例题:一幅数字图像的分辨率为 800 × 600 像素,采用24位色彩深度。计算该图像未压缩文件的大小,以千字节(KB)为单位。请说明所采用的单位换算(1 KB = 1024 bytes)。

Step 1: Total number of pixels = width × height = 800 × 600 = 480,000 pixels.

步骤1:总像素数 = 宽度 × 高度 = 800 × 600 = 480,000 像素。

Step 2: Each pixel requires 24 bits of storage, so total bits = 480,000 × 24 = 11,520,000 bits.

步骤2:每个像素需要24位存储,总位数 = 480,000 × 24 = 11,520,000 位。

Step 3: Convert bits to bytes: 1 byte = 8 bits, so bytes = 11,520,000 ÷ 8 = 1,440,000 bytes.

步骤3:将位转换为字节:1 byte = 8 bits,字节数 = 11,520,000 ÷ 8 = 1,440,000 字节。

Step 4: Convert bytes to kilobytes (assuming 1 KB = 1024 bytes): KB = 1,440,000 ÷ 1024 ≈ 1406.25 KB.

步骤4:将字节转换为千字节(1 KB = 1024 bytes):KB = 1,440,000 ÷ 1024 ≈ 1406.25 KB。

File size = (800 × 600 × 24) ÷ (8 × 1024) = 1406.25 KB


5. Algorithm Design: Finding the Maximum | 算法设计:求最大值

Question: Write pseudocode for an algorithm that asks the user to input ten numbers, then outputs the largest (maximum) number.

例题:用伪代码编写一个算法,要求用户输入十个数字,然后输出其中的最大值。

Answer: The algorithm initialises max with the first input value, then iterates nine more times, updating max whenever a larger number is encountered.

解答:该算法先用第一个输入值初始化 max,然后循环九次,每次发现更大的数就更新 max。

Pseudocode:


INPUT num
max ← num
FOR count ← 2 TO 10
  INPUT num
  IF num > max THEN
    max ← num
  ENDIF
ENDFOR
OUTPUT max

中文伪代码说明:输入第一个数字并赋值给 max,用 FOR 循环从2到10依次输入,比较并更新 max,最后输出 max。


6. Data Compression: Run‑Length Encoding | 数据压缩:行程编码

Question: The string ‘AAABBBCCCCAA’ is to be compressed using run‑length encoding (RLE). Write the RLE compressed representation and calculate the compression ratio, assuming each original character occupies 1 byte and each (count, character) pair in RLE also occupies 2 bytes.

例题:使用行程编码 (RLE) 压缩字符串 ‘AAABBBCCCCAA’。写出 RLE 压缩后的表示形式,并计算压缩比。假设原始每个字符占用1字节,RLE 中每个 (计数, 字符) 对占用2字节。

Answer: The original string has 12 characters, so 12 bytes. The runs are: A repeated 3 times, B 3 times, C 4 times, A 2 times. RLE pairs: (3, A), (3, B), (4, C), (2, A).

解答:原字符串包含12个字符,共12字节。行程依次为:A 重复3次,B 3次,C 4次,A 2次。RLE 对表示为:(3, A), (3, B), (4, C), (2, A)。

The compressed output can be written as 3A3B4C2A, which is 8 bytes (four pairs, 2 bytes each).

压缩后的形式写作 3A3B4C2A,共8字节(四对,每对2字节)。

Compression ratio = original size ÷ compressed size = 12 ÷ 8 = 1.5 : 1. This means the compressed file is about 1.5 times smaller.

压缩比 = 原始大小 ÷ 压缩后大小 = 12 ÷ 8 = 1.5 : 1,即压缩后文件大小约为原始文件的 1/1.5。

RLE: AAABBBCCCCAA → 3A3B4C2A (compression ratio 1.5:1)


7. SQL Query on a Student Table | 学生表上的SQL查询

Question: A table named Students contains the fields ID, Name, Age and Grade. Write an SQL statement to retrieve the names and grades of all students who are older than 15.

例题:有一张名为 Students 的表,包含字段 ID, Name, Age 和 Grade。请写出 SQL 语句,查询年龄大于15的所有学生的姓名和年级。

Answer: The required query selects specific columns and filters rows using a WHERE clause.

解答:所需查询通过 SELECT 选择特定列,并使用 WHERE 子句过滤行。

SQL statement:


SELECT Name, Grade
FROM Students
WHERE Age > 15;

中文解释:SELECT 指定要显示的列 Name 和 Grade,FROM 指明数据表 Students,WHERE 条件 Age > 15 保留年龄大于15的记录。


8. Caesar Cipher Encryption | 凯撒密码加密

Question: Encrypt the plaintext word ‘COMPUTER’ using a Caesar cipher with a shift of 3. Then explain how the decryption process would work.

例题:使用凯撒密码(偏移量为3)加密明文单词 ‘COMPUTER’,并说明解密过程如何进行。

Answer: Each letter is shifted three places forward in the alphabet, wrapping around from Z to A. C → F, O → R, M → P, P → S, U → X, T → W, E → H, R → U. Thus the ciphertext is FRPSXWHU.

解答:每个字母按字母表顺序向前移动三位,Z 之后回到 A。C → F,O → R,M → P,P → S,U → X,T → W,E → H,R → U,因此密文为 FRPSXWHU。

Decryption shifts each letter three places backward: F → C, R → O, and so on, restoring the original plaintext.

解密时每个字母向后移动三位:F → C,R → O,以此类推,即可恢复原文。

Encryption mapping table (partial):

Plain C O M P U T E R
Cipher F R P S X W H U

Published by TutorHao | Computer Science Revision Series | aleveler.com

更多咨询请联系16621398022(同微信)

Comments

屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from aleveler.com

Subscribe now to keep reading and get access to the full archive.

Continue reading