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

OCR Year 7 Computer Science: Formula & Theorem Quick Reference Handbook | Year 7 OCR 计算机:公式定理速查手册

2026-07-16 15:11 · 本文部分内容由AI辅助创作

📚 OCR Year 7 Computer Science: Formula & Theorem Quick Reference Handbook | Year 7 OCR 计算机:公式定理速查手册

This handbook provides a concise collection of key formulas and theorems for Year 7 OCR Computer Science. It is designed to help you quickly recall essential concepts, from binary conversions to algorithm efficiency, during revision and daily learning.

本手册汇集了 Year 7 OCR 计算机科学的关键公式和定理,旨在帮助你在复习和日常学习中快速回顾二进制转换、算法效率等重要概念。


1. Binary Place Values and Conversion | 二进制位权与转换

In binary, each column represents a power of 2, starting from 2⁰ on the far right. To convert a binary number to decimal, multiply each bit by its place value and sum the results.

在二进制中,每一列代表 2 的幂,从最右侧的 2⁰ 开始。要将二进制数转换为十进制,需将每位数字乘以对应位权,再将结果相加。

Binary to Decimal: 1 1 0 1₂ = 1×2³ + 1×2² + 0×2¹ + 1×2⁰ = 8 + 4 + 0 + 1 = 13

Convert decimal to binary by repeatedly dividing the number by 2 and reading the remainders in reverse order.

十进制转二进制:将数字不断除以 2,按逆序读取余数即可得到二进制形式。

3 ÷ 2 = 1 remainder 1, 1 ÷ 2 = 0 remainder 1. Read remainders from bottom to top: 11001₂.

示例:将 25 转换为二进制。25 ÷ 2 = 12 余 1,12 ÷ 2 = 6 余 0,6 ÷ 2 = 3 余 0,3 ÷ 2 = 1 余 1,1 ÷ 2 = 0 余 1。从下往上读余数得 11001₂。


2. Binary Addition Rules | 二进制加法规则

Binary addition follows four simple rules that form the basis of all arithmetic inside a computer's processor.

二进制加法遵循四条简单规则,这些规则是计算机处理器内部所有算术运算的基础。

RuleExampleResult
0 + 0 = 00₂ + 0₂0₂
0 + 1 = 10₂ + 1₂1₂
1 + 0 = 11₂ + 0₂1₂
1 + 1 = 10₂ (0, carry 1)1₂ + 1₂0 with carry 1

When adding multiple bits, work from right to left and carry over any value of 2 or more to the next column.

当多个位相加时,从右向左逐位计算,若结果达到或超过 2,则将进位值传递到左侧相邻列。

₂ + 011₂ = 1000₂ (Step: 1+1=10₂ carry 1, 0+1+carry=10₂, 1+0+carry=10₂, then final carry 1)

A carry occurs whenever the sum of bits in a column is 2 or greater.

只要某一列中各位之和大于或等于 2,便会产生进位。


3. Data Storage Units | 数据存储单位

Storage units follow either the decimal system (kB, MB, GB) or the binary system (KiB, MiB, GiB). OCR at Key Stage 3 often uses the decimal convention for simplicity.

存储单位可采用十进制体系(kB、MB、GB)或二进制体系(KiB、MiB、GiB)。OCR 在关键阶段 3 通常为简化起见采用十进制惯例。

UnitEquivalent in bytesPower of 10
1 kB (kilobyte)1,000 bytes10³
1 MB (megabyte)1,000,000 bytes10⁶
1 GB (gigabyte)1,000,000,000 bytes10⁹
1 TB (terabyte)1,000,000,000,000 bytes10¹²

When converting between units, multiply by 1,000 when moving to a smaller unit and divide by 1,000 when moving to a larger unit.

在单位间转换时,若转换为更小的单位则乘以 1,000,转换为更大的单位则除以 1,000。

Example: 5 MB = 5 × 1,000 kB = 5,000 kB, and 3,500 kB = 3,500 ÷ 1,000 = 3.5 MB

ence between these decimal units and the binary kibibyte (KiB), where 1 KiB = 1,024 bytes.

记住这些十进制单位与二进制 kibibyte(KiB)之间的区别很重要,1 KiB = 1,024 字节。


4. Image File Size Formula | 图像文件大小公式

epends on its resolution (width × height in pixels) and its colour depth (bits per pixel).

