Year 7 CAIE Computer Science: Formulas & Theorems Quick Reference | Year 7 CAIE 计算机:公式定理速查手册

📚 Year 7 CAIE Computer Science: Formulas & Theorems Quick Reference | Year 7 CAIE 计算机:公式定理速查手册

This handbook gathers the essential formulas, conversion methods, and Boolean theorems you need for Year 7 CAIE Computer Science. Use it to revise binary arithmetic, data size calculations, logic gate truth tables, and key computing rules.

本手册汇集了 Year 7 CAIE 计算机科学所需的重要公式、转换方法和布尔定理。你可以用它来复习二进制运算、数据大小计算、逻辑门真值表以及关键的计算规则。


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

Every binary digit (bit) holds a place value that is a power of 2, with the rightmost bit representing 2⁰. Multiply each bit by its place value and sum the results to obtain the denary (decimal) equivalent.

每个二进制位(bit)都对应一个2的幂次位值,最右边的位代表2⁰。将每个位与其位值相乘,再求和,即可得到对应的十进制数值。

Denary = Σ (bitₖ × 2ᵏ), where k starts at 0 from the right

十进制数 = Σ (位ₖ × 2ᵏ),其中 k 从最右侧的 0 开始

For example, convert 1011₂: (1 × 2³) + (0 × 2²) + (1 × 2¹) + (1 × 2⁰) = 8 + 0 + 2 + 1 = 11 in denary.

例如,将 1011₂ 转换为十进制:(1×2³) + (0×2²) + (1×2¹) + (1×2⁰) = 8 + 0 + 2 + 1 = 11。


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

Repeatedly divide the denary number by 2, recording the remainder each time. Continue until the quotient is 0. The binary number is the remainders read from bottom to top.

反复将十进制数除以2,每次记录余数。直到商为0时停止。从下往上读取余数即可得到二进制数。

Example: convert 13 to binary. 13 ÷ 2 = 6 r1; 6 ÷ 2 = 3 r0; 3 ÷ 2 = 1 r1; 1 ÷ 2 = 0 r1. Remainders from last to first give 1101₂.

示例:将13转换为二进制。13 ÷ 2 = 6 余1;6 ÷ 2 = 3 余0;3 ÷ 2 = 1 余1;1 ÷ 2 = 0 余1。从下往上的余数序列为 1101₂。


3. Data Storage Units and Conversions | 数据存储单位与转换

Computer storage is measured in bits and bytes. Larger units are powers of 1024 (2¹⁰) rather than 1000. Memorising these relationships helps you estimate file sizes and memory requirements.

计算机存储以位和字节为基本单位。更大的单位基于1024(2¹⁰)而非1000。记住这些换算关系有助于你估算文件大小和内存需求。

Unit Abbreviation Equivalent in bytes
bit b 1/8 byte
byte B 8 bits
kilobyte KB 1024 B
megabyte MB 1024 KB = 1 048 576 B
gigabyte GB 1024 MB
terabyte TB 1024 GB

bytes = given value × 1024(steps up) ; ÷ 1024 when moving to a larger unit

向上换算时字节数 = 给定值 × 1024 的幂次;转换为更大单位时除以 1024


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

Plain text files store each character as a fixed number of bytes depending on the encoding. The total size is simply the number of characters multiplied by the bytes per character.

纯文本文件根据编码方式为每个字符分配固定字节数。总大小就是字符数乘以每个字符的字节数。

Text file size (bytes) = Number of characters × Bytes per character

文本文件大小(字节)= 字符数 × 每个字符的字节数

  • ASCII uses 1 byte per character (typical for English).

    ASCII 编码通常每个字符占用 1 个字节。

  • Unicode (UTF‑16) often uses 2 bytes per character for many scripts.

    Unicode(UTF‑16)在许多文字系统中每个字符占用 2 个字节。

Example: a document with 500 ASCII characters = 500 × 1 = 500 bytes.

示例:一份包含 500 个 ASCII 字符的文档大小 = 500 × 1 = 500 字节。


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

Bitmap images are made of pixels. The file size depends on the resolution (width × height) and the colour depth (bits per pixel). No compression is assumed in this raw calculation.

位图图像由像素组成。文件大小取决于分辨率(宽×高)和色深(每像素位数)。此原始计算不考虑压缩。

Image size (bits) = Width (pixels) × Height (pixels) × Colour depth (bits per pixel)

图像大小(位)= 宽度(像素)× 高度(像素)× 色深(每像素位数)

To convert to bytes, divide by 8. To convert to KB or MB, continue dividing by 1024 as needed.

转换为字节需除以8;如需转换为KB或MB,再依次除以1024。

