← 返回资讯屏轩教育 · 行业资讯

GCSE OCR Computer Science: Calculation Practice Drill | GCSE OCR 计算机:计算题专项训练

2026-07-14 09:57 · 本文部分内容由AI辅助创作

📚 GCSE OCR Computer Science: Calculation Practice Drill | GCSE OCR 计算机:计算题专项训练

This article is a focused practice drill on the calculation skills required for the OCR GCSE Computer Science exams (J277). It covers binary and hexadecimal arithmetic, data representation, file size estimation, compression ratios, and checksums – all presented with step-by-step examples and paired English-Chinese explanations to reinforce both subject knowledge and bilingual comprehension.

本文是针对 OCR GCSE 计算机科学考试 (J277) 计算题的专项训练。内容涵盖二进制与十六进制算术、数据表示、文件大小估算、压缩比和校验和等必考题型,全部配以分步示例与中英双语讲解,帮助巩固知识并提升双语理解力。

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

To convert an 8‑ Add the values where a 1 appears. For example, 1011 0100 becomes 128 + 32 + 16 + 4 = 180.

将 8 位二进制数转为十进制时,先在每个位上标出位权 (128, 64, 32, 16, 8, 4, 2, 1)。凡有 1 的位就加上对应的值。例如 1011 0100 转为 128 + 32 + 16 + 4 = 180。


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

Use the division-by-2 method or the place‑value method. For the place‑ - 64 = 8 → 1; 8 cannot subtract 32 or 16 → 0,0; 8 - 8 = 0 → 1; rest 0. So 200 = 1100 1000.

可以使用除 2 取余法或位值法。位值法是不断减去最大的 2 的幂,在该位写 1,其余位写 0。以 200 为例:200 - 128 = 72 → 1;72 - 64 = 8 → 1;8 不能减 32 和 16 → 0,0;8 - 8 = 0 → 1;后面补 0。因此 200 = 1100 1000。

Always check you have 8 bits. For smaller numbers, pad with leading zeros on the left.

务必确保有 8 位。对于较小的数,在左侧补前导零。


3. Binary Addition | 二进制加法

Add two binary numbers bitwise from right to left, carrying over when the sum in a column is 2 (write 0, carry 1) or 3 (write 1, carry 1). Example: 0101 1100 + 0010 1011.

逐位从右向左相加,当一列的和为 2 时写 0 进 1,为 3 时写 1 进 1。例如:0101 1100 + 0010 1011。

1286432168421
Value 101011100
Value 200101011
Carry01011110
Result10000111

= 135 in denary. Check: 92 + 43 = 135. Overflow occurs if the result exceeds 255 for an 8‑bit register, setting the carry flag.

结果为 1000 0111₂ = 十进制 135。验算:92 + 43 = 135。如果 8 位寄存器结果超过 255,则发生溢出,会置位进位标志。


4. Binary Subtraction using Two's Complement | 二进制补码减法

OCR often requires subtraction by adding the two' binary addition. Example: 70 - 23. Binary for 70: 0100 0110. 23 in binary: 0001 0111. Two's complement of 23: flip to 1110 1000, add 1 → 1110 1001. Now add 0100 0110 + 1110 1001.

OCR 常要求通过加上减数的补码来执行减法。将减数的所有位取反再加 1,然后进行二进制加法。示例:70 - 23。70 的二进制:0100 0110。23 的二进制:0001 0111。23 的补码:取反得 1110 1000,加 1 → 1110 1001。现在相加 0100 0110 + 1110 1001。

1 (9 bits). Discard the overflow carry (the leftmost bit) leaving 0010 1111 = 47. Correct.

0100 0110 + 1110 1001 = 1 0010 1111 (9 位)。忽略溢出的进位(最左位),结果为 0010 1111 = 47。正确。


广告 / Sponsored

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

by 2 → 0111 0000 (112). Right shift by 1 → 0000 1110 (14). Overflow happens when a 1 is shifted out of the leftmost bit in a left shift, meaning the result no longer fits in 8 bits.

逻辑左移 1 位相当于乘以 2;逻辑右移 1 位相当于除以 2(忽略余数)。例如:0001 1100 (28) 左移 2 位 → 0111 0000 (112)。右移 1 位 → 0000 1110 (14)。当左移时最左位的 1 被移出,结果无法用 8 位表示,便发生溢出。

OCR questions may ask: "Explain why a left shift of 3 on 1010 0000 would cause overflow." Answer: The three most significant bits are 101, and at least one is 1, so they are lost.

OCR 考题可能问:“解释为什么对 1010 0000 左移 3 位会导致溢出。” 答:最高三位为 101,其中至少有一个 1,会被移出丢失。


6. Hexadecimal Conversions | 十六进制转换

ight. Example: 1101 1011₂. Nibbles: 1101 = D, 1011 = B → DB₁₆. Denary to hex: repeatedly divide by 16; for 219, 219 ÷ 16 = 13 remainder 11 → D and B → DB.

十六进制使用 0-9 和 A-F。二进制转十六进制时,从右开始将二进制每 4 位一组分开(称为半字节)。例如:1101 1011₂。分组:1101 = D,1011 = B → DB₁₆。十进制转十六进制:反复除以 16;219 ÷ 16 = 13 余 11 → D 和 B → DB。

ry, multiply each digit by its place value (16⁰, 16¹, 16²...). A3 = 10 × 16 + 3 × 1 = 163.

十六进制转十进制时,每位乘以其位权(16⁰,16¹,16²...)。A3 = 10 × 16 + 3 × 1 = 163。


7. Data Size Calculations | 数据大小计算

