GCSE CCEA Computer Science: Calculation Practice | GCSE CCEA 计算机科学:计算题专项训练

📚 GCSE CCEA Computer Science: Calculation Practice | GCSE CCEA 计算机科学:计算题专项训练

In the CCEA GCSE Computer Science specification, a significant proportion of marks is awarded for numerical and logic-based calculations. This article brings together the key calculation skills you need to master, from number conversions and binary arithmetic to file size estimation and error detection. Work through each section to build confidence and speed for your exams.

在 CCEA GCSE 计算机科学课程中,相当一部分分数会分配给数值和逻辑计算题。本文汇集了你必须掌握的核心计算技能,涵盖数制转换、二进制运算、文件大小估算以及错误检测等。请逐一完成各小节的练习,为考试积累信心与答题速度。


1. Binary to Denary Conversion | 二进制转十进制

To convert a binary number to its denary equivalent, write out the place values (powers of 2) above each bit, multiply each bit by its place value, and sum the results. Always start from the rightmost bit with 2⁰ = 1.

将二进制数转换为十进制时,先写出每一位上方的位值(2 的幂),然后将每个位与其位值相乘,最后把所有乘积相加。始终从最右边的位(2⁰ = 1)开始。

Example: 101101₂ = 1×2⁵ + 0×2⁴ + 1×2³ + 1×2² + 0×2¹ + 1×2⁰ = 32 + 0 + 8 + 4 + 0 + 1 = 45₁₀

For fractional binary numbers, the place values after the binary point are 2⁻¹, 2⁻², 2⁻³, etc. Apply the same method: multiply each bit by the corresponding power of 2.

对于带小数部分的二进制数,小数点后的位值依次为 2⁻¹、2⁻²、2⁻³ 等。采用相同的方法:每位乘上对应的 2 的幂再求和。

Binary Place Value Calculation Denary
1101₂ 8+4+0+1 13
101.01₂ 4+0+1+0+0.25 5.25

2. Denary to Binary Conversion | 十进制转二进制

Divide the denary number successively by 2, recording the remainder each time. The binary equivalent is read from the last remainder (most significant bit) to the first remainder (least significant bit). For fractional parts, multiply the fraction by 2 repeatedly and record the integer part.

将十进制数不断除以 2,记录每次的余数。二进制结果从最后一个余数(最高位)读到第一个余数(最低位)。对于小数部分,反复乘以 2 并记录整数部分即可。

Convert 43₁₀ to binary: 43÷2=21 rem 1; 21÷2=10 rem 1; 10÷2=5 rem 0; 5÷2=2 rem 1; 2÷2=1 rem 0; 1÷2=0 rem 1. Read upwards: 101011₂

When you need a specific number of bits (e.g. 8-bit representation), add leading zeros to the correct length. CCEA questions often ask for 8-bit answers.

当题目要求特定位数(如 8 位表示法)时,需要在左侧补零至所需长度。CCEA 考题经常要求给出 8 位答案。


3. Hexadecimal Conversions | 十六进制转换

Hexadecimal uses digits 0–9 and letters A–F to represent values 0–15. Convert binary to hexadecimal by grouping bits into nibbles (groups of four) from the right, then converting each nibble to its hex digit. Convert denary to hexadecimal by repeated division by 16.

十六进制使用数字 0–9 和字母 A–F 表示数值 0–15。将二进制转换为十六进制时,从右向左每四位分一组,然后将每个四位组转换为一个十六进制数字。十进制转十六进制则通过不断除以 16 取余数实现。

Binary 11011110₂ → nibbles 1101 1110 → D E → DE₁₆. Denary 200 → 200÷16=12 rem 8 → C8₁₆.

Be careful with leftmost groups that have fewer than four bits; just pad with leading zeros.

注意最左边不足四位的组,用前导零补足即可。


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

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. Add two binary numbers column by column from right to left. If the result exceeds the fixed number of bits available, an overflow error occurs, and the carry out of the most significant bit is lost.

二进制加法遵循简单规则:0+0=0,0+1=1,1+0=1,1+1=0 进 1,1+1+1=1 进 1。两数从右向左逐列相加。如果结果超出固定位数,会发生溢出错误,最高位的进位将丢失。

Add 01101010₂ (106) and 00111001₂ (57) in 8 bits: sum = 10100011₂ (163). No carry beyond bit 7, so no overflow.

To detect overflow, check if the carry into the most significant bit differs from the carry out of it. In CCEA exams, you are expected to explain why overflow occurs.

要检测溢出,检查进入最高位的进位与离开最高位的进位是否不同。在 CCEA 考试中,你需要解释溢出发生的原因。


5. Two’s Complement Negative Numbers | 二进制补码表示负数

Two’s complement is the standard method for representing negative integers. To find the two’s complement representation of a negative number, write the binary for the positive magnitude, flip all bits (one’s complement), and add 1. For 8-bit systems, the range is -128 to +127.

补码是表示负整数的标准方法。要得到负数的补码表示,先写出该数绝对值的二进制,所有位取反(反码),然后加 1。对于 8 位系统,表示范围为 -128 到 +127。

Represent -37 in 8-bit two’s complement: +37 = 00100101₂. Flip bits → 11011010, add 1 → 11011011₂.

To convert a two’s complement number back to denary, if the most significant bit is 1, the number is negative. Flip all bits, add 1, and attach a minus sign.

