IGCSE AQA Computer Science: Calculation Questions Practice | IGCSE AQA 计算机:计算题专项训练

📚 IGCSE AQA Computer Science: Calculation Questions Practice | IGCSE AQA 计算机:计算题专项训练

This article offers a focused set of calculation exercises covering the quantitative skills required in the IGCSE AQA Computer Science specification. Each section pairs essential theory with worked examples, enabling you to confidently tackle number conversions, binary arithmetic, storage estimation, and network transfer problems that appear frequently in exam papers.

本文针对 IGCSE AQA 计算机科学考试中常见的计算题型,提供系统的专项训练。每个小节将核心理论与实例相结合,帮助你扎实掌握数制转换、二进制算术、存储容量估算以及网络传输时间等必考计算,提升解题速度和准确度。

1. Binary and Decimal Conversions | 二进制与十进制转换

Every binary digit (bit) represents an increasing power of 2 from right to left. For an 8‑bit number, the place values are 128, 64, 32, 16, 8, 4, 2, 1. To convert binary to decimal, add the place values where a 1 appears. To convert decimal to binary, repeatedly divide by 2 and read the remainders backwards, or subtract the largest power of 2 possible until you reach zero.

二进制数的每一位从右向左代表 2 的递增幂。对 8 位数,位权依次为 128、64、32、16、8、4、2、1。将二进制转为十进制时,只需把所有出现 1 的位权相加;十进制转二进制则通过反复除以 2 取余数并倒序读取,或者从大到小依次减去 2 的幂,直到结果为 0。

Example: Convert 10110110₂ to decimal.
Place values: 128, 64, 32, 16, 8, 4, 2, 1. Bits: 1,0,1,1,0,1,1,0. Sum = 128 + 32 + 16 + 4 + 2 = 182₁₀.

示例:将 10110110₂ 转为十进制。位权为 128, 64, 32, 16, 8, 4, 2, 1,对应位值相加:128 + 32 + 16 + 4 + 2 = 182₁₀。


2. Binary and Hexadecimal Conversions | 二进制与十六进制转换

Hexadecimal uses base 16, with digits 0–9 and letters A–F (A=10, B=11, …, F=15). Each hex digit corresponds to a group of four binary bits (a nibble). To convert binary to hex, split the binary number into nibbles from the right, then replace each nibble with its hex equivalent. To go from hex to binary, expand each hex digit into its 4‑bit representation.

十六进制使用 0–9 和 A–F(A=10 至 F=15)。每一位十六进制数恰好对应四位二进制数(一个 nibble)。将二进制转十六进制时,从右向左每四位分组,再把每组转换成对应的十六进制数字;十六进制转二进制则将每个十六进制数字展开为四位二进制即可。

Example: Convert 110111100011₂ to hex.
Group into nibbles: 1101 1110 0011. 1101₂ = D, 1110₂ = E, 0011₂ = 3. Result: DE3₁₆.

示例:将 110111100011₂ 转为十六进制。分组:1101 1110 0011,分别对应 D、E、3,结果为 DE3₁₆。

Example: Convert A5₁₆ to binary.
A = 1010, 5 = 0101 → 10100101₂.

示例:将 A5₁₆ 转为二进制。A=1010,5=0101,组合得 10100101₂。


3. Binary Addition and Overflow | 二进制加法与溢出

Binary addition follows the same rules as decimal addition, but with only four basic sums: 0+0=0, 0+1=1, 1+0=1, 1+1=0 with a carry of 1 to the next column. When two 8‑bit numbers produce a result requiring a 9th bit, an overflow error occurs. Overflow happens when the sum exceeds the maximum value that can be stored in the given number of bits, leading to an incorrect result if the extra bit cannot be stored.

二进制加法的规则与十进制相似,核心只有四条:0+0=0,0+1=1,1+0=1,1+1=0 并向高位进 1。当两个 8 位二进制数相加的结果需要第 9 位来表示时,就会发生溢出错误。溢出意味着结果超出了指定位数能存储的最大值,如果无法保存额外的进位,计算结果就会出错。

Example: Add 10110010₂ and 01101101₂.
10110010
+ 01101101
—————————
1 00011111₂ (9 bits). The extra leftmost bit indicates overflow for an 8‑bit register.