gabyte (GB = 10⁹ bytes). To calculate file size in bits: number of characters × bits per character. Example: A text file with 2000 ASCII characters (7 or 8 bits per character). If using 8‑bit ASCII, size = 2000 × 8 = 16000 bits = 2000 bytes = 2 KB.

标准单位:bit、nibble (4 bits)、byte (8 bits)、kilobyte (KB,考试中若无特别说明通常为 10³ 字节)、megabyte (MB = 10⁶ 字节)、gigabyte (GB = 10⁹ 字节)。计算文件大小(以位为单位):字符数 × 每字符位数。例如:含有 2000 个 ASCII 字符的文本文件(每字符 7 或 8 位)。若采用 8 位 ASCII,大小 = 2000 × 8 = 16000 bits = 2000 bytes = 2 KB。

duration (seconds) × number of channels. For images, size = width × height × colour depth.

对于声音,大小 = 采样率 × 位深度 × 时长(秒)× 声道数。对于图像,大小 = 宽度 × 高度 × 颜色深度。


8. Sound Sampling Calculations | 声音采样计算

A common question: "Calculate the file size of a 30‑second stereo audio clip sampled at 44.1 kHz with 16‑bit resolution." s. Convert to bytes: /8 = 5,292,000 bytes. To KB: /1000 ≈ 5292 KB. To MB: /1000 ≈ 5.29 MB.

常见考题:“计算一段 30 秒立体声音频的文件大小,采样率 44.1 kHz,分辨率 16 位。” 公式:文件大小(位)= 采样率 × 位深度 × 时间 × 声道数。44100 × 16 × 30 × 2 = 42,336,000 bits。转换为字节:除以 8 得 5,292,000 bytes。转为 KB:除以 1000 约 5292 KB。再转为 MB 约 5.29 MB。

Always show your working clearly and state the units at each step. OCR may ask you to round sensibly.

务必清晰展示计算步骤并标明每步的单位。OCR 可能要求你进行合理的四舍五入。


9. Image Resolution and File Size | 图像分辨率与文件大小

ze (bits) = image width × image height × colour depth. Example: a 1024 × 768 image with 24‑ ur depth is reduced to 8 bits, the size becomes 1024 × 768 × 8 = 6,291,456 bits ≈ 0.79 MB.

对于位图图像,文件大小(位)= 图像宽度 × 图像高度 × 颜色深度。示例:1024 × 768 图像,24 位颜色。大小 = 1024 × 768 × 24 = 18,874,368 bits。换算为兆字节:除以 8,除以 1000,再除以 1000,约 2.36 MB。若颜色深度减至 8 位,大小变为 1024 × 768 × 8 = 6,291,456 bits ≈ 0.79 MB。

OCR may also ask for the effect of doubling the resolution or reducing colour depth on file size.

OCR 还可能考查分辨率加倍或降低颜色深度对文件大小的影响。


10. Compression Ratio | 压缩比

ssless compression maintains exact original data (e.g., PNG, FLAC); lossy compression discards some data (e.g., JPEG, MP3) for smaller files.

压缩比 = 原始文件大小 / 压缩后文件大小。例:一个 10 MB 文件压缩至 2 MB。比值为 10 / 2 = 5:1。无损压缩保持原始数据完整(如 PNG、FLAC);有损压缩会丢弃部分数据(如 JPEG、MP3)以获得更小体积。

size given a ratio, e.g., a 20 MB file with a 4:1 compression ratio becomes 20 / 4 = 5 MB.

准备根据给定压缩比计算压缩后大小,如 20 MB 文件以 4:1 压缩后变为 20 / 4 = 5 MB。


11. Checksum Calculation | 校验和计算

00. Sum = 357. 357 mod 256 = 101. The checksum byte is 101, transmitted with the data. The recipient repeats the sum and compares.

简单的校验和通常是将各字节值相加,然后取最低有效字节(模 256)。示例:数据字节:45、112、200。总和 = 357。357 mod 256 = 101。校验和字节为 101,随数据发送。接收方重新求和并比较。

OCR papers sometimes present a set of bytes and ask you to compute the checksum, or to verify if data has been corrupted by comparing the transmitted checksum with a recalculated one.

OCR 试卷有时给出一组字节,要求计算校验和,或通过比较传输的校验和与重新计算的校验和,验证数据是否损坏。


12. Tips for Calculation Questions | 计算题答题技巧

Always write down the formula first, substitute numbers, show intermediate steps, and include units. Even if the final answer is wrong, clear working earns method marks. Double‑check binary/hex conversions by converting back. Use the mark allocation as a guide to how much detail is needed.

务必先写出公式,再代入数字,展示中间步骤,并标注单位。即使最终答案错误,清晰的步骤也能获得方法分。通过反向转换去核对二进制/十六进制结果。根据分值判断需要写多详细。

Practise under timed conditions using past‑paper calculation questions. Familiarity with the exact phrasing of OCR questions will boost your confidence.

在计时条件下使用历年真题的计算题进行练习。熟悉 OCR 的出题措辞会大大提升你的信心。

Published by TutorHao | GCSE OCR Computer Science Revision Series | aleveler.com

广告 / Sponsored
培生爱德思计算机科学学生用书教材Pearson Edexcel International GCSE Computer…
计算机 备考教辅 · 正版现货 · 与本文内容相关
查看详情 / View on Taobao参考价 ¥349.0

更多咨询请联系16621398022(同微信)

备考资讯每日更新,关注不错过
考纲变化 · 科目分析 · 学习方法
扫码关注公众号 tutorhao
在微信里长按二维码识别关注
或截图后用「扫一扫 → 相册」选择本图
公众号:tutorhao