位图图像的文件大小取决于其分辨率(以像素为单位的宽度 × 高度)以及颜色深度(每像素的比特数)。

Image file size (bits) = width × height × colour depth

To convert this result into bytes, divide by 8. For kilobytes, divide by 8,000.

要将结果转换为字节,需除以 8。若要以千字节为单位,则除以 8,000。

Example: an image 200×300 pixels with 24‑bit colour depth: 200 × 300 × 24 = 1,440,000 bits = 180,000 bytes ≈ 180 kB

Increasing the colour depth or the number of pixels directly increases the file size, which is why high‑resolution photographs take up more storage space.

提高颜色深度或像素数量会直接增大文件大小,因此高分辨率照片会占用更多存储空间。


5. Sound File Size Formula | 声音文件大小公式

Digital sound is created by sampling the sound wave at regular intervals. The file size is determined by the sample rate, bit depth, duration and the number of channels.

数字声音是通过定期对声波采样生成的。文件大小由采样率、位深度、时长以及声道数量决定。

Sound file size (bits) = sample rate × bit depth × duration (seconds) × channels

For example, a 10‑second stereo recording at 44,100 Hz with 16‑bit samples uses: 44,100 × 16 × 10 × 2 = 14,112,000 bits ≈ 1.76 MB.

例如,一段 10 秒、采样率 44,100 Hz、位深度 16 比特的立体声录音大小为:44,100 × 16 × 10 × 2 = 14,112,000 比特 ≈ 1.76 MB。

A higher sample rate captures more detail of the original sound, and a higher bit depth distinguishes more volume levels, both resulting in higher audio quality but larger files.

更高的采样率能够捕捉到原始声音的更多细节,而更高的位深度能区分更多音量级别,这两者都会提升音频质量,但也使文件更大。


广告 / Sponsored

6. Logic Gate Truth Tables | 逻辑门真值表

Logic gates are the building blocks of digital circuits. The three fundamental gates are NOT, AND and OR.

逻辑门是数字电路的基本构件。三种基本门为 NOT、AND 和 OR。

NOT gate: takes one input and inverts it.

NOT 门:接收一个输入并将其取反。

Input AOutput Q
01
10

AND gate: outputs 1 only when all inputs are 1.

AND 门:仅当所有输入均为 1 时才输出 1。

Input AInput BOutput Q = A AND B
000
010
100
111

OR gate: outputs 1 if at least one input is 1.

OR 门:如果至少有一个输入为 1,则输出 1。

Input AInput BOutput Q = A OR B
000
011
101
111

Combining these gates allows us to create more complex circuits such as half‑adders and flip‑flops.

将这些门组合起来就可以创建出半加器、触发器之类更为复杂的电路。


7. Boolean Algebra Laws | 布尔代数定律

Boolean algebra simplifies logic expressions using a set of laws. These are vital for circuit design and program conditions.

布尔代数利用一组定律简化逻辑表达式,对于电路设计和程序条件判断至关重要。

Commutative Law: A AND B = B AND A; A OR B = B OR A

交换律:A AND B = B AND A;A OR B = B OR A

Associative Law: (A AND B) AND C = A AND (B AND C); (A OR B) OR C = A OR (B OR C)

结合律:(A AND B) AND C = A AND (B AND C);(A OR B) OR C = A OR (B OR C)

Distributive Law: A AND (B OR C) = (A AND B) OR (A AND C); A OR (B AND C) = (A OR B) AND (A OR C)

分配律:A AND (B OR C) = (A AND B) OR (A AND C);A OR (B AND C) = (A OR B) AND (A OR C)

De Morgan's Laws: NOT (A AND B) = (NOT A) OR (NOT B); NOT (A OR B) = (NOT A) AND (NOT B)

德摩根定律:NOT (A AND B) = (NOT A) OR (NOT B);NOT (A OR B) = (NOT A) AND (NOT B)

These laws can reduce the number of gates needed in a circuit, saving cost and power.

这些定律能够减少电路所需逻辑门的数量,从而节约成本和功耗。


8. Searching Algorithms – Comparison Count | 搜索算法比较次数

Two common search algorithms are linear search and binary search, each with a different worst‑case number of comparisons.

两种常见搜索算法是线性搜索和二分搜索,各自在最坏情况下的比较次数不同。

Linear search checks each element one by one until the target is found. Maximum comparisons for a list of n items is n.

线性搜索逐一检查每个元素直至找到目标。对于包含 n 个项的列表,最大比较次数为 n。

