Year 10 OCR Computer Science: Formulae and Theorems Quick Reference Guide | Year 10 OCR 计算机:公式定理速查手册

📚 Year 10 OCR Computer Science: Formulae and Theorems Quick Reference Guide | Year 10 OCR 计算机:公式定理速查手册

This quick reference handbook collects the essential formulae, theorems and computational rules for the Year 10 OCR Computer Science course (J277). It covers data representation, Boolean logic, data transmission, algorithm performance and binary arithmetic. Use it as a handy revision tool to reinforce your understanding and support your exam preparation.

本速查手册汇集了 Year 10 OCR 计算机科学课程 (J277) 中必学的公式、定理和计算规则。内容涵盖数据表示、布尔逻辑、数据传输、算法效率与二进制算术。利用这份手册进行复习,可以巩固所学知识,为考试做好充分准备。


1. Data Units and Storage Calculations | 数据单位与存储计算

Storage capacity is measured from the bit (b), the smallest unit of data. Eight bits make one byte (B). OCR references both SI decimal prefixes (1 KB = 1000 bytes) and IEC binary prefixes (1 KiB = 1024 bytes). In exams, always check which system is being used: manufacturers often quote decimal sizes, while operating systems display binary sizes.

存储容量从最小的数据单位位 (bit) 开始衡量。8位构成1字节 (B)。OCR 大纲同时提及 SI 十进制前缀 (1 KB = 1000 字节) 和 IEC 二进制前缀 (1 KiB = 1024 字节)。考试时务必确认所使用的进制:厂商通常标称十进制大小,而操作系统显示二进制大小。

Size (bytes) = Size (bits) ÷ 8

Converting from bits to bytes is a fundamental step when working with file sizes and network speeds. Remember: 1 byte = 8 bits, so divide by 8; to go from bytes to bits, multiply by 8.

在处理文件大小和网络速度时,位与字节的转换是最基本的步骤。牢记:1 字节 = 8 位,因此除以 8 可得字节数;从字节转换为位则乘以 8。

1 KiB = 1024 B, 1 MiB = 1024 KiB, 1 GiB = 1024 MiB, 1 TiB = 1024 GiB

These binary prefixes (kibi-, mebi-, gibi-, tebi-) are introduced to avoid confusion with the decimal units. A common exam trick is to ask for a calculation using a mixture of units; always convert to the same unit first, usually bytes.

这些二进制前缀 (kibi-、mebi-、gibi-、tebi-) 的引入正是为了避免与十进制单位混淆。考试中常见的陷阱是混合使用不同单位进行计算;务必先把所有单位统一为同一单位(通常是字节)。


2. Binary and Hexadecimal Conversions | 二进制与十六进制转换

To convert a binary number to denary, sum the place values where a 1 appears. The rightmost bit is the least significant (2⁰), and each place to the left doubles in value.

将二进制数转换为十进制,只需将所有出现 1 的位对应的权值相加。最右边是最低有效位 (2⁰),每向左移一位权值翻倍。

Denary = bₙ₋₁×2ⁿ⁻¹ + … + b₂×2² + b₁×2¹ + b₀×2⁰

For example, 1011₂ = 1×2³ + 0×2² + 1×2¹ + 1×2⁰ = 8 + 0 + 2 + 1 = 11. To convert denary to binary, repeatedly divide the number by 2 and record the remainders in reverse order.

例如,1011₂ = 1×2³ + 0×2² + 1×2¹ + 1×2⁰ = 8+0+2+1=11。十进制转二进制则重复除以 2 并逆序记录余数。

Hexadecimal uses base 16, with digits 0–9 and A–F (A=10, … F=15). One hex digit is exactly 4 bits, making conversion straightforward: split the binary number into groups of four bits from the right, convert each group to its hex equivalent.

十六进制采用基数 16,包含数字 0–9 和字母 A–F (A=10 … F=15)。一个十六进制位恰好对应 4 个二进制位,因此转换非常直接:从右向左每四位二进制分为一组,每组转换为对应的十六进制数。

A2F₁₆ = 1010 0010 1111₂

