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

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

Mastering quick and accurate calculations is essential for success in the WJEC GCSE Computer Science exam. From binary conversions to file size estimates, you need to be able to work through numeric problems with confidence. This revision guide covers all the calculation-heavy topics you will face, with step‑by‑step examples and bilingual explanations to reinforce your understanding.

掌握快速准确的计算能力是 WJEC GCSE 计算机科学考试取得成功的关键。从二进制转换到文件大小估算,你必须能够自信地解答各类计算题。本专项训练涵盖了所有计算密集的热门考点,提供分步示例和中英双语解释,帮助你巩固理解。


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

Write down the binary number and place the column headings above each bit: … 128, 64, 32, 16, 8, 4, 2, 1. Add up the values of the columns where there is a 1. For example, convert 101101 to denary. We pad to 8 bits: 00101101. Add 32 + 8 + 4 + 1 = 45.

写下二进制数,并在每一位上方放置位权:… 128, 64, 32, 16, 8, 4, 2, 1。将出现 1 的位权相加即可。例如,将 101101 转换为十进制。补足 8 位:00101101。计算 32 + 8 + 4 + 1 = 45。


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

Repeatedly divide the denary number by 2, recording the remainder each time. Read the remainders from bottom to top to get the binary equivalent. Example: convert 57 to binary. 57 ÷ 2 = 28 r1; 28 ÷ 2 = 14 r0; 14 ÷ 2 = 7 r0; 7 ÷ 2 = 3 r1; 3 ÷ 2 = 1 r1; 1 ÷ 2 = 0 r1. Result: 111001.

将十进制数反复除以 2,每次记录余数。从下往上读取余数即得到二进制值。示例:将 57 转换为二进制。57 ÷ 2 = 28 余 1;28 ÷ 2 = 14 余 0;14 ÷ 2 = 7 余 0;7 ÷ 2 = 3 余 1;3 ÷ 2 = 1 余 1;1 ÷ 2 = 0 余 1。结果为 111001。


3. Binary Addition | 二进制加法

Follow the rules: 0+0=0, 0+1=1, 1+0=1, 1+1=0 carry 1, 1+1+1=1 carry 1. Always align bits to the right. Work from right to left. Example: add 0110 (6) and 0101 (5). Rightmost: 0+1=1. Next: 1+0=1. Next: 1+1=0 carry 1. Next: 0+0+carry1=1. Result: 1011 (11).

遵循规则:0+0=0,0+1=1,1+0=1,1+1=0 进 1,1+1+1=1 进 1。始终右对齐。从右向左逐位计算。示例:0110 (6) 加 0101 (5)。最右位:0+1=1。下一位:1+0=1。下一位:1+1=0 进 1。下一位:0+0+进位1=1。结果:1011 (11)。


4. Overflow and Binary Shifts | 溢出与二进制移位

When adding 8‑bit numbers, a carry into a 9th bit indicates an overflow. An arithmetic shift left by one place multiplies the value by 2 (with a possible overflow). A logical shift right divides by 2 (integer division), moving a 0 into the MSB. Example: left shift 00101100 (44) by 1 gives 01011000 (88). Right shift gives 00010110 (22).

当两个 8 位数相加时,如果向第 9 位进位,则表示溢出。算术左移一位相当于乘以 2(可能溢出)。逻辑右移一位相当于除以 2(整数除法),最高位补 0。示例:将 00101100 (44) 左移一位得到 01011000 (88)。右移一位得到 00010110 (22)。


5. Hexadecimal Conversions | 十六进制转换

Group binary digits in fours from the right. Each group converts to a hex digit: 0‑9, A‑F. Example: 110111012 → 1101 1101 → D D → DD16. Denary to hex: divide by 16, note remainders in reverse. 200 ÷ 16 = 12 r8 → C816. Hex to denary: multiply each digit by 16position. C8 = 12×16 + 8 = 200.

从右开始每四位二进制一组。每组转换为一个十六进制数字:0‑9,A‑F。示例:110111012 → 1101 1101 → D D → DD16。十进制转十六进制:除以 16,逆序记录余数。200 ÷ 16 = 12 余 8 → C816。十六进制转十进制:每位乘 16位置 后相加。C8 = 12×16 + 8 = 200。


6. Signed Integers using Two’s Complement | 补码表示有符号整数

For negative numbers, invert all bits and add 1. The most significant bit indicates sign (1 = negative). Example: represent –6 in 4‑bit two’s complement. +6 = 0110. Invert: 1001. Add 1: 1010. To convert back: 1010 – invert → 0101, add 1 → 0110 (6), so the value is –6.

对于负数,将所有位取反后加 1。最高位为符号位(1 表示负)。示例:用 4 位补码表示 –6。+6 = 0110。取反:1001。加 1:1010。转换回去:1010 → 取反 0101,加 1 → 0110 (6),因此值为 –6。

