📚 SQA Year 9 Computing Formula & Theorem Quick Reference | SQA 九年级计算机公式定理速查手册
This quick reference handbook collects essential formulas, theorems and key calculations for the SQA Year 9 Computing course. It is designed to help you revise data representation, file size estimation, logic and networking. Use it alongside your class notes and practice questions to build confidence.
本速查手册汇总了SQA九年级计算机课程中重要的公式、定理和关键计算,旨在帮助你复习数据表示、文件大小估算、逻辑和网络等内容。请配合课堂笔记和练习题使用,以增强信心。
1. Binary Basics and Decimal Conversion | 二进制基础与十进制转换
ary number represents a power of 2, with the rightmost bit having a place value of 2⁰ = 1.
二进制是一种以2为基数的数字系统,只使用数字0和1。二进制数中每个位置代表2的幂,最右边的位权值为2⁰ = 1。
e results. For example, 1011₂ = 1×2³ + 0×2² + 1×2¹ + 1×2⁰ = 8 + 0 + 2 + 1 = 11 in decimal.
要将二进制数转换为十进制,将每一位乘以其对应的2的幂并求和。例如,1011₂ = 1×2³ + 0×2² + 1×2¹ + 1×2⁰ = 8 + 0 + 2 + 1 = 11(十进制)。
| Binary Digit | 1 | 0 | 1 | 1 |
|---|---|---|---|---|
| Place Value | 2³ = 8 | 2² = 4 | 2¹ = 2 | 2⁰ = 1 |
ce, 13 ÷ 2 = 6 remainder 1; 6 ÷ 2 = 3 remainder 0; 3 ÷ 2 = 1 remainder 1; 1 ÷ 2 = 0 remainder 1. The binary equivalent is 1101₂.
要将十进制整数转换为二进制,反复除以2并记录每次的余数。从下往上读取余数。例如,13 ÷ 2 = 6 余1;6 ÷ 2 = 3 余0;3 ÷ 2 = 1 余1;1 ÷ 2 = 0 余1。二进制结果为1101₂。
2. Hexadecimal Numbers | 十六进制数字
Hexadecimal (hex) is a base-16 number system that uses digits 0–9 and letters A– 11, C=12, D=13, E=14 and F=15. It provides a compact way to represent long binary strings.
十六进制是一种基数为16的数字系统,使用数字0–9和字母A–F,其中A=10、B=11、C=12、D=13、E=14、F=15。它为表示冗长的二进制串提供了一种紧凑的方式。
ary to hex, group the binary digits into sets of four from the right, then replace each group with its hex value. For instance, 10101111₂ becomes 1010 1111 → AF₁₆.
要将十六进制转换为十进制,将每一位数字乘以合适的16的幂。例如,2F₁₆ = 2×16¹ + 15×16⁰ = 32 + 15 = 47(十进制)。要将二进制转换为十六进制,从右往左将二进制位每四位一组分组,然后将每组替换为对应的十六进制值。例如,10101111₂ 分为 1010 1111 → AF₁₆。
3. Data Storage Units | 数据存储单位
Digital data is measured in bits (b) and bytes (B). One byte equals 8 bits. Larger units follow powers of 2, although some contexts use powers of 10 for simplicity. The key relationships you need to know are:
数字数据以位(bit,b)和字节(byte,B)为单位计量。一个字节等于8位。更大的单位遵循2的幂次换算,尽管有些场合为了简便使用10的幂次。你需要掌握的关键关系如下:
- 1 byte (B) = 8 bits (b)
- 1 kilobyte (KB) = 1024 bytes
- 1 megabyte (MB) = 1024 KB
- 1 gigabyte (GB) = 1024 MB
- 1 terabyte (TB) = 1024 GB
When calculating file sizes, always be careful to use the correct units and to divide or multiply by 8 when converting between bits and bytes.
在计算文件大小时,一定要注意使用正确的单位,并在位与字节之间转换时除以或乘以8。
4. Image File Size Calculation | 图像文件大小计算
The size of an uncompressed bitmap image depends on its width, height and colour depth (bit depth). The colour depth tells you how many bits are used to store the colour of one pixel. For example, a 24-bit image uses 24 bits per pixel.
未压缩的位图图像大小取决于其宽度、高度和色彩深度(位深度)。色彩深度告诉你存储一个像素的颜色用了多少位。例如,24位图像每个像素使用24位。
Image file size (bits) = width × height × bit depth
图像文件大小(位) = 宽度 × 高度 × 位深度
e with 24-bit colour uses 100 × 100 × 24 = 240 000 bits = 30 000 bytes (or about 29.3 KB).
要得到以字节为单位的大小,将结果除以8。例如,一幅100×100像素、24位色彩的图像使用 100 × 100 × 24 = 240 000 位 = 30 000 字节(约29.3 KB)。
5. Sound File Size Calculation | 声音文件大小计算
Uncompressed digital audio file size depends on the sample rate (in Hertz), the bit depth, the duration in seconds, and the number of channels (1 for mono, 2 for stereo).
未压缩的数字音频文件大小取决于采样率(以赫兹为单位)、位深度、时长(秒)以及声道数(单声道为1,立体声为2)。
Sound file size (bits) = sample rate × bit depth × duration (s) × number of channels
声音文件大小(位) = 采样率 × 位深度 × 时长(秒) × 声道数
require 44 100 × 16 × 30 × 2 = 42 336 000 bits = 5 292 000 bytes (approximately 5.05 MB).
转换为字节需除以8。举个例子,一段30秒、44 100 Hz、16位的立体声录音需要 44 100 × 16 × 30 × 2 = 42 336 000 位 = 5 292 000 字节(约5.05 MB)。
6. Logic Gates and Truth Tables | 逻辑门与真值表
Logic gates are the building blocks of digital circuits. The most fundamental gates are AND, OR and NOT. Their behaviour is summarised in truth tables, where 1 represents TRUE and 0 represents FALSE.
逻辑门是数字电路的构建模块。最基本的门有与门(AND)、或门(OR)和非门(NOT)。它们的行为可以用真值表总结,其中1代表真(TRUE),0代表假(FALSE)。
AND gate: Output is 1 only when all inputs are 1. Symbol: A ∧ B.
与门:仅当所有输入都为1时输出才为1。符号:A ∧ B。
| A | B | A ∧ B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
OR gate: Output is 1 if at least one input is 1. Symbol: A ∨ B.
或门:如果至少有一个输入为1,输出即为1。符号:A ∨ B。
| A | B | A ∨ B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
NOT gate: Inverts the input. Symbol: ¬A or A'.
非门:反转输入。符号:¬A 或 A'。
| A | ¬A |
|---|---|
| 0 | 1 |
| 1 | 0 |
Combining these gates gives rise to NAND and NOR, which are simply AND followed by NOT, and OR followed by NOT, respectively.
将这些门组合起来就得到了与非门(NAND)和或非门(NOR),它们分别是在与门和或门之后接一个非门。
7. Boolean Algebra Theorems | 布尔代数定理
Boolean algebra provides a set of rules for simplifying logic expressions. These theorems are essential for designing and optimising digital circuits. Below are the key identities, where A can be 0 or 1.
布尔代数提供了一套简化逻辑表达式的规则。这些定理对于设计和优化数字电路至关重要。以下是关键恒等式,其中A可以是0或1。
- Identity: A + 0 = A, A · 1 = A (与0进行或运算、与1进行与运算仍为A)
- Annulment: A + 1 = 1, A · 0 = 0 (消去律)
- Idempotent: A + A = A, A · A = A (幂等律)
- Complement: A + ¬A = 1, A · ¬A = 0 (互补律)
- Double negation: ¬(¬A) = A (双重否定)
- Commutative: A + B = B + A, A · B = B · A (交换律)
- Associative: (A + B) + C = A + (B + C), (A · B) · C = A · (B · C) (结合律)
- Distributive: A · (B + C) = (A · B) + (A · C), A + (B · C) = (A + B) · (A + C) (分配律)
- Absorption: A + (A · B) = A, A · (A + B) = A (吸收律)
Memorising these laws helps you simplify complex Boolean expressions step by step, just as you simplify algebraic expressions in mathematics.
熟记这些定律有助于你逐步简化复杂的布尔表达式,就像在数学中简化代数表达式一样。
8. De Morgan's Laws | 德摩根定律
De Morgan's laws are two transformation rules that relate the AND and OR operators through negation. They are extremely useful for converting circuits and simplifying logic.
德摩根定律是两条通过取反操作将AND与OR运算符联系起来的转换规则。它们对于转换电路和简化逻辑极为有用。
First law: ¬(A ∧ B) = ¬A ∨ ¬B
第一定律:¬(A ∧ B) = ¬A ∨ ¬B
Second law: ¬(A ∨ B) = ¬A ∧ ¬B
第二定律:¬(A ∨ B) = ¬A ∧ ¬B
In words, the negation of an AND is the OR of the negations, and the negation of an OR is the AND of the negations. For example, if you have the expression ¬(A · B) you can replace it with ¬A + ¬B, which often uses one fewer gate in a circuit.
用文字表述就是:与运算的取反等于各个输入取反后的或运算;或运算的取反等于各个输入取反后的与运算。例如,如果你有表达式 ¬(A · B),可以将其替换为 ¬A + ¬B,这在电路中常常能少用一个门。
9. Network Transfer Time | 网络传输时间
When transferring data across a network, the time required depends on the size of the data and the bandwidth (transmission speed) of the link. The basic formula is:
通过网络传输数据时,所需时间取决于数据量和链路的带宽(传输速度)。基本公式为:
Transfer time (seconds) = Data size (bits) ÷ Bandwidth (bps)