Worst‑case linear search comparisons = n

Binary search works on sorted lists by repeatedly dividing the search space in half. The maximum number of comparisons is roughly log₂(n) + 1.

二分搜索适用于已排序的列表,通过反复将搜索空间减半来定位。最大比较次数大约为 log₂(n) + 1。

Worst‑case binary search comparisons ≈ log₂(n) + 1

For example, searching for a name in a sorted list of 1,000 entries requires at most 10 comparisons with binary search, but up to 1,000 with linear search.

例如,在一个包含 1,000 个条目的已排序列表中搜索某个姓名,二分搜索最多需要 10 次比较,而线性搜索则可能需要多达 1,000 次。


9. Sorting Algorithms – Bubble Sort Pass Count | 排序算法冒泡排序比较次数

Bubble sort repeatedly steps through the list, compares adjacent pairs and swaps them if they are in the wrong order. After each pass, the largest unsorted element 'bubbles up' to its correct position.

冒泡排序反复遍历列表,比较相邻元素,如果顺序错误则交换它们。每趟遍历结束后,剩余部分中最大的元素会“冒泡”到其正确位置。

The total number of comparisons made by a simple bubble sort on a list of n items is always the same, regardless of the initial order:

对一个包含 n 个项的列表进行简单冒泡排序时,无论初始顺序如何,总的比较次数始终相同:

Total comparisons = (n−1) + (n−2) + … + 1 = n(n−1)/2

s takes 45 comparisons. This formula illustrates why bubble sort becomes slow for large datasets.

例如,对 5 个项进行排序需要 5×4/2 = 10 次比较,对 10 个项排序则需要 45 次比较。这个公式说明了为什么对于大规模数据集,冒泡排序会变得很慢。


10. Data Transmission Time | 数据传输时间

The time required to transfer a file over a network depends on the file size and the available transfer rate (bit rate).

通过网络传输文件所需的时间取决于文件大小和可用的传输速率(比特率)。

Transmission time (seconds) = file size (bits) ÷ transfer rate (bits per second)

Always ensure both quantities use the same unit – either bits or bytes – before dividing.

在相除之前,务必确保两者的单位一致,同用比特或同用字节。

le = 16,000,000 bits. With a 4 Mbps connection, time = 16,000,000 ÷ 4,000,000 = 4 seconds.

This formula helps estimate download durations and is widely used in real‑world network calculations. Note that overheads like packet headers can slightly increase the actual time.

此公式有助于估算下载时长,并广泛用于现实的网络计算。需注意,数据包头等开销会使实际时间略有增加。


11. Compression Ratio | 压缩比

Compression reduces file size. The compression ratio measures how much smaller a file becomes after compression.

压缩能减小文件大小。压缩比衡量的是压缩后文件变小的程度。

Compression ratio = uncompressed size ÷ compressed size

For instance, if a 20 MB image is compressed to 5 MB, the compression ratio is 4:1. A higher ratio means more efficient compression.

例如,若一个 20 MB 的图像被压缩到 5 MB,则压缩比为 4:1。比值越高,表示压缩效率越高。

Lossless compression preserves all original data, while lossy compression achieves higher ratios by permanently removing some detail.

无损压缩保留全部原始数据,而有损压缩则通过永久移除部分细节来获得更高的压缩比。


12. Colour Depth and Number of Colours | 颜色深度与颜色数量

Colour depth, also called bit depth, decides how many distinct colours an image can display. The relationship is a power of two.

颜色深度也称为位深度,决定了图像可显示的不同颜色数量。这一关系基于 2 的幂。

Number of colours = 2colour depth in bits

Common values include 1‑bit = 2 colours (black and white), 8‑bit = 256 colours, and 24‑bit = over 16.7 million colours (True Colour).

常见取值包括:1 位 = 2 种颜色(黑白),8 位 = 256 种颜色,24 位 = 超过 1,670 万种颜色(真彩色)。

Higher colour depth creates smoother gradients and more realistic images, but it also increases file size proportionally.

更高的颜色深度能产生更平滑的渐变和更逼真的图像,但同时也会按比例增大文件大小。


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

广告 / Sponsored
Linux高级程序设计(高等院校计算机技术十二五规划教材)/刘加海/季江民/浙江大学出版社
计算机 备考教辅 · 正版现货 · 与本文内容相关
查看详情 / View on Taobao参考价 ¥55.6

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

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