Always pad the leftmost group with leading zeros if fewer than 4 bits. Hexadecimal is heavily used for colour codes, memory addresses and MAC addresses.

若最左边一组不足 4 位,则用前导零补齐。十六进制广泛用于颜色代码、内存地址和 MAC 地址。


3. Binary Arithmetic and Overflow | 二进制算术与溢出

Binary addition follows four simple rules: 0+0=0, 0+1=1, 1+0=1, and 1+1=0 with a carry of 1 into the next column. Add columns from right to left, just as with denary addition.

二进制加法遵循四条简单规则:0+0=0, 0+1=1, 1+0=1, 1+1=0 并向高位进 1。与十进制加法一样,从右向左逐列相加。

When the result of addition exceeds the maximum value that can be stored in a fixed number of bits, an overflow occurs. For an 8‑bit unsigned register, the maximum value is 11111111₂ (255). If the sum produces a 9th bit, it is lost, causing the stored result to be incorrect.

当相加的结果超出一个固定位宽所能存储的最大值时,就会发生溢出。对于 8 位无符号寄存器,最大值为 11111111₂ (255)。若加和产生了第 9 位,该位将被丢弃,导致存储的结果出错。

Overflow occurs if carry into sign bit ≠ carry out of sign bit (in signed arithmetic)

OCR expects you to detect overflow by checking whether the carry into the most significant bit differs from the carry out. Binary addition and overflow understanding is needed when studying computer arithmetic and error conditions.

OCR 要求通过检查最高位的进位是否不同于最高位的出位来检测溢出。理解二进制加法和溢出对于学习计算机算术和错误状态十分必要。


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

Bitmap images are made of pixels. Each pixel’s colour is stored using a fixed number of bits, termed colour depth. The raw size of an image file in bits is calculated by multiplying the width, height and colour depth.

位图图像由像素组成。每个像素的颜色使用固定位数存储,称为色深。图像文件的原始大小(以位计)由宽度、高度和色深三者相乘得出。

Image file size (bits) = Width (px) × Height (px) × Colour depth (bpp)

To obtain the size in bytes, divide the result by 8. For example, a 100×100 image with a colour depth of 24 bits per pixel uses 100×100×24 = 240,000 bits, which is 240,000 ÷ 8 = 30,000 bytes (approx. 29.3 KiB).

要得到以字节为单位的大小,将结果除以 8。例如,一幅 100×100 像素、24 位色深的图像占用 100×100×24 = 240,000 位,即 240,000 ÷ 8 = 30,000 字节 (约 29.3 KiB)。

Metadata (such as width, height, colour table) may add a small overhead, but the basic calculation above gives the minimum storage required for the uncompressed pixel data.

元数据 (如宽度、高度、调色板) 会增加少量额外开销,但上述基础计算给出了未压缩像素数据所需的最低存储空间。


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

Digital audio is captured by sampling the analogue signal at regular intervals. The sample rate (Hz) measures how many samples are taken per second; the sample resolution (bits) is the number of bits used to represent each sample; and the number of channels indicates mono (1) or stereo (2).

数字音频是通过定期采样模拟信号获得的。采样率 (Hz) 表示每秒采集的样本数;采样分辨率 (位) 表示每个样本使用的位数;声道数表示单声道 (1) 或立体声 (2)。

Sound file size (bits) = Sample rate × Sample resolution × Duration (s) × Channels

Convert to bytes by dividing by 8. For instance, a 10‑second stereo track recorded at 44,100 Hz with 16‑bit resolution occupies 44,100 × 16 × 10 × 2 = 14,112,000 bits, which equals 1,764,000 bytes or roughly 1.68 MiB.

除以 8 可得字节数。例如,一段 10 秒、44,100 Hz 采样率、16 位分辨率的立体声录音,大小为 44,100 × 16 × 10 × 2 = 14,112,000 位,即 1,764,000 字节 (约 1.68 MiB)。

Higher sample rate and higher bit depth improve sound quality but increase file size proportionally. This trade‑off is essential when discussing storage and streaming applications.

提高采样率和位深度可以改善音质,但会成比例地增加文件大小。在讨论存储和流媒体应用时,这一取舍非常关键。


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