Example: a 640 × 480 photo with 24‑bit colour uses 640 × 480 × 24 = 7 372 800 bits = 921 600 bytes ≈ 900 KB.

示例:一张 640×480、24 位色彩的相片大小 = 640×480×24 = 7 372 800 位 = 921 600 字节 ≈ 900 KB。


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

Digital sound is captured by taking samples of the audio wave. The file size is determined by the sample rate, bit depth, duration, and the number of channels.

数字声音通过采样音频波形得到。文件大小由采样率、采样位数、时长和声道数共同决定。

Sound size (bits) = Sample rate (Hz) × Bit depth × Duration (seconds) × Number of channels

声音大小(位)= 采样率(Hz)× 采样位数 × 时长(秒)× 声道数

For CD‑quality stereo (44 100 Hz, 16‑bit, 2 channels), 1 minute of audio requires: 44 100 × 16 × 60 × 2 = 84 672 000 bits ≈ 10.09 MB.

以 CD 质量立体声(44 100 Hz,16 位,2声道)为例,1 分钟音频所需空间:44 100 × 16 × 60 × 2 = 84 672 000 位 ≈ 10.09 MB。


7. Logic Gates: AND, OR, NOT | 逻辑门:与门、或门、非门

Logic gates are the building blocks of digital circuits. Each gate performs a Boolean function on one or more inputs and produces a single output.

逻辑门是数字电路的基本构建模块。每个逻辑门对一个或多个输入执行布尔运算,并产生一个输出。

  • AND gate: output is 1 only if all inputs are 1.

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

  • OR gate: output is 1 if at least one input is 1.

    或门:只要至少有一个输入为1,输出即为1。

  • NOT gate: inverts a single input (1 becomes 0, 0 becomes 1).

    非门:将单一输入取反(1变0,0变1)。


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

Truth tables show every possible input combination and the resulting output. They help verify the behaviour of combinational circuits.

真值表列出了所有可能的输入组合及其对应的输出,有助于验证组合逻辑电路的行为。

AND truth table | 与门真值表

Input A Input B Output
0 0 0
0 1 0
1 0 0
1 1 1

OR truth table | 或门真值表

Input A Input B Output
0 0 0
0 1 1
1 0 1
1 1 1

NOT truth table | 非门真值表

Input Output
0 1
1 0

9. Boolean Algebra Laws | 布尔代数定律

Boolean algebra simplifies logic expressions. The following laws hold for variables A, B, and C that can be 0 or 1.

布尔代数可以简化逻辑表达式。对于可取0或1的变量A、B和C,下列定律始终成立。

Commutative Law | 交换律
A AND B = B AND A
A OR B = B OR A

Associative Law | 结合律
(A AND B) AND C = A AND (B AND C)
(A OR B) OR C = A OR (B OR C)

Distributive Law | 分配律
A AND (B OR C) = (A AND B) OR (A AND C)
A OR (B AND C) = (A OR B) AND (A OR C)

Identity Law | 同一律
A AND 1 = A
A OR 0 = A

Complement Law | 互补律
A AND (NOT A) = 0
A OR (NOT A) = 1

Idempotent Law | 幂等律
A AND A = A
A OR A = A

These laws are used to design and minimise digital circuits.

这些定律用于设计和简化数字电路。


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

When sending a file over a network, the transfer time depends on the data size and the bandwidth (bit rate). Make sure both quantities use the same unit (bits or bytes).

通过网络发送文件时,传输时间取决于数据大小和带宽(比特率)。请确保两个量使用相同单位(均为位或均为字节)。

Time (seconds) = Data size (bits) ÷ Transfer rate (bits per second, bps)

时间(秒)= 数据大小(位) ÷ 传输速率(位/秒,bps)

If the rate is given in bytes per second, convert the data size to bytes first. Example: sending 8 Mbit over a 2 Mbps line takes 8 Mb ÷ 2 Mbps = 4 seconds.

如果速率以字节/秒给出,先将数据大小转换为字节。示例:在2 Mbps线路上发送8 Mbit数据需要 8 Mb ÷ 2 Mbps = 4 秒。


11. Compression Ratio | 压缩比

Compression reduces file size. The compression ratio compares the original size to the compressed size, indicating how much space is saved.

压缩能够减小文件体积。压缩比将原始大小与压缩后大小进行比较,反映出节省了多少空间。

Compression ratio = Uncompressed size ÷ Compressed size

压缩比 = 未压缩大小 ÷ 压缩后大小

A ratio of 4:1 means the original file was four times larger than the compressed version. Use the same unit (e.g., bytes) for both sizes.

压缩比为4:1意味着原始文件是压缩后文件的4倍。计算时

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