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

Formula & Theorem Quick Reference Handbook | 公式定理速查手册

2026-07-19 13:53 · 本文部分内容由AI辅助创作

📚 Formula & Theorem Quick Reference Handbook | 公式定理速查手册

This handbook provides a concise reference to essential formulas and theorems in the Year 9 CAIE Computer Science curriculum. It covers data representation, calculations, logic, and algorithms to help you revise efficiently.

本手册为Year 9 CAIE计算机科学课程中重要的公式和定理提供简明速查。内容涵盖数据表示、计算、逻辑和算法,帮助您高效复习。


1. Binary to Denary Conversion | 二进制转十进制

To convert a binary number to denary (decimal), multiply each binary digit (bit) by 2 raised to the power of its position, starting from 0 on the right. Then sum all the results.

将二进制数转换为十进制时,将每一位二进制数字乘以2的相应位权(从右起从0开始),然后将所有结果相加。

Example: 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₁₀

Denary = Σ (bit × 2^position)


2. Denary to Binary Conversion | 十进制转二进制

Divide the denary number by 2 repeatedly, recording the remainder each time. Read the remainders from bottom to top to obtain the binary equivalent.

将十进制数反复除以2,记录每次的余数。从下往上读取余数,即得到对应的二进制数。

o binary. 13÷2=6 r1, 6÷2=3 r0, 3÷2=1 r1, 1÷2=0 r1. Reading remainders upwards gives 1101₂.

示例:将13₁₀转换为二进制。13÷2=6余1,6÷2=3余0,3÷2=1余1,1÷2=0余1。从下往上读余数得到1101₂。


3. Hexadecimal System | 十六进制系统

re A=10, B=11, C=12, D=13, E=14, F=15. Each hex digit represents a group of 4 binary bits.

十六进制(基数为16)使用数字0-9和字母A-F,其中A=10,B=11,C=12,D=13,E=14,F=15。每个十六进制位代表4位二进制数。

ht, then convert each group. To convert hex to denary, multiply each digit by 16^position.

将二进制转十六进制时,从右开始将二进制数每4位一组分开,然后将每组转换。将十六进制转十进制时,每位数字乘以16的位权。

Denary = (dₙ × 16ⁿ⁻¹) + ... + (d₁ × 16¹) + (d₀ × 16⁰)


4. Data Units | 数据单位

Digital storage is measured in bits and bytes. A byte is 8 bits. Larger units are often based on powers of 2 (binary multiples) in computing contexts.

数字存储以位和字节度量。一个字节等于8位。在计算机领域中,更大的单位通常基于2的幂(二进制倍数)。

UnitAbbreviationEquivalent in Bytes
KilobyteKB1 KB = 1024 B
MegabyteMB1 MB = 1024 KB
GigabyteGB1 GB = 1024 MB
TerabyteTB1 TB = 1024 GB

1000 B for storage media; the binary prefixes KiB, MiB, GiB clarify the 1024-based units.

有时制造商在存储介质中使用1 KB = 1000 B;二进制前缀 KiB、MiB、GiB 则明确了基于1024的单位。


5. Text File Size Calculation | 文本文件大小计算

The size of a plain text file depends on the number of characters and the bits used per character. Common encodings are ASCII (7 bits or 8 bits per character) and Unicode (16 bits or variable).

纯文本文件的大小取决于字符数和每个字符使用的位数。常见编码有ASCII(每字符7位或8位)和Unicode(16位或可变长度)。

Text File Size (bits) = Number of Characters × Bits per Character

characters using 8-bit ASCII requires 500 × 8 = 4000 bits, which is 4000 ÷ 8 = 500 bytes.

示例:一个包含500个字符并使用8位ASCII的文件需要500 × 8 = 4000位,即4000 ÷ 8 = 500字节。


6. Image File Size Calculation | 图像文件大小计算

A bitmap image' els) and colour depth (bits per pixel). File formats may apply compression to reduce size.

位图图像的原始文件大小由其分辨率(宽度×高度,以像素为单位)和颜色深度(每像素位数)决定。文件格式可能通过压缩减小体积。

Image Size (bytes) = (Width × Height × Colour Depth) / 8

0×600 pixels with 24-bit colour requires (800 × 600 × 24) / 8 = 1,440,000 bytes ≈ 1.37 MB.

示例:一幅800×600像素、24位色彩的图像需要 (800 × 600 × 24) / 8 = 1,440,000字节 ≈ 1.37 MB。


7. Sound File Size Calculation | 声音文件大小计算

Uncompressed audio file size is calculated from sample rate, sample resolution (bit depth), duration, and number of channels. Higher values give better quality but larger files.

未压缩的音频文件大小根据采样率、采样分辨率(位深)、时长和声道数计算。值越高音质越好,但文件也越大。

Sound Size (bits) = Sample Rate × Sample Resolution × Duration (s) × Channels