示例:计算 10110010₂ + 01101101₂,竖式相加得到 1 00011111₂,共 9 位,对 8 位寄存器而言最左边的进位丢失,表明发生了溢出。

Key exam insight: Identify overflow by checking if the carry into the most significant bit (MSB) is different from the carry out of the MSB.

考试要点:检查符号位进位与向更高位的进位是否不同,可准确判断溢出。


4. Binary Subtraction Using Two’s Complement | 使用补码进行二进制减法

Computers typically represent negative numbers using two’s complement. To find the two’s complement of a binary number, invert all bits (find the one’s complement) and then add 1. Subtraction can then be performed by adding the two’s complement of the subtrahend to the minuend. Any overflow beyond the fixed number of bits is ignored.

计算机通常用二进制补码表示负数。求一个数的补码,先对其按位取反(得到反码),然后加 1。这样减法就可以转换为:被减数加上减数的补码。固定位数之外的进位直接丢弃。

Example: Calculate 0110₂ (6) – 0010₂ (2) using 4‑bit two’s complement.
Step 1: Two’s complement of 0010₂: invert → 1101₂, add 1 → 1110₂.
Step 2: Add 0110₂ + 1110₂ = 1 0100₂. Discard the extra 1, result is 0100₂ = 4₁₀.

示例:用 4 位补码计算 6 − 2。先求 0010₂ 的补码:取反得 1101₂,加 1 得 1110₂。然后 0110₂ + 1110₂ = 1 0100₂,舍弃最高位的进位,结果为 0100₂,即十进制 4。

Important: In two’s complement representation, the most significant bit acts as a sign bit (0 for positive, 1 for negative). For an n‑bit system, the range of representable numbers is –2ⁿ⁻¹ to 2ⁿ⁻¹–1.

注意:补码表示中,最高位是符号位(0 正 1 负)。n 位补码的表示范围是 –2ⁿ⁻¹ 至 2ⁿ⁻¹–1。


5. Logic Operations and Truth Tables | 逻辑运算与真值表

Boolean algebra uses AND, OR, NOT, and XOR operations. Exam questions often ask you to complete a truth table for a given logic circuit or expression. Memorise the basic truth tables and learn to combine them stepwise.

布尔代数包含与(AND)、或(OR)、非(NOT)、异或(XOR)等运算。考试常要求根据逻辑电路或表达式填写真值表。务必熟记基本真值表,并能逐步组合推导。

A B A AND B A OR B A XOR B
0 0 0 0 0
0 1 0 1 1
1 0 0 1 1
1 1 1 1 0

For a more complex expression such as Q = (A AND B) OR (NOT C), create columns for each intermediate value to avoid mistakes. Count the number of input combinations (2ⁿ for n inputs) and list them systematically.

对于较复杂的表达式,例如 Q = (A AND B) OR (NOT C),应逐列计算中间结果以避免错误。先明确输入变量的组合数(n 个输入共 2ⁿ 种),然后按顺序列出。


6. Storage Unit Conversions | 存储单位换算

Understanding how to convert between bits, bytes, kilobytes, megabytes, and gigabytes is fundamental. Exam boards often use the convention that 1 KB = 1000 bytes for storage media (decimal) but 1 KiB = 1024 bytes for memory capacities (binary). Check the context in the question carefully to apply the correct multiplier.

掌握位、字节、千字节、兆字节和吉字节之间的换算是基础。考试中通常对存储介质使用十进制(1 KB = 1000 字节),对内存容量则使用二进制(1 KiB = 1024 字节)。解题时必须看清题目语境,选用正确的倍数关系。

Common conversions you must know:

  • 8 bits = 1 byte
  • 1 kilobyte (KB) = 1000 bytes (decimal) or 1 kibibyte (KiB) = 1024 bytes (binary)
  • 1 megabyte (MB) = 1000² bytes or 1 mebibyte (MiB) = 1024² bytes
  • 1 gigabyte (GB) = 1000³ bytes or 1 gibibyte (GiB) = 1024³ bytes

必备换算关系:

  • 8 位 = 1 字节
  • 1 KB = 1000 字节(十进制),1 KiB = 1024 字节(二进制)
  • 1 MB = 1000² 字节,1 MiB = 1024² 字节
  • 1 GB = 1000³ 字节,1 GiB = 1024³ 字节