The time required to transmit a file across a network depends on the file size and the transfer rate (bandwidth). Data quantities must be in the same unit — typically bits when using bits per second (bps) as the speed unit.

通过网络传输文件所需的时间取决于文件大小和传输速率 (带宽)。数据量必须使用相同单位 —— 当速率以 bps (位每秒) 为单位时,文件大小通常也需换算为位。

Transmission time (s) = File size (bits) ÷ Transfer rate (bps)

For example, sending a 5 Megabyte image over a 2 Mbps connection: first convert 5 MB to bits — 5 × 1,000,000 × 8 = 40,000,000 bits. Time = 40,000,000 ÷ 2,000,000 = 20 seconds.

例如,通过 2 Mbps 的连接发送一幅 5 MB 的图像:首先将 5 MB 转换为位 —— 5 × 1,000,000 × 8 = 40,000,000 位。时间 = 40,000,000 ÷ 2,000,000 = 20 秒。

Always watch out for mixed units (e.g. KiB vs. KB, MB vs. MiB) and make sure to multiply bytes by 8 to get bits before dividing. This formula also applies to download times and data bus transfers.

务必留心混合单位 (如 KiB 与 KB、MB 与 MiB),并确保在除法前先将字节乘以 8 转换为位。该公式也适用于下载时间和数据总线传送。


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

Boolean algebra deals with binary variables and logic operations. The principal operators are AND (·), OR (+) and NOT ( ‘ ). Below are the fundamental laws that allow simplification of logic circuits and expressions.

布尔代数处理二进制变量和逻辑运算。主要运算符为与 (·)、或 (+) 和非 ( ‘ )。以下是可以用来化简逻辑电路和表达式的基本定律。

Identity Law: A + 0 = A and A · 1 = A.

同一律:A + 0 = A,A · 1 = A。

Null Law: A + 1 = 1 and A · 0 = 0.

零一律:A + 1 = 1,A · 0 = 0。

Idempotent Law: A + A = A and A · A = A.

等幂律:A + A = A,A · A = A。

Complement Law: A + A’ = 1 and A · A’ = 0.

互补律:A + A’ = 1,A · A’ = 0。

Double Negation: (A’)’ = A.

双重否定律:(A’)’ = A。

Commutative Law: A + B = B + A and A · B = B · A.

交换律:A + B = B + A,A · B = B · A。

Associative Law: (A + B) + C = A + (B + C) and (A · B) · C = A · (B · C).

结合律:(A + B) + C = A + (B + C),(A · B) · C = A · (B · C)。

Distributive Law: A · (B + C) = (A · B) + (A · C) and A + (B · C) = (A + B) · (A + C).

分配律:A · (B + C) = (A · B) + (A · C),A + (B · C) = (A + B) · (A + C)。

Absorption Law: A + (A · B) = A and A · (A + B) = A.

吸收律:A + (A · B) = A,A · (A + B) = A。

Familiarity with these laws is essential for simplifying combinatorial logic and answering truth‑table / expression based questions.

熟练掌握这些定律对于化简组合逻辑以及回答基于真值表和表达式的问题至关重要。


8. De Morgan’s Theorems | 德摩根定理

De Morgan’s theorems describe how the complement of an AND or OR expression can be broken into the complement of individual terms with the opposite operator. They are indispensable tools for simplifying and converting logic circuits.

德摩根定理描述了如何将 AND 或 OR 表达式的补表示为各个变量取补后的相反运算。它们是化简和转换逻辑电路时不可或缺的工具。

(A · B)’ = A’ + B’

(A + B)’ = A’ · B’

In words: the complement of a conjunction is the disjunction of the complements, and the complement of a disjunction is the conjunction of the complements.

换言之,与运算的补等于各个变量取补后的或;或运算的补等于各个变量取补后的与。

Applying De Morgan often allows you to realise a circuit using NAND or NOR gates only, which is a common requirement in digital design. Practice drawing circuits before and after applying the theorem to see how the number of gates changes.

应用德摩根定理常常能仅用与非门或或非门来实现电路,这在数字设计中是常见要求。练习在

Published by TutorHao | Year 10 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