stereo, 60 seconds): 44100 × 16 × 60 × 2 = 84,672,000 bits = 10,584,000 bytes ≈ 10.09 MB.

示例:CD音质音频(44.1 kHz、16位、立体声、60秒):44100 × 16 × 60 × 2 = 84,672,000位 = 10,584,000字节 ≈ 10.09 MB。


广告 / Sponsored

8. Logic Gates Truth Tables | 逻辑门真值表

Logic gates are the building blocks of digital circuits. The basic gates are AND, OR, and NOT. Their outputs depend solely on the inputs according to truth tables.

逻辑门是数字电路的构建模块。基本门有与门、或门和非门。它们的输出完全由输入根据真值表决定。

AND Gate: Output is 1 only when all inputs are 1.

与门:仅当所有输入为1时输出为1。

ABA AND B
000
010
100
111

OR Gate: Output is 1 if at least one input is 1.

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

ABA OR B
000
011
101
111

NOT Gate: Inverts the input; output is opposite of input.

非门:反转输入;输出与输入相反。

ANOT A
01
10

9. Boolean Algebra Theorems | 布尔代数定理

Boolean algebra is used to simplify logic expressions. Two essential theorems are De Morgan's Laws, which show the relationship between AND, OR, and NOT.

布尔代数用于简化逻辑表达式。两个基本定理是德摩根定律,它们展示了与、或和非之间的关系。

¬(A ∧ B) = ¬A ∨ ¬B

NOT (A AND B) = (NOT A) OR (NOT B)

¬(A ∨ B) = ¬A ∧ ¬B

NOT (A OR B) = (NOT A) AND (NOT B)

Other useful identities include double negation (¬(¬A) = A) and absorption (A ∧ (A ∨ B) = A).

其他有用的恒等式包括双重否定 (¬(¬A) = A) 和吸收律 (A ∧ (A ∨ B) = A)。


10. Basic Binary Arithmetic | 基本二进制算术

h a carry of 1 to the next column. Overflow occurs when the result exceeds the available number of bits.

二进制加法遵循简单规则:0+0=0,0+1=1,1+0=1,1+1=0并向下一列进位1。当结果超出可用位数时会发生溢出。

(11). The rightmost column: 0+1=1. Next: 1+0=1. Next: 1+1=0 carry 1. Next: 0+0+carry1 = 1.

示例:将0110₂ (6) 和0101₂ (5) 相加得到1011₂ (11)。最右列:0+1=1。下一列:1+0=1。再下一列:1+1=0进1。再下一列:0+0+进位1=1。

Binary subtraction often uses two's complement. To find the two's complement of a binary number, invert all bits (one's complement) and add 1.

二进制减法通常使用补码。求一个二进制数的二进制补码时,将所有位取反(反码)再加1。


11. Linear Search vs Binary Search | 线性搜索与二分搜索

A linear search checks each element of a list in order. Its worst-case number of comparisons is n items. A binary search works on a sorted list by repeatedly dividing the search interval in half. Its maximum comparisons is about log₂n.

线性搜索按顺序检查列表中的每个元素。其最坏情况下的比较次数为n个项目。二分搜索适用于已排序的列表,通过反复将搜索间隔减半来工作。其最大比较次数约为 log₂n。

Linear Search Max Comparisons = n

Binary Search Max Comparisons ≈ ⌈log₂ n⌉

of 1024 items, linear search may need 1024 comparisons, while binary search needs at most ⌈log₂ 1024⌉ = 10 comparisons.

示例:对于一个包含1024个项目的已排序列表,线性搜索可能需要1024次比较,而二分搜索最多需要 ⌈log₂ 1024⌉ = 10 次比较。


12. Error Checking – Parity | 错误检查 – 奇偶校验

Parity is a simple error detection method. A parity bit is added to a binary string so that the total number of 1s is either even (even parity) or odd (odd parity).

奇偶校验是一种简单的错误检测方法。在二进制串中添加一个校验位,使1的总数为偶数(偶校验)或奇数(奇校验)。

If a byte is 1011001 and even parity is used, count the 1s: there are four. Since four is even, the parity bit is 0, maintaining even count. For odd parity, the parity bit would be 1 to make five 1s.

如果一个字节为1011001并采用偶校验,1的个数为4。因为4是偶数,校验位设为0,保持偶数个1。对于奇校验,校验位则应为1,使1的个数变为5。

ty bit = (sum of bits) mod 2 (for even parity, match existing sum; for odd parity, invert)

Parity can detect a single-bit error but cannot correct it or detect two-bit errors.

奇偶校验可检测单个位错误,但无法纠正,也无法检测双位错误。


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

广告 / Sponsored
现货 Cambridge International AS & ALevel IT Coursebook剑桥国际IGC…
计算机 备考教辅 · 正版现货 · 与本文内容相关
查看详情 / View on Taobao参考价 ¥467.0

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

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