📚 IGCSE CCEA Computer Science: Mastering Calculation Questions | IGCSE CCEA 计算机:计算题专项训练
Welcome to this focused revision guide designed to help you confidently tackle the calculation-based questions in the IGCSE CCEA Computer Science examination. From number system conversions and binary arithmetic to file size estimations and data transfer times, mastering these quantitative skills is essential for achieving top marks. Each section pairs clear English explanations with their Chinese translations, followed by step-by-step examples and practical tips that mirror the style of exam questions. By working through this resource, you will strengthen both your conceptual understanding and your ability to perform accurate, efficient calculations under timed conditions.
欢迎阅读这本专项复习指南,帮助你有信心地应对 IGCSE CCEA 计算机科学考试中的计算类题目。从数制转换和二进制运算,到文件大小估算与数据传输时间,掌握这些定量技能对于取得高分至关重要。每个小节都提供了清晰的英文讲解以及对应的中文翻译,并附有分步示例和贴近考题风格的实用提示。通过本资源的学习,你既能加深概念理解,也能提高在限时条件下准确、高效完成计算的能力。
1. Number Systems: Denary, Binary and Hexadecimal | 数字系统:十进制、二进制与十六进制
At the heart of computer science lie three essential number systems: denary (base‑10), binary (base‑2) and hexadecimal (base‑16). Denary uses the digits 0–9; binary uses only 0 and 1, representing the on/off states of transistors; hexadecimal uses the digits 0–9 and the letters A–F to represent values 10–15. CCEA questions frequently ask you to convert between these bases, so a solid grasp of place values is crucial. For example, in binary the rightmost column is 2⁰ (1), then 2¹ (2), 2² (4), 2³ (8) and so on.
计算机科学的核心离不开三种数字系统:十进制(基数为 10)、二进制(基数为 2)和十六进制(基数为 16)。十进制使用数字 0–9;二进制只使用 0 和 1,代表晶体管的开/关状态;十六进制使用数字 0–9 和字母 A–F 来表示数值 10–15。CCEA 的考题经常要求你在这些进制之间进行转换,因此牢固掌握位值至关重要。例如,在二进制中最右侧一列是 2⁰(1),然后是 2¹(2)、2²(4)、2³(8)等等。
When converting a binary number like 1011₂ to denary, simply sum the place values where a 1 appears: (1 × 8) + (0 × 4) + (1 × 2) + (1 × 1) = 11₁₀. To convert denary to binary, repeatedly divide by 2 and record the remainders in reverse order. For hexadecimal, grouping binary digits into nibbles (groups of 4) is the fastest method: 1011₂ is simply B₁₆.
将二进制数 1011₂ 转换为十进制时,只需将出现 1 的位值相加:(1 × 8) + (0 × 4) + (1 × 2) + (1 × 1) = 11₁₀。要将十进制转换为二进制,可以反复除以 2,并按相反顺序记录余数。对于十六进制,将二进制数字按四位一组(称为半字节)分组是最快的方法:1011₂ 直接就是 B₁₆。
Hexadecimal place values: 16³ (4096), 16² (256), 16¹ (16), 16⁰ (1)
2. Converting Between Bases Step by Step | 进制转换分步详解
CCEA exam papers often include multi‑step conversion tasks. A typical question might ask you to start with a denary number, convert it to binary, and then show its hexadecimal equivalent. Let’s work through an example: convert denary 197 to binary and then to hexadecimal. First, divide 197 by 2 repeatedly: 197 ÷ 2 = 98 remainder 1; 98 ÷ 2 = 49 remainder 0; 49 ÷ 2 = 24 remainder 1; 24 ÷ 2 = 12 remainder 0; 12 ÷ 2 = 6 remainder 0; 6 ÷ 2 = 3 remainder 0; 3 ÷ 2 = 1 remainder 1; 1 ÷ 2 = 0 remainder 1. Reading the remainders from bottom to top gives 11000101₂.
CCEA 的试卷中经常包含多步转换任务。一道典型题目可能要求你从一个十进制数开始,将其转换为二进制,然后再给出它的十六进制表示。我们来看一个例子:将十进制数 197 转换为二进制,再转换为十六进制。首先,用 197 反复除以 2:197 ÷ 2 = 98 余 1;98 ÷ 2 = 49 余 0;49 ÷ 2 = 24 余 1;24 ÷ 2 = 12 余 0;12 ÷ 2 = 6 余 0;6 ÷ 2 = 3 余 0;3 ÷ 2 = 1 余 1;1 ÷ 2 = 0 余 1。从下往上读取余数,得到 11000101₂。
Now group the binary digits into nibbles from the right: 1100 0101. The left nibble 1100₂ equals 12₁₀, which is C in hexadecimal; the right nibble 0101₂ equals 5₁₀, so the full hexadecimal value is C5₁₆. Always check your work by converting back: C5₁₆ = (12 × 16) + (5 × 1) = 192 + 5 = 197₁₀.
现在将二进制数字从右往左按四位一组分组:1100 0101。左边的半字节 1100₂ 等于 12₁₀,即十六进制中的 C;右边的半字节 0101₂ 等于 5₁₀,因此完整的十六进制值为 C5₁₆。一定要通过反向转换来检查你的答案:C5₁₆ = (12 × 16) + (5 × 1) = 192 + 5 = 197₁₀。
| Denary | Binary nibble | Hexadecimal |
| 197 | 1100 0101 | C5 |
3. Binary Addition and the Overflow Flag | 二进制加法与溢出标志
Binary addition follows simple rules: 0 + 0 = 0; 0 + 1 = 1; 1 + 0 = 1; 1 + 1 = 0 carry 1; 1 + 1 + 1 = 1 carry 1. When adding two unsigned 8‑bit numbers, a carry out of the most significant bit (bit 7) indicates an overflow. In CCEA exams you may be asked to perform the addition and state whether overflow has occurred, often linking it to the limit of 8‑bit representation (0 to 255 in denary).
二进制加法遵循简单的规则:0 + 0 = 0;0 + 1 = 1;1 + 0 = 1;1 + 1 = 0 进位 1;1 + 1 + 1 = 1 进位 1。当两个无符号 8 位数相加时,如果产生超出最高有效位(第 7 位)的进位,就表示发生了溢出。在 CCEA 的考试中,你可能会被要求执行加法运算,并说明是否发生溢出,这通常与 8 位表示的数值范围(十进制 0 至 255)相关联。
For example, add 10101101₂ (173₁₀) and 01101010₂ (106₁₀). Work from the rightmost bit: 1+0 = 1; 0+1 = 1; 1+0 = 1; 1+1 = 0 carry 1; 0+0+1 = 1; 1+1 = 0 carry 1; 0+1+1 = 0 carry 1; 1+0+1 = 0 carry 1. The result is 00010111₂ with a carry out of 1. This carry indicates overflow because the correct sum is 173 + 106 = 279, which exceeds 255 and cannot fit in 8 bits.
例如,计算 10101101₂(173₁₀)与 01101010₂(106₁₀)相加。从最右侧位开始:1+0 = 1;0+1 = 1;1+0 = 1;1+1 = 0 进位 1;0+0+1 = 1;1+1 = 0 进位 1;0+1+1 = 0 进位 1;1+0+1 = 0 进位 1。结果是 00010111₂,同时产生进位 1。这个进位表明发生了溢出,因为正确的和是 173 + 106 = 279,超过了 255,无法用 8 位表示。
Overflow flag = 1 when sum > 2ⁿ − 1 (for n-bit unsigned binary)
4. Logic Gates and Truth Table Calculations | 逻辑门与真值表计算
Logic gates are the building blocks of digital circuits. In CCEA calculations, you will need to complete truth tables for combinations of NOT, AND, OR, NAND and NOR gates, and sometimes determine the output based on given input patterns. A common exam task is to work out the Boolean expression for a logic circuit and then fill in the truth table. For instance, a circuit with inputs A and B feeding an AND gate, whose output is inverted by a NOT gate, gives a NAND function: Q = NOT(A AND B).
逻辑门是数字电路的基本构件。在 CCEA 的计算题中,你需要填写包含 NOT、AND、OR、NAND 和 NOR 门组合的真值表,有时还需要根据给定的输入模式确定输出。常见的考试任务是推导出逻辑电路的布尔表达式,然后填写真值表。例如,一个电路将输入 A 和 B 接入一个与门,其输出再经过一个非门,就得到与非功能:Q = NOT(A AND B)。
To complete the truth table, set out all combinations of A and B (00, 01, 10, 11), compute the intermediate AND result, and then invert it. So for 00: 0 AND 0 = 0 → NOT 0 = 1. Always double‑check your output column against the expected behaviour of the gate. Marks are often awarded for both the Boolean expression and the correct output values.
要填写真值表,先列出 A 和 B 的所有组合(00、01、10、11),计算中间的 AND 结果,然后将其取反。对于 00:0 AND 0 = 0 → NOT 0 = 1。务必对照门的预期行为再次确认你的输出列。考试中通常会给布尔表达式和正确的输出值分别赋分。
| A | B | A AND B | Q = NOT(A AND B) |
| 0 | 0 | 0 | 1 |
| 0 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 |
| 1 | 1 | 1 | 0 |
5. Units of Data Storage and File Size Basics | 数据存储单位与文件大小基础
Understanding data units is critical for file size calculations. The fundamental unit is the bit (b), followed by the byte (B), which is 8 bits. CCEA questions commonly test your ability to convert between bits and bytes, and to work with kilobytes (kB), megabytes (MB), gigabytes (GB) and terabytes (TB). In this syllabus, the convention is often that 1 kB = 1000 bytes (decimal prefixes), but some contexts may use binary prefixes where 1 KiB = 1024 bytes; always read the question carefully to see which system is specified.
理解数据单位对于文件大小计算至关重要。最基本的单位是比特(bit,b),其次是字节(Byte,B),1 字节等于 8 比特。CCEA 的题目通常考查你在比特和字节之间进行转换的能力,以及熟练使用千字节(kB)、兆字节(MB)、吉字节(GB)和太字节(TB)。在本课程大纲中,通常约定 1 kB = 1000 字节(十进制前缀),但某些情境下可能使用二进制前缀,其中 1 KiB = 1024 字节;一定要仔细读题,看清采用的是哪种体系。
When converting between units, multiply when moving to a smaller unit and divide when moving to a larger one. For example, to express 2 MB in bytes, multiply: 2 × 1 000 000 = 2 000 000 bytes, or if using binary, 2 × 1 048 576 = 2 097 152 bytes. Always show your working clearly, as CCEA markers award method marks even if a simple arithmetic slip occurs.
在单位之间转换时,转换为较小单位用乘法,转换为较大单位用除法。例如,要将 2 MB 表示为字节,用乘法:2 × 1 000 000 = 2 000 000 字节;若使用二进制,则为 2 × 1 048 576 = 2 097 152 字节。务必清晰地展示你的计算过程,因为 CCEA 的评分者即使在你出现简单计算错误时也会给方法分。
1 B = 8 b 1 kB = 1000 B 1 MB = 1000 kB 1 GB = 1000 MB
6. Calculating Image File Sizes | 计算图像文件大小
Digital images are stored as a grid of pixels, each assigned a colour. The size of an uncompressed image file depends on three factors: the image dimensions in pixels (width × height), the colour depth (number of bits used to represent each pixel’s colour), and the presence of metadata. The basic formula for an uncompressed image file size in bits is:
数字图像以像素网格的形式存储,每个像素被分配一种颜色。未压缩图像文件的大小取决于三个因素:图像的像素尺寸(宽度 × 高度)、色深(用于表示每个像素颜色的位数),以及元数据。未压缩图像文件大小(以位为单位)的基本公式为:
File size (bits) = width (pixels) × height (pixels) × colour depth (bits per pixel)
To obtain the size in bytes, divide the result by 8. CCEA questions may ask you to calculate the file size in kB or MB, so you will need to apply unit conversions as well. Suppose an image is 600 × 400 pixels with a colour depth of 24 bits. The size in bits = 600 × 400 × 24 = 5 760 000 bits. Divide by 8 to get 720 000 bytes, and then divide by 1000 to obtain 720 kB if using decimal prefixes.
要得到以字节为单位的大小,将结果除以 8。CCEA 的题目可能会要求你以 kB 或 MB 为单位计算文件大小,因此你还需要进行单位转换。假设一幅图像尺寸为 600 × 400 像素,色深为 24 位。则位数为 600 × 400 × 24 = 5 760 000 位。除以 8 得到 720 000 字节,如果使用十进制前缀,再除以 1000 得到 720 kB。
Be careful with scenarios where the colour depth is given as a number of colours rather than bits. For instance, 256 colours require 8 bits per pixel because 2⁸ = 256. Always derive the bit depth first from the number of colours before applying the formula.
当色深以颜色数量而非位数给出时,需要特别小心。例如,256 种颜色需要每个像素 8 位,因为 2⁸ = 256。在应用公式之前,务必先从颜色数量推导出位深。
7. Calculating Sound File Sizes | 计算声音文件大小
Sound is captured by sampling the amplitude of an audio wave at regular intervals. The size of an uncompressed sound file depends on the sample rate (in Hz), the bit depth (number of bits per sample), the duration (in seconds) and the number of channels (e.g. 1 for mono, 2 for stereo). The core formula is:
声音通过以固定间隔对音频波幅进行采样来捕获。未压缩声音文件的大小取决于采样率(单位为 Hz)、位深(每个样本的位数)、时长(单位为秒)以及声道数(例如,单声道为 1,立体声为 2)。核心公式如下:
File size (bits) = sample rate (Hz) × bit depth × duration (s) × channels
A typical exam question provides all these quantities and expects you to calculate the file size in bytes, kB or MB. For example, a 30‑second stereo recording at 44.1 kHz with 16‑bit resolution: sample rate = 44 100 Hz. File size in bits = 44 100 × 16 × 30 × 2 = 42 336 000 bits. Convert to bytes: 42 336 000 ÷ 8 = 5 292 000 bytes, which is approximately 5.29 MB (using decimal). Always show each step, and remember to multiply by the number of channels.
典型的考试题目会提供所有这些量,并要求你以字节、kB 或 MB 为单位计算文件大小。例如,一段 30 秒、采样率 44.1 kHz、16 位分辨率的立体声录音:采样率 = 44 100 Hz。文件大小(位)= 44 100 × 16 × 30 × 2 = 42 336 000 位。转换为字节:42 336 000 ÷ 8 = 5 292 000 字节,约等于 5.29 MB(使用十进制前缀)。务必将每个步骤都展示出来,并记得乘以声道数。
8. Compression Ratio and File Size Reduction | 压缩比与文件大小缩减
Compression reduces file size by encoding data more efficiently. In CCEA exams you may be asked to calculate the compression ratio or the size of a compressed file given the original size and the ratio. Compression ratio is defined as:
压缩通过更高效地编码数据来缩减文件大小。在 CCEA 的考试中,你可能会被要求计算压缩比,或根据原始大小和压缩比计算压缩后文件的大小。压缩比的定义为:
Compression ratio = original file size ÷ compressed file size
For instance, if an uncompressed image is 720 kB and after compression it becomes 180 kB, the compression ratio is 720 ÷ 180 = 4:1. Conversely, if you are told the compression ratio is 5:1 and the original size is 10 MB, the compressed size is 10 ÷ 5 = 2 MB. You may also need to calculate the percentage reduction: ((original − compressed) ÷ original) × 100%.
例如,如果一张未压缩图像为 720 kB,压缩后变为 180 kB,则压缩比为 720 ÷ 180 = 4:1。反过来,如果已知压缩比为 5:1,原始大小为 10 MB,则压缩后大小为 10 ÷ 5 = 2 MB。你可能还需要计算缩减百分比:((原始大小 − 压缩后大小) ÷ 原始大小) × 100%。
Questions often combine these calculations with a discussion of lossy vs lossless compression, so be prepared to explain briefly why a particular method achieves a better ratio for audio or images.
题目常常将这些计算与有损压缩和无损压缩的讨论结合起来,因此要准备好简要说明为什么某种方法在音频或图像上能实现更高的压缩比。
9. Data Transmission Time Calculation | 数据传输时间计算
When data is sent over a network, the transmission time is determined by the file size and the network transfer rate. The fundamental formula is:
当数据通过网络发送时,传输时间由文件大小和网络传输速率决定。基本公式为:
Time (seconds) = file size (in bits or bytes) ÷ transfer rate (in bits or bytes per second)
It is vital to ensure that the units of file size and transfer rate match. CCEA questions may give the rate in bits per second (bps) and the file size in bytes, requiring you to convert one of them. For example, how long does it take to transfer a 20 MB file over a connection with a rate of 4 Mbps? First, convert 20 MB to megabits: 20 × 8 = 160 Mb (or 20 × 1 000 000 × 8 bits). Then time = 160 Mb ÷ 4 Mbps = 40 seconds.
确保文件大小和传输速率的单位一致至关重要。CCEA 的题目可能以每秒比特数 (bps) 给出速率,而文件大小则以字节为单位,这时就需要对其中一项进行转换。例如,通过一条速率为 4 Mbps 的连接传输一个 20 MB 的文件需要多长时间?首先,将 20 MB 转换为兆比特:20 × 8 = 160 Mb(或 20 × 1 000 000 × 8 比特)。然后时间 = 160 Mb ÷ 4 Mbps = 40 秒。
Always write down your unit conversions. If the rate is in bps, express the file size in bits; if the rate is in Bps, use bytes. Many students lose marks by mixing bits and bytes, so underline this check in your working.
务必写下你的单位转换过程。如果速率以 bps 为单位,就将文件大小表示为比特;如果速率以 Bps 为单位,就使用字节。很多考生因为混淆比特和字节而丢分,因此在计算过程中要把这个检查环节标注出来。
10. Error Detection: Parity Bits and Checksums | 差错检测:奇偶校验位与校验和
To ensure data integrity during transmission, error detection methods such as parity bits and checksums are used, and CCEA exams often include simple calculations related to them. A parity bit is added to a binary string to make the number of 1s either even (even parity) or odd (odd parity). For instance, given the 7‑bit ASCII code for ‘A’ is 1000001, adding an even parity bit at the front gives 01000001 (now four 1s, an even number).
为确保传输过程中数据的完整性,会使用奇偶校验位和校验和等差错检测方法,CCEA 的考试中经常包含与之相关的简单计算。奇偶校验位被添加到二进制串中,使其中 1 的个数为偶数(偶校验)或奇数(奇校验)。例如,已知字母 ‘A’ 的 7 位 ASCII 码为 1000001,在前面添加一个偶校验位得到 01000001(现在有四个 1,为偶数)。
A checksum is a small numeric value computed from a block of data. In simple scenarios, you sum the data bytes and discard the overflow, then append the checksum so that the sum of all bytes (including the checksum) equals a predetermined value, often 0 after taking the two’s complement. For example, to transmit the bytes 45 and 63, first add: 45 + 63 = 108. In an 8‑bit system the two’s complement of 108 is 256 − 108 = 148. So the checksum is 148 (10010100 in binary), and the transmitted sequence is 45, 63, 148. The receiver adds all three: 45 + 63 + 148 = 256, which in 8 bits gives 0, indicating no error.
校验和是根据数据块计算出的一个小数值。在简单的场景中,你将数据字节相加并丢弃溢出部分,然后附上校验和,使得所有字节(包括校验和)的和等于一个预定值,在取二进制补码后通常为 0。例如,要传输字节 45 和 63,首先相加:45 + 63 = 108。在 8 位系统中,108 的二进制补码是 256 − 108 = 148。因此校验和为 148(二进制 10010100),传输序列为 45、63、148。接收端将三者相加:45 + 63 + 148 = 256,在 8 位系统里结果为 0,表明没有错误。
11. Putting It All Together: Multi‑Step Calculation Problems | 综合应用:多步计算问题
Many CCEA exam questions combine several of the topics above into a single, multi‑part problem. For instance, you might be asked to calculate the file size of a colour image, then determine how long it takes to transmit that file over a given network connection, and finally calculate the compression ratio required to reduce the transmission time by half. Tackling such questions requires careful planning: first identify the relevant formulas, check the units, and then work through each part methodically. Always show your full working – even if the final answer is wrong, you can still earn a significant number of marks for correct steps.
许多 CCEA 考试题目会将上述多个主题合并到一道包含多个部分的问题中。例如,你可能先被要求计算一幅彩色图像的文件大小,然后确定通过给定网络连接传输该文件需要多长时间,最后计算要将传输时间缩短一半所需的压缩比。解答这类问题需要仔细规划:首先找到相关公式,检查单位,然后有条理地完成每个部分。务必展示完整的计算过程——即使最终答案错误,你仍可能因正确的步骤而获得可观的分数。
Consider this example: An uncompressed image is 1024 × 768 pixels, 16‑bit colour. Calculate its size in MB. Then, if it is sent over a 2 Mbps connection, how many seconds will the transfer take? Finally, what compression ratio is needed to reduce the transfer time to 20 seconds? This combines image size, transmission time and compression calculations.
来看这个例子:一张未压缩图像为 1024 × 768 像素,16 位色彩。计算其以 MB 为单位的大小。然后,如果通过 2 Mbps 的连接发送,传输需要多少秒?最后,要将传输时间减少到 20 秒,需要多大的压缩比?这个问题结合了图像大小、传输时间和压缩比的计算。
Step 1: Image bits = 1024 × 768 × 16 = 12 582 912 bits → 1 572 864 bytes → ≈ 1.57 MB
Published by TutorHao | IGCSE Computer Science Revision Series | aleveler.com更多咨询请联系16621398022(同微信)
屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导