To find the range: for n bits, range is –2n-1 to 2n-1–1. E.g., 8 bits: –128 to +127.

求取值范围:n 位补码的范围是 –2n-1 到 2n-1–1。例如 8 位:–128 到 +127。


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

Review AND, OR, NOT, XOR gate behaviours. Compute output for multi‑gate circuits by working through the truth table. Example: A=0, B=1 into AND gives 0; into OR gives 1; XOR gives 1. In a circuit, trace each step. Calculation often requires constructing a truth table with all input combinations.

复习 AND、OR、NOT、XOR 门的行为。通过建立真值表来计算多门电路的输出。示例:A=0,B=1,AND 输出 0;OR 输出 1;XOR 输出 1。在电路中逐步追踪。通常需要构建包含所有输入组合的真值表。


8. Bitmap Image File Size | 位图图像文件大小

File size (bits) = width × height × colour depth. Convert bits to bytes by dividing by 8, then to KB by ÷1024, and so on. Example: an image 640×480 with 24‑bit colour. Bits = 640 × 480 × 24 = 7,372,800 bits. Bytes = 7,372,800 / 8 = 921,600 bytes. KB ≈ 900 KB (or 0.9 MB).

文件大小(比特) = 宽 × 高 × 颜色深度。将比特转换为字节需除以 8,再转换为 KB 除以 1024,依此类推。示例:一幅 640×480、24 位色的图像,比特数 = 640 × 480 × 24 = 7,372,800 比特。字节数 = 7,372,800 / 8 = 921,600 字节。约 900 KB(或 0.9 MB)。


9. Sound File Size | 声音文件大小

File size (bits) = sample rate × bit depth × duration (seconds) × channels. For stereo, channels = 2. Example: 44.1 kHz sample rate, 16‑bit, 10 seconds, mono. Bits = 44100 × 16 × 10 = 7,056,000 bits → /8 = 882,000 bytes ≈ 861 KB.

文件大小(比特) = 采样率 × 位深度 × 时长(秒) × 声道数。立体声声道数为 2。示例:44.1 kHz 采样率,16 位,10 秒,单声道。比特数 = 44100 × 16 × 10 = 7,056,000 比特 → /8 = 882,000 字节 ≈ 861 KB。


10. Units of Data and Conversion | 数据单位与换算

Memorise the hierarchy: bit → nibble (4 bits) → byte (8 bits) → kilobyte (KB = 1024 B) → megabyte (MB = 1024 KB) → gigabyte (GB = 1024 MB) → terabyte (TB = 1024 GB). When converting, multiply or divide by 1024. Example: how many bytes in 5 MB? 5 × 1024 × 1024 = 5,242,880 bytes.

熟记数据单位层级:bit → nibble (4 位) → byte (8 位) → kilobyte (KB = 1024 B) → megabyte (MB = 1024 KB) → gigabyte (GB = 1024 MB) → terabyte (TB = 1024 GB)。换算时乘或除 1024。示例:5 MB 有多少字节?5 × 1024 × 1024 = 5,242,880 字节。


11. Compression Ratios | 压缩比率

Compression ratio = original size / compressed size. E.g., a 240 KB file compressed to 60 KB gives a ratio of 240:60 = 4:1. You may also need to calculate space saved: (original – compressed) / original × 100%. (240‑60)/240 ×100% = 75% saving.

压缩比 = 原始大小 / 压缩后大小。例如,一个 240 KB 文件被压缩至 60 KB,其压缩比为 240:60 = 4:1。你可能还需要计算节省的空间百分比:(原始 – 压缩) / 原始 × 100%。(240‑60)/240 ×100% = 节省 75%。


12. Check Digits and Barcodes | 校验位与条码

For ISBN‑13 or similar weighted sum calculations, multiply each digit by alternating weights (1 and 3), sum the results, and find the next multiple of 10. The check digit is the difference. Example: digits 9 7 8 0 1 2 3 4 5 6 7 8 with weights 1,3,1,3… Sum = 9×1 +7×3 +8×1 +0×3 +1×1 +2×3 +3×1 +4×3 +5×1 +6×3 +7×1 +8×3 = 9+21+8+0+1+6+3+12+5+18+7+24 = 114. Next multiple of 10 is 120, so check digit = 6.

对于 ISBN‑13 或类似的加权求和算法,将每位数字交替乘以权值 1 和 3,求和后找出下一个 10 的倍数。检查位数即是差值。示例:数字 9 7 8 0 1 2 3 4 5 6 7 8,权值 1,3,1,3… 求和 = 9×1 +7×3 +8×1 +0×3 +1×1 +2×3 +3×1 +4×3 +5×1 +6×3 +7×1 +8×3 = 114。下一个 10 的倍数是 120,校验位 = 6。


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课程辅导,国外大学本科硕士研究生博士课程论文辅导Cancel reply

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

Exit mobile version