Example: A file is 2.5 MB in size. Express this in kilobytes using binary convention: 2.5 × 1024 = 2560 KiB.

示例:文件大小为 2.5 MB,用二进制单位转换为千字节:2.5 × 1024 = 2560 KiB。


7. Image File Size Calculations | 图像文件大小计算

The size of an uncompressed bitmap image can be calculated using the formula:
Image file size (bits) = image width (pixels) × image height (pixels) × colour depth (bits per pixel).

计算未压缩位图文件大小的公式为:图像文件大小(位)= 图像宽度(像素)× 图像高度(像素)× 颜色深度(每像素位数)。

Remember that colour depth determines the number of available colours: e.g., 8 bits = 256 colours, 16 bits = 65536 colours, 24 bits = 16.7 million colours. Be prepared to convert the final answer into bytes, KB, or MB as required by the question.

颜色深度决定了可用颜色数量,如 8 位 = 256 色,16 位 = 65536 色,24 位 = 约 1670 万色。最后要根据题目要求将单位转换为字节、KB 或 MB。

Worked example: An image is 800 × 600 pixels with 16‑bit colour.
Size in bits = 800 × 600 × 16 = 7,680,000 bits.
In bytes: 7,680,000 ÷ 8 = 960,000 bytes ≈ 960 KB (decimal) or 937.5 KiB (binary).

例题:一幅 800×600 像素、16 位色的图像。文件位数 = 800 × 600 × 16 = 7,680,000 位。换算为字节:7,680,000 ÷ 8 = 960,000 字节 ≈ 960 KB(十进制)或 937.5 KiB(二进制)。

If metadata is mentioned, add it to the calculated raw data size, but only if the question provides its size explicitly.

若试题提及元数据,需将其大小加到原始图像数据上,通常只有题目明确给出元数据大小时才需要额外加上。


8. Sound File Size Calculations | 声音文件大小计算

For uncompressed audio, file size depends on sample rate, bit depth, number of channels, and duration:
File size (bits) = sample rate (Hz) × bit depth × number of channels × time (seconds).

未压缩音频文件的大小取决于采样率、采样精度(位深)、声道数和时长:文件大小(位)= 采样率(Hz)× 位深 × 声道数 × 时长(秒)。

Example: A 3‑minute stereo track recorded at 44.1 kHz with 16‑bit depth.
Time = 3 × 60 = 180 s.
Size = 44100 × 16 × 2 × 180 = 254,016,000 bits.
In MB (decimal): 254,016,000 ÷ (8 × 1,000,000) = 31.752 MB.

例题:一段 3 分钟的立体声录音,采样率 44.1 kHz,位深 16 位。时长 = 180 秒。大小 = 44100 × 16 × 2 × 180 = 254,016,000 位。换算为 MB(十进制)= 254,016,000 ÷ (8×1,000,000) ≈ 31.75 MB。

Key points: Mono = 1 channel, stereo = 2 channels. Ensure you convert minutes to seconds and bits to the required output unit. The sample rate is often given in kHz; multiply by 1000 to get Hz.

要点:单声道 = 1 通道,立体声 = 2 通道。务必把分钟转为秒,位转为题目要求的单位。采样率常以 kHz 给出,需乘以 1000 转换为 Hz。


9. Compression Ratio Calculations | 压缩比计算

Compression reduces file size, but you may need to quantify the reduction using the compression ratio. Compression ratio = uncompressed size / compressed size. Alternatively, you might be asked for the percentage reduction: ((original − compressed) / original) × 100%.

压缩会减少文件大小,常需要定量计算压缩比:压缩比 = 未压缩大小 / 压缩后大小。也可能要求计算缩减百分比:((原大小 − 压缩后大小) / 原大小) × 100%。

Example: An image is originally 18 MB and is compressed to 4.5 MB.
Compression ratio = 18 / 4.5 = 4:1.
Space saving = ((18 − 4.5) / 18) × 100% = 75%.

例题:图像原始 18 MB,压缩后 4.5 MB。压缩比 = 18 / 4.5 = 4:1。空间节省百分比 = ((18−4.5)/18)×100% = 75%。