将补码转换回十进制时,若最高位为 1,该数为负数。将所有位取反,加 1,再加上负号即可。


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

CCEA expects you to comfortably convert between bits, bytes, kilobytes, megabytes, gigabytes and terabytes. Note that 1 byte = 8 bits, 1 kilobyte = 1024 bytes, 1 megabyte = 1024 KB, and so on. Do not confuse this with SI units that use powers of 1000; in computer science we use binary multiples.

CCEA 要求你熟练掌握位、字节、千字节、兆字节、吉字节和太字节之间的换算。注意 1 字节 = 8 位,1 千字节 = 1024 字节,1 兆字节 = 1024 KB,依此类推。不要与使用 1000 次方的国际单位制混淆;计算机科学中使用的是二进制倍数。

Unit Number of Bytes
1 KB 2¹⁰ = 1024 bytes
1 MB 2²⁰ = 1 048 576 bytes
1 GB 2³⁰ bytes
1 TB 2⁴⁰ bytes

Always show working in your answers; for example, to convert 5 MB into KB: 5 × 1024 = 5120 KB.

答题时务必展示计算过程;例如将 5 MB 转换为 KB:5 × 1024 = 5120 KB。


7. Text, Image and Sound File Size Calculations | 文本、图像和声音文件大小计算

Calculating the file size of digital media is a key skill. For text, file size = number of characters × bits per character (often 8 bits for ASCII or 16 bits for Unicode). For a bitmap image, file size = width in pixels × height in pixels × colour depth in bits. For sound, file size = sample rate × bit depth × duration in seconds × number of channels.

计算数字媒体的文件大小是一项关键技能。对于文本,文件大小 = 字符数 × 每字符位数(ASCII 常为 8 位,Unicode 常为 16 位)。对于位图图像,文件大小 = 像素宽度 × 像素高度 × 颜色深度(位)。对于声音,文件大小 = 采样率 × 位深 × 持续时间(秒)× 声道数。

Image: 800×600 pixels, 24-bit colour. File size = 800×600×24 = 11 520 000 bits = 1 440 000 bytes ≈ 1.37 MB.

Remember to convert bits to bytes if required (divide by 8) and to apply appropriate binary unit conversions. Give answers in the unit specified by the question.

如有必要,记得将位转换为字节(除以 8),并进行适当的二进制单位换算。答案以题目要求的单位给出。


8. Compression Calculation and Comparison | 压缩计算与比较

Compression reduces file size; you may be asked to calculate compression ratios or compare sizes before and after compression. Compression ratio = uncompressed size ÷ compressed size. Lossy compression removes some data permanently, while lossless allows exact reconstruction.

压缩可减小文件大小;你可能会被要求计算压缩比或比较压缩前后的大小。压缩比 = 未压缩大小 ÷ 压缩后大小。有损压缩会永久移除部分数据,而无损压缩允许精确重建。

A 24 MB file is compressed to 3 MB. Compression ratio = 24 ÷ 3 = 8:1. Space saved = 21 MB.

Be prepared to explain why lossy compression gives smaller files than lossless for image and sound, and to calculate the percentage reduction: ((original – compressed) ÷ original) × 100%.

准备好解释为何有损压缩在图像和声音方面能比无损压缩得到更小的文件,并能够计算减小百分比:((原始大小 – 压缩后大小) ÷ 原始大小) × 100%。


9. Logic Gate Calculations and Truth Tables | 逻辑门计算与真值表

Logic gates (AND, OR, NOT, NAND, NOR, XOR) process binary inputs. You must be able to complete truth tables for a combination of gates and determine the output for given inputs. Interpret Boolean expressions using the relevant symbols: AND (∧), OR (∨), NOT (¬).

逻辑门(与、或、非、与非、或非、异或)处理二进制输入。你必须能够完成组合逻辑电路的真值表,并确定给定输入下的输出。会使用相关符号解读布尔表达式:AND (∧)、OR (∨)、NOT (¬)。

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 two-level circuit, work through intermediate columns in a truth table. CCEA questions will sometimes ask you to draw a logic circuit from an expression or vice versa, but the numerical skill is about deriving output states systematically.

对于两级电路,在真值表中逐步填入中间列。CCEA 考题有时会让你根据表达式画出逻辑电路或反之,但计算技能主要在于有条理地推导输出状态。


10. Error Detection – Parity and Check Digits | 错误检测——奇偶校验与校验位

Error detection calculations involve counting bits or applying modulus checks. For even parity, the total number of 1-bits (including parity bit) must be even. For odd parity, it must be odd. To find the appropriate parity bit, count the 1s in the data and set the bit to make the total match the parity type.

错误检测计算涉及统计位数或应用模数校验。对于偶校验,包括校验位在内的 1 的总数必须为偶数;奇校验则必须为奇数。要确定合适的校验位,先统计数据中 1 的个数,然后设置校验位使总数符合校验类型。

Data: 1011001 (four 1s). For even parity, parity bit = 0 (total remains even). For odd parity, parity bit = 1 (total becomes 5, odd).

Check digit calculations, such as those used in ISBN or barcodes, use a weighted sum modulo 11 or modulo 10. Practice the step-by-step multiply-and-sum method; CCEA may provide the weighting factors but expects you to compute the check digit correctly.

像 ISBN 或条形码中使用的校验位计算,需要通过加权和模 11 或模 10 得到。练习逐步乘加的方法;CCEA 可能会给出权重因子,但要求你正确计算出校验位。

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