📚 GCSE WJEC Computer Science: Calculation Practice | GCSE WJEC计算机科学:计算题专项训练
Mastering calculations is vital for the WJEC GCSE Computer Science exam. This guide provides focused practice on the most common calculation-based questions, from number conversions to file sizes, Boolean logic, CPU performance and networking. Each section explains the concept with a worked example, followed by step-by-step solutions, so you can see exactly where each mark comes from.
掌握计算题对 WJEC GCSE 计算机科学考试至关重要。本指南针对最常见的计算类题型进行专项训练,涵盖数制转换、文件大小、布尔逻辑、CPU 性能与网络等。每个小节先讲解概念并给出示例,再逐步展示解答过程,让你清楚看到每一分从哪里来。
1. Number System Conversions | 数制转换
The ability to convert between binary, denary and hexadecimal is fundamental. You must be able to quickly and accurately change a number from one base to another, and WJEC frequently awards one mark per correct conversion, so accuracy matters more than speed at first.
二进制、十进制和十六进制之间的转换是一项基本技能。你必须能快速准确地将一个数字从一种进制转换为另一种,WJEC 常常每个正确转换给一分,因此一开始准确性比速度更重要。
Denary to Binary: Repeatedly divide by 2, recording the remainders. Read the remainders from bottom to top.
十进制转二进制: 反复除以 2,记录余数,从下往上读取余数。
÷ 2 = 1 remainder 1, 1 ÷ 2 = 0 remainder 1. Reading the remainders upwards gives 110101₂.
示例:将 53₁₀ 转换为二进制。53 ÷ 2 = 26 余 1,26 ÷ 2 = 13 余 0,13 ÷ 2 = 6 余 1,6 ÷ 2 = 3 余 0,3 ÷ 2 = 1 余 1,1 ÷ 2 = 0 余 1。自下而上读取余数,得到 110101₂。
Binary to Denary: Sum the place values where there is a 1. The place values from right to left are 2⁰, 2¹, 2², 2³, 2⁴, 2⁵ and so on.
二进制转十进制: 将所有为 1 的位对应的位权值相加。从右到左的位权依次是 2⁰、2¹、2²、2³、2⁴、2⁵ 等。
member that any bit multiplied by 0 contributes nothing, so you can skip those columns entirely.
示例:101101₂ = 1×2⁵ + 0×2⁴ + 1×2³ + 1×2² + 0×2¹ + 1×2⁰ = 32 + 8 + 4 + 1 = 45₁₀。记住任何乘以 0 的位都不产生贡献,因此可以完全跳过这些列。
Binary to Hexadecimal: Split the binary number into nibbles (groups of 4 bits), starting from the right, then convert each nibble. Add leading zeros if the leftmost group is shorter than four bits.
二进制转十六进制: 从右端开始,将二进制数分成四位一组(nibble),然后分别转换每一组。如果最左边一组不足四位,就在前面补 0。
D7₁₆. To reverse the process, convert each hexadecimal digit into its four-bit binary equivalent and join them together.
示例:11010111₂ → 1101 0111。1101₂ = D(13),0111₂ = 7,因此结果为 D7₁₆。反向操作时,把每个十六进制数字转换为对应的四位二进制数,再连接起来即可。
The table below summarises every nibble value you should know by heart; it also speeds up hexadecimal to denary conversion.
下表总结了应该牢记的四位二进制对应值,同时也能加快十六进制转十进制的速度。
| Binary | Denary | Hexadecimal |
| 0000 | 0 | 0 |
| 0001 | 1 | 1 |
| 0010 | 2 | 2 |
| 0011 | 3 | 3 |
| 0100 | 4 | 4 |
| 0101 | 5 | 5 |
| 0110 | 6 | 6 |
| 0111 | 7 | 7 |
| 1000 | 8 | 8 |
| 1001 | 9 | 9 |
| 1010 | 10 | A |
| 1011 | 11 | B |
| 1100 | 12 | C |
| 1101 | 13 | D |
| 1110 | 14 | E |
| 1111 | 15 | F |
Practice converting in all directions. A good drill is to write ten random denary numbers between 0 and 255, convert each to binary and then to hexadecimal, and check your answers with the table above.
要在各个方向上进行转换练习。一个好方法是随机写出十个 0 到 255 之间的十进制数,分别转换为二进制再转换为十六进制,然后用上表核对答案。
2. Binary Addition and Overflow | 二进制加法与溢出
Binary addition follows the same principle as denary addition but uses only 0 and 1. Overflow occurs when the result of an addition exceeds the number of bits available to represent the number, which can lead to errors.
二进制加法遵循与十进制加法相同的原则,但只使用 0 和 1。当加法结果超出用于表示数字的可用位数时,就会发生溢出,这可能导致错误。
Rules: + 1 = 1 carry 1. Work from right to left and carry any 1 into the next column on the left.
规则: 0 + 0 = 0;0 + 1 = 1;1 + 0 = 1;1 + 1 = 0 进 1;1 + 1 + 1 = 1 进 1。从右向左计算,并将任意进位 1 带到左边下一列。
Example: add 00101010₂ (42₁₀) and 00010110₂ (22₁₀).
示例:将 00101010₂(42₁₀)与 00010110₂(22₁₀)相加。
t. In the exam, checking your binary result against the denary values is a fast way to catch carrying mistakes.
00101010 + 00010110 = 01000000₂。用十进制检验:42 + 22 = 64,而 01000000₂ = 64₁₀,因此答案正确。考试中,用十进制数值检验二进制结果,是快速发现进位错误的好办法。
Example with overflow: in an 8-bit register, add 150₁₀ (10010110₂) and 120₁₀ (01111000₂).
溢出示例:在 8 位寄存器中,将 150₁₀(10010110₂)与 120₁₀(01111000₂)相加。
e carry out of the most significant bit is lost. The stored answer is wrong, which is exactly what overflow means.
真实结果为 270₁₀,即 100001110₂,需要九位才能表示。但只能存储最低八位,因此寄存器中保存的是 00001110₂ = 14₁₀,最高位产生的进位被丢弃。存储的答案是错误的,这正是溢出的含义。
Unsigned range with n bits: 0 to 2ⁿ − 1 (8 bits → 0 to 255)
n 位无符号数范围:0 到 2ⁿ − 1(8 位 → 0 到 255)
To spot overflow quickly, add the two denary values first. If the total is greater than the maximum value the register can hold, overflow will occur.
要快速判断是否溢出,先把两个十进制数值相加。如果总和大于寄存器能表示的最大值,就会发生溢出。
3. Two's Complement and Negative Numbers | 补码与负数
Computers store negative numbers using two's complement, because it lets subtraction be performed with the same addition circuitry. To convert a positive denary number into two's complement, write it in binary, flip every bit, and then add 1.
计算机使用补码存储负数,因为这样可以用同一套加法电路完成减法。要把正十进制数转换为补码,先写出其二进制形式,然后将每一位取反,最后加 1。
×(−128) + 1×64 + 0×32 + 1×16 + 0×8 + 0×4 + 1×2 + 1×1 = −128 + 64 + 16 + 2 + 1 = −45₁₀, so the result is correct.
示例:用 8 位表示 −45₁₀。45₁₀ = 00101101₂。取反后得到 11010010₂,再加 1 得到 11010011₂。检验位权:1×(−128) + 1×64 + 0×32 + 1×16 + 0×8 + 0×4 + 1×2 + 1×1 = −128 + 64 + 16 + 2 + 1 = −45₁₀,结果正确。
00101101₂ = 45₁₀, and because the leftmost bit was a 1 the original number must be −45₁₀.
反向转换时,先减 1 再取反。11010011 − 1 = 11010010,取反得到 00101101₂ = 45₁₀;由于最左边一位是 1,原数必定是 −45₁₀。
Two's complement range with n bits: −2ⁿ⁻¹ to 2ⁿ⁻¹ − 1
n 位补码范围:−2ⁿ⁻¹ 到 2ⁿ⁻¹ − 1
For 8 bits this is −128 to +127. The leftmost bit is the sign bit: 0 means positive and 1 means negative. This is why the range of two's complement is not symmetric.
对于 8 位,范围是 −128 到 +127。最左边一位是符号位:0 表示正数,1 表示负数。这正是补码范围不对称的原因。
4. Bitmap Image File Size | 位图图像文件大小计算
e colour of one pixel, so a 24-bit image can represent 2²⁴ = 16,777,216 different colours.
图像文件大小取决于像素数量和色深(位深)。色深是存储一个像素颜色所用的位数,因此 24 位图像可以表示 2²⁴ = 16 777 216 种不同颜色。
File size (bits) = width × height × colour depth
文件大小(位)= 宽度 × 高度 × 色深
0 × 24 = 11,520,000 bits. Dividing by 8 gives 1,440,000 bytes, and dividing by 1000 gives 1440 KB, which is about 1.44 MB.
示例:一幅宽 800 像素、高 600 像素、使用 24 位色的图像。像素数为 800 × 600 = 480 000。以位为单位的大小为 480 000 × 24 = 11 520 000 位。除以 8 得到 1 440 000 字节,再除以 1000 得到 1440 KB,约为 1.44 MB。
Follow this five-step method every time: find the number of pixels, multiply by the colour depth, divide by 8 to get bytes, divide by 1000 to get kilobytes, then divide by 1000 again to get megabytes. Show each step because WJEC awards marks for the method as well as the final answer.
每次都按这五步来做:求像素数、乘以色深、除以 8 得到字节、除以 1000 得到千字节、再除以 1000 得到兆字节。要写出每一步,因为 WJEC 对方法和最终答案都给分。
If a question asks how resolution or colour depth affects file size, answer in terms of the formula: doubling the colour depth doubles the file size, and doubling both the width and the height makes the file four times larger.
如果题目问
更多咨询请联系16621398022(同微信)

或截图后用「扫一扫 → 相册」选择本图