Lossy compression achieves much higher ratios than lossless, but some data is permanently lost. Be prepared to compare ratios for different file types in exam scenarios.

有损压缩的压缩比通常远高于无损压缩,但会永久丢失部分数据。在考试情景题中,需要会比较不同文件类型的压缩效果。


10. Network Transmission Time Calculations | 网络传输时间计算

Transmission time depends on file size and network speed. The basic formula: Time (seconds) = file size (bits) / transfer rate (bits per second). Always ensure that both the file size and the rate are in the same units (often bits or bytes with the same prefix) before dividing.

传输时间取决于文件大小和网络速率。基本公式:时间(秒)= 文件大小(位)/ 传输速率(位/秒)。计算前务必保证文件大小和速率采用相同单位(通常都转换为位或字节,且数量级一致)。

Example: A 50 MB file is to be sent over a 100 Mbps connection.
Convert 50 MB to bits: 50 × 8 × 10⁶ = 400 × 10⁶ bits.
Transfer rate = 100 × 10⁶ bps.
Time = 400 × 10⁶ / 100 × 10⁶ = 4 seconds.

例题:一个 50 MB 的文件通过 100 Mbps 网络发送。50 MB 转为位:50 × 8 × 10⁶ = 400×10⁶ 位。速率 = 100×10⁶ bps。时间 = 400×10⁶ / 100×10⁶ = 4 秒。

Watch for pitfalls: a 1 Gbps connection means 10⁹ bits per second; network overhead may be ignored unless stated; always show unit conversions step by step.

易错点:1 Gbps = 10⁹ bps;除非题目说明,否则忽略网络开销;转换单位时逐步展示,减少出错。


11. Parity Checks and Checksums | 奇偶校验与校验和

Error detection often appears as a calculation topic. A parity bit is added to a binary sequence to make the total number of 1s either even (even parity) or odd (odd parity). Calculate the required parity bit by counting the 1s.

错误检测也是常见计算考点。奇偶校验位被添加到二进制序列中,使其中 1 的总数为偶数(偶校验)或奇数(奇校验)。计算时只需统计现有 1 的个数,再决定校验位的值。

Example: For data 1011001 using even parity, count of 1s = 4 (even), so parity bit = 0. If using odd parity, parity bit = 1 to make the total count odd.

示例:数据 1011001 采用偶校验,已有 4 个 1(偶数),校验位 = 0;若采用奇校验,则校验位 = 1,使总 1 的个数为奇数。

Checksums involve summing blocks of data and sending the sum. A simple 8‑bit checksum: add all bytes and keep only the lowest 8 bits of the sum. You may be asked to calculate the checksum or verify received data by checking whether the computed checksum matches the transmitted one.

校验和则是将数据块求和并发送求和结果。简单的 8 位校验和:将所有字节相加,只保留和的低 8 位。考题可能要求计算校验和,或通过比对计算出的校验和与接收到的校验和来验证数据完整性。


12. Integer Division and Modulo in Programming | 编程中的整除与取模运算

In many pseudocode or programming questions, you must predict the result of integer division (DIV) and modulo (MOD) operations. Integer division gives the quotient without the remainder; MOD gives the remainder. These operations are commonly used to extract digits, work out time conversions, or implement algorithms.

不少伪代码或编程题要求预测整除(DIV)和取模(MOD)运算的结果。整除返回商(丢弃余数),取模返回余数。这些运算常用于拆分数字、时间换算或算法实现。

Example: 23 DIV 5 = 4, 23 MOD 5 = 3.
To extract the tens digit of 347: (347 MOD 100) DIV 10 = 47 DIV 10 = 4.

示例:23 DIV 5 = 4,23 MOD 5 = 3。提取 347 的十位数字:(347 MOD 100) DIV 10 = 47 DIV 10 = 4。

Practice converting between seconds and minutes using DIV and MOD, e.g., total = 500 seconds → minutes = 500 DIV 60 = 8, seconds = 500 MOD 60 = 20, giving 8 min 20 s.

练习用这些运算进行时间转换:总秒数 = 500 秒 → 分钟 = 500 DIV 60 = 8,秒 = 500 MOD 60 = 20,即 8 分 20 秒。

Published by TutorHao | AQA GCSE 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