📚 Year 9 OCR Computer Science: Formula & Theorem Quick Reference Handbook | Year 9 OCR 计算机:公式定理速查手册
This handbook brings together the essential formulas, theorems and quick reference tables you’ll need for the Year 9 OCR Computer Science course. Keep it handy when revising data representation, Boolean logic, storage calculations and algorithm efficiency. Each section presents the key idea in English first, then in Chinese, so you can study fluently in both languages.
本手册汇总了 Year 9 OCR 计算机科学课程中你必须掌握的重要公式、定理和速查表。在复习数据表示、布尔逻辑、存储计算和算法效率时可以随时翻阅。每一节都先用英文讲解核心点,再用中文对应,方便你流畅地进行双语学习。
1. Denary to Binary Conversion (Whole Numbers) | 十进制整数转二进制
To convert a denary number into binary, repeatedly divide the number by 2 and record the remainders. Read the remainders from bottom to top.
将十进制数转换为二进制,需要不断将该数除以2并记录余数,然后从下往上读出余数序列。
denary → binary: divide by 2, collect remainders, read backwards
十进制 → 二进制:除以 2,收集余数,逆序读取
Example: 13 in denary → 1101 in binary (1×8 + 1×4 + 0×2 + 1×1)
示例:十进制 13 → 二进制 1101(1×8 + 1×4 + 0×2 + 1×1)
2. Binary to Denary Conversion | 二进制转十进制
by its place value (powers of 2) and sum the results. The rightmost bit has value 2⁰ = 1.
将每一位二进制数字乘以其位权(2的幂)并求和。最右边的位权为 2⁰ = 1。
denary = Σ (bit × 2position)
十进制 = Σ (位 × 2位置)
For 1011₂: (1×2³)+(0×2²)+(1×2¹)+(1×2⁰)= 8+0+2+1 = 11
对于 1011₂:(1×2³)+(0×2²)+(1×2¹)+(1×2⁰)= 8+0+2+1 = 11
3. Binary Addition | 二进制加法
l addition, but use binary rules: 0+0=0, 0+1=1, 1+0=1, 1+1=0 (carry 1), 1+1+1=1 (carry 1).
采用与十进制加法相同的列式方法,但遵循二进制规则:0+0=0,0+1=1,1+0=1,1+1=0(进位1),1+1+1=1(进位1)。
Binary addition rules: 0+0=0; 0+1=1; 1+0=1; 1+1=10 (carry 1); 1+1+1=11 (carry 1)
二进制加法规则:0+0=0;0+1=1;1+0=1;1+1=10(进位1);1+1+1=11(进位1)
| 1+1 = 0 carry 1 | 1 + 1 = 0 进 1 |
| 1+1+1 = 1 carry 1 | 1 + 1 + 1 = 1 进 1 |
4. Binary Shifts | 二进制移位
A left shift of one place multiplies the number by 2; a right shift of one place divides the number by 2 (integer division). Gaps are filled with zeros.
左移一位相当于原数乘以2;右移一位相当于原数除以2(整数除法)。空位补零。
Left shift: value × 2ⁿ Right shift: value ÷ 2ⁿ (integer)
左移:值 × 2ⁿ 右移:值 ÷ 2ⁿ(整数)
0011₂ (3) left shift 1 → 0110₂ (6)
0011₂ (3) 左移 1 位 → 0110₂ (6)
5. Hexadecimal ↔ Denary ↔ Binary | 十六进制 ↔ 十进制 ↔ 二进制
Hexadecimal uses digits 0–9 and letters A–F (A=10, B=11, … it represents four bits. Convert denary to hex by dividing by 16 and recording remainders.
十六进制使用数字 0–9 和字母 A–F(A=10, B=11, …, F=15)。一个十六进制位代表四个二进制位。将十进制转换为十六进制需除以16并记录余数。
Hex: 0 1 2 3 4 5 6 7 8 9 A B C D E F
十六进制:0 1 2 3 4 5 6 7 8 9 A B C D E F
Example: 42 denary → 2×16 + 10 (A) → 2A₁₆
示例:十进制 42 → 2×16 + 10 (A) → 2A₁₆
| Hex digit: 4-bit binary | 十六进制位:4位二进制 |
| F₁₆ = 1111₂ | F₁₆ = 1111₂ |
6. Units of Data Storage | 数据存储单位
Data sizes follow powers of 2. Learn the terms and their exact values.
数据大小遵循2的幂次。记住这些术语及其精确值。
1 kB = 2¹⁰ bytes = 1024 B 1 MB = 2²⁰ bytes
1 kB = 2¹⁰ 字节 = 1024 B 1 MB = 2²⁰ 字节
| Bit | 0 or 1 |
| Byte | 8 bits |
| Kilobyte (kB) | 1024 bytes |
| Megabyte (MB) | 1024 kB ≈ 10⁶ bytes |
| Gigabyte (GB) | 1024 MB |
7. Image File Size | 图像文件大小
Image file size depends on the number of pixels (resolution) and the colour depth (bits per pixel). Use the formula to calculate an uncompressed image size.
图像文件大小取决于像素数量(分辨率)和颜色深度(每像素位数)。使用下面的公式计算未压缩图像大小。
Image size (bits) = width × height × colour depth
图像大小(位)= 宽度 × 高度 × 颜色深度
Example: 600×400 pixels, 24-bit colour → 600×400×24 = 5,760,000 bits
示例:600×400 像素,24 位颜色 → 600×400×24 = 5,760,000 位
Convert to bytes: divide by 8. Then to kB: divide by 1024.
转换为字节:除以8;再转换为kB:除以1024。
8. Sound File Size | 声音文件大小
Sound file size is determined by sample rate, sample resolution (bit depth), duration and number of channels. The formula gives the size in bits for uncompressed audio.
声音文件大小由采样率、采样分辨率(位深度)、时长以及声道数决定。该公式计算未压缩音频的大小(以位为单位)。
Sound size (bits) = sample rate × resolution × duration × channels
声音大小(位)= 采样率 × 分辨率 × 时长 × 声道数
Example: 44,100 Hz, 16 bits, 60 seconds, stereo (2) → 44100×16×60×2 = 84,672,000 bits
示例:44100 Hz,16 位,60 秒,立体声 (2) → 44100×16×60×2 = 84,672,000 位
9. Boolean Logic – NOT, AND, OR | 布尔逻辑 – 非、与、或
Boolean algebra works on TRUE (1) and FALSE (0). Learn the truth tables for the fundamental gates.
布尔代数基于真 (1) 和假 (0)。记住基本逻辑门的真值表。
NOT gate (inverter)
非门(反相器)
| Input A | Output NOT A |
| 0 | 1 |
| 1 | 0 |
AND gate
与门
| A | B | A AND B |
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
OR gate
或门
| A | B | A OR B |
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
10. Logic Circuit Expressions | 逻辑电路表达式
e notation: Q = NOT A, Q = A AND B, Q = A OR B. A bar over a variable also represents NOT.
组合逻辑门可以写出布尔表达式。常用记法:Q = NOT A,Q = A AND B,Q = A OR B。变量上方加横线也表示非运算。
Q = (A AND B) OR (NOT C) → read the circuit from left to right
Q = (A AND B) OR (NOT C) → 从左到右阅读电路
Order of operations: brackets, NOT, AND, OR.
运算顺序:括号、非、与、或。
11. Algorithm Efficiency – Comparing Searches | 算法效率 – 搜索算法比较
Two common search algorithms are linear search and binary search. Their worst-case number of comparisons is expressed as a function of n (number of items).
两种常见的搜索算法是线性搜索和二分查找。它们在最坏情况下的比较次数用 n(元素个数)的函数表示。
Linear search: worst case = n comparisons
线性搜索:最坏情况 = n 次比较
Binary search: worst case ≈ log₂(n) comparisons (array must be sorted)
二分查找:最坏情况 ≈ log₂(n) 次比较(数组必须有序)
r n=1024, binary search needs at most 10 comparisons, while linear search might need 1024.
当 n=1024 时,二分查找最多需要10次比较,而线性搜索可能需要1024次。
12. Sorting Algorithm Quick Checks | 排序算法速查
Bubble sort repeatedly compares and swaps adjacent items. In each pass, the largest unsorted element 'bubbles' to the end. It always completes in about n² comparisons.
冒泡排序反复比较并交换相邻项。每一轮中,最大的未排序元素会“冒泡”到最后。其比较次数大致为 n²。
Bubble sort passes: n-1; maximum swaps per pass decreases.
冒泡排序轮数:n-1;每轮最大交换次数递减。
Merge sort uses a divide-and-conquer approach, splitting the list into halves repeatedly. Its efficiency is O(n log n), much faster for large data sets.
归并排序采用分治法,反复将列表分成两半。其效率为 O(n log n),处理大数据集时快得多。
Published by TutorHao | Computer Science Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)

或截图后用「扫一扫 → 相册」选择本图