📚 Formula & Theorem Quick Reference Guide | 公式定理速查手册
Welcome to your go-to reference for all the key formulas, theorems and conversion methods you need for your Year 11 OCR Computer Science exam. This guide covers binary arithmetic, data storage calculations, network speeds, Boolean laws and more – every equation presented with a clear explanation and a worked example to help you memorise and apply them confidently.
欢迎查阅这份为你量身定制的 Year 11 OCR 计算机科学备考速查手册。本手册涵盖了二进制运算、数据存储计算、网络传输速度、布尔代数定律等所有核心公式与定理,每一个公式都配有清晰的解释和实用的示例,帮助你轻松记忆、灵活运用。
1. Binary to Denary Conversion | 二进制转十进制
To convert a binary number to denary, multiply each bit by its place value (powers of 2, starting from 2⁰ on the right) and sum the results. For example, 1101₂ = (1×2³) + (1×2²) + (0×2¹) + (1×2⁰) = 8 + 4 + 0 + 1 = 13₁₀.
将二进制数转换为十进制数时,将每一位乘以其位权(2 的幂,从右端 2⁰ 开始),然后求和。例如,1101₂ = (1×2³) + (1×2²) + (0×2¹) + (1×2⁰) = 8 + 4 + 0 + 1 = 13₁₀。
| Binary digit | 1 | 1 | 0 | 1 |
| Place value | 2³ = 8 | 2² = 4 | 2¹ = 2 | 2⁰ = 1 |
| Product | 1×8 = 8 | 1×4 = 4 | 0×2 = 0 | 1×1 = 1 |
Sum = 8 + 4 + 0 + 1 = 13₁₀
求和 = 8 + 4 + 0 + 1 = 13₁₀
2. Denary to Binary Conversion | 十进制转二进制
Repeatedly divide the denary number by 2, noting the remainder each time, until the quotient is 0. Read the remainders from bottom to top to obtain the binary equivalent. Example: convert 25₁₀ to binary.
将十进制数连续除以 2,依次记录余数,直至商为 0。从下往上读取余数,即得到二进制数。示例:将 25₁₀ 转换为二进制。
| Division | Quotient | Remainder |
| 25 ÷ 2 | 12 | 1 |
| 12 ÷ 2 | 6 | 0 |
| 6 ÷ 2 | 3 | 0 |
| 3 ÷ 2 | 1 | 1 |
| 1 ÷ 2 | 0 | 1 |
Read remainders bottom to top: 11001₂. Hence 25₁₀ = 11001₂.
从下往上读取余数:11001₂。因此 25₁₀ = 11001₂。
3. Hexadecimal to Denary & Binary | 十六进制与十进制、二进制转换
A single hex digit represents 4 bits (a nibble). Convert each hex digit to its 4-bit binary equivalent, then concatenate. To convert hex to denary, multiply each digit by 16ⁿ where n is the position from the right (starting at 0). Example: 2F₁₆ = (2×16¹) + (15×16⁰) = 32 + 15 = 47₁₀.
每个十六进制位对应 4 个二进制位(半字节)。将每一位十六进制数转换成其 4 位二进制等价物,然后串联。十六进制转十进制时,用每位乘以 16ⁿ(n 为从右侧开始的位置,从 0 开始)。示例:2F₁₆ = (2×16¹) + (15×16⁰) = 32 + 15 = 47₁₀。
Binary conversion for 2F₁₆: 2 → 0010, F → 1111, so 2F₁₆ = 0010 1111₂ = 101111₂.
2F₁₆ 的二进制转换:2 → 0010,F → 1111,因此 2F₁₆ = 0010 1111₂ = 101111₂。
4. Data Storage Unit Conversions | 数据存储单位换算
OCR expects you to know the exact units and their conversions. All conversions use powers of 2 or powers of 10, depending on context. The exam board primarily uses binary prefixes:
OCR 要求你掌握精确的单位及其换算关系。所有换算均采用 2 的幂或 10 的幂,视具体情境而定。考试局主要使用二进制前缀:
- 1 nibble = 4 bits
- 1 nibble = 4 位
- 1 byte = 8 bits
- 1 byte = 8 位
- 1 kilobyte (KB) = 1024 bytes (2¹⁰)
- 1 千字节 (KB) = 1024 字节 (2¹⁰)
- 1 megabyte (MB) = 1024 KB = 1,048,576 bytes (2²⁰)
- 1 兆字节 (MB) = 1024 KB = 1,048,576 字节 (2²⁰)
- 1 gigabyte (GB) = 1024 MB = 1,073,741,824 bytes (2³⁰)
- 1 千兆字节 (GB) = 1024 MB = 1,073,741,824 字节 (2³⁰)
- 1 terabyte (TB) = 1024 GB (2⁴⁰)
- 1 太字节 (TB) = 1024 GB (2⁴⁰)
To convert between units, multiply or divide by 1024 repeatedly. For example, 2048 MB = 2048 ÷ 1024 = 2 GB.
单位之间转换时,反复乘以或除以 1024。例如,2048 MB = 2048 ÷ 1024 = 2 GB。
5. Image File Size Calculation | 图像文件大小计算
The size of a bitmap image file (in bits) is given by: width × height × colour depth. Colour depth is the number of bits used per pixel. To convert bits to bytes, divide by 8.
位图图像文件的尺寸(以位为单位)公式为:宽 × 高 × 颜色深度。颜色深度即每个像素占用的位数。将位转换为字节时除以 8。
File size (bits) = image width (px) × image height (px) × colour depth (bpp)
文件大小(位)= 图像宽度(像素)× 图像高度(像素)× 颜色深度(位/像素)
Worked example: an image 1920 × 1080 pixels with 24 bits per pixel (true colour): size in bits = 1920 × 1080 × 24 = 49,766,400 bits. Then 49,766,400 ÷ 8 = 6,220,800 bytes = 6220.8 KB ≈ 6.07 MB.
示例:一张 1920 × 1080 像素、每像素 24 位(真彩色)的图像:位大小 = 1920 × 1080 × 24 = 49,766,400 位。然后 49,766,400 ÷ 8 = 6,220,800 字节 = 6220.8 KB ≈ 6.07 MB。
6. Sound File Size Calculation | 声音文件大小计算
The size of an uncompressed sound file (in bits) is calculated as: sample rate × sample resolution × number of channels × duration in seconds.
未压缩声音文件的大小(以位为单位)计算公式为:采样率 × 采样分辨率 × 声道数 × 持续时间(秒)。
File size (bits) = sample rate (Hz) × bit depth × number of channels × time (s)
文件大小(位)= 采样率(Hz)× 位深度 × 声道数 × 时间(秒)
Example: CD-quality stereo sound (44,100 Hz, 16 bits, 2 channels, 60 seconds) = 44100 × 16 × 2 × 60 = 84,672,000 bits = 10,584,000 bytes ≈ 10.09 MB.
示例:CD 质量的立体声音频(44100 Hz、16 位、2 声道、60 秒)= 44100 × 16 × 2 × 60 = 84,672,000 位 = 10,584,000 字节 ≈ 10.09 MB。
7. Network Speed Calculations | 网络速度计算
Download time is calculated by dividing the file size by the network bit rate. Always ensure the units match: convert both to bits or both to bytes before dividing. Use 8 bits = 1 byte. Typical bit rates are given in megabits per second (Mbps); file sizes may be in megabytes (MB).
下载时间等于文件大小除以网络比特率。务必统一单位:计算前先将二者都转换为位或都转换为字节。使用 8 位 = 1 字节。典型的比特率以兆位每秒(Mbps)表示;文件大小可能以兆字节(MB)表示。
Time (s) = File size (bits) ÷ bit rate (bits per second)
时间(秒)= 文件大小(位)÷ 比特率(位/秒)
Example: A 100 MB file on a 50 Mbps connection. Convert file size to megabits: 100 MB = 100 × 8 = 800 Mb. Time = 800 Mb ÷ 50 Mbps = 16 seconds.
示例:一个 100 MB 的文件在 50 Mbps 的连接上下载。将文件大小转换为兆位:100 MB = 100 × 8 = 800 Mb。时间 = 800 Mb ÷ 50 Mbps = 16 秒。
8. Boolean Algebra Laws | 布尔代数定律
Boolean algebra uses only two values: 0 (False) and 1 (True). The fundamental laws help you simplify logic expressions, which is essential for circuit design and truth tables.
布尔代数仅使用两个值:0(假)和 1(真)。基本定律有助于化简逻辑表达式,这对电路设计和真值表至关重要。
- Identity Law: A + 0 = A, A · 1 = A
- 同一律: A + 0 = A, A · 1 = A
- Null Law: A + 1 = 1, A · 0 = 0
- 零一律: A + 1 = 1, A · 0 = 0
- Idempotent Law: A + A = A, A · A = A
- 幂等律: A + A = A, A · A = A
- Complement Law: A + ¬A = 1, A · ¬A = 0
- 互补律: A + ¬A = 1, A · ¬A = 0
- Double Negation: ¬(¬A) = A
- 双重否定律: ¬(¬A) = A
- Commutative Law: A + B = B + A, A · B = B · A
- 交换律: A + B = B + A, A · B = B · A
- Associative Law: (A + B) + C = A + (B + C), (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)
- 分配律: A · (B + C) = (A · B) + (A · C)
- Absorption Law: A + (A · B) = A, A · (A + B) = A
- 吸收律: A + (A · B) = A, A · (A + B) = A
9. De Morgan’s Theorems | 德摩根定理
De Morgan’s theorems are powerful tools for transforming logic expressions involving AND and OR gates with NOT gates. They allow you to convert between NAND and NOR equivalents.
德摩根定理是处理与、或、非门逻辑表达式转换的强大工具,可用于实现 NAND 和 NOR 之间的等价转换。
Theorem 1: ¬(A · B) = ¬A + ¬B
定理 1: ¬(A · B) = ¬A + ¬B
Theorem 2: ¬(A + B) = ¬A · ¬B
定理 2: ¬(A + B) = ¬A · ¬B
In words: the complement of a conjunction is the disjunction of the complements; the complement of a disjunction is the conjunction of the complements.
通俗表达:与运算的补等于各补的或;或运算的补等于各补的与。
10. Key Logic Gate Truth Tables | 核心逻辑门真值表
For the OCR exam you must be able to recall the truth tables for all basic gates: NOT, AND, OR, NAND, NOR, XOR. Here they are summarised.
OCR 考试要求你能够准确复述所有基本逻辑门的真值表:NOT(非)、AND(与)、OR(或)、NAND(与非)、NOR(或非)、XOR(异或)。现汇总如下。
| A | B | NOT A | A AND B | A OR B | A NAND B | A NOR B | A XOR B |
| 0 | 0 | 1 | 0 | 0 | 1 | 1 | 0 |
| 0 | 1 | 1 | 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 0 | 1 | 1 | 0 | 1 |
| 1 | 1 | 0 | 1 | 1 | 0 | 0 | 0 |
11. Data Compression Ratios | 数据压缩比
Compression ratio measures how much a file size has been reduced. It is expressed as the ratio of the uncompressed size to the compressed size, or as a percentage reduction.
压缩比用于衡量文件大小减少了多少,通常表示为未压缩大小与压缩后大小的比值,或减小的百分比。
Compression ratio = uncompressed file size ÷ compressed file size
压缩比 = 未压缩文件大小 ÷ 压缩后文件大小
Space saving (%) = ((uncompressed − compressed) ÷ uncompressed) × 100
空间节省率 (%) = ((未压缩 − 压缩)÷ 未压缩)× 100
Example: A 30 MB original file compresses to 6 MB. Ratio = 30 ÷ 6 = 5:1. Space saving = ((30 − 6) / 30) × 100 = 80%.
示例:一个 30 MB 的原始文件压缩为 6 MB。压缩比 = 30 ÷ 6 = 5:1。空间节省率 = ((30 − 6)/ 30)× 100 = 80%。
12. Binary Addition and Overflow | 二进制加法与溢出
Binary addition follows the same column-by-column rules as denary addition but in base-2. The basic rules are:
二进制加法与十进制加法一样逐列相加,只是采用基数为 2 的规则。基本规则如下:
| 0 + 0 = 0 | 0 + 1 = 1 | 1 + 0 = 1 | 1 + 1 = 0, carry 1 | 1 + 1 + 1 (carry) = 1, carry 1 |
| 0 + 0 = 0 | 0 + 1 = 1 | 1 + 0 = 1 | 1 + 1 = 0,进位 1 | 1 + 1 + 1(进位)= 1,进位 1 |
Overflow occurs when the result of an addition requires more bits than the register can hold. In an 8-bit system, if adding two positive numbers gives a result greater than 255₁₀ (11111111₂), the 9th carry bit is lost, causing an incorrect result. Overflow is detected when the carry into the most significant bit differs from the carry out.
当加法结果所需的位数超过寄存器所能容纳的位数时,就发生了溢出。在 8 位系统中,如果两个正数相加的结果大于 255₁₀(11111111₂),第 9 位进位会丢失,导致结果错误。当进入最高位的进位与出来的进位不同时,即可检测溢出。
Published by TutorHao | Computer Science Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)
屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导