Year 7 CCEA Computer Science: Formula and Theorem Quick Reference Guide | Year 7 CCEA 计算机:公式定理速查手册

📚 Year 7 CCEA Computer Science: Formula and Theorem Quick Reference Guide | Year 7 CCEA 计算机:公式定理速查手册

This quick reference guide brings together the essential formulas, number systems, Boolean laws, and calculation methods you will meet in the Year 7 CCEA Computer Science course. Keep it handy while working through binary conversions, logic circuits, and data representation tasks.

本速查手册汇集了 Year 7 CCEA 计算机课程中会遇到的基本公式、数制、布尔定律和计算方法。在做二进制转换、逻辑电路和数据表示练习时,随手查阅非常方便。


1. Binary and Decimal Number Systems | 二进制与十进制数制

All digital computers store and process data using the binary number system. Binary uses only two digits: 0 and 1. Each position in a binary number represents a power of 2, just as each position in decimal represents a power of 10.

所有数字计算机都使用二进制数制存储和处理数据。二进制只使用两个数字:0 和 1。二进制数中每个位置代表 2 的幂,就像十进制中每个位置代表 10 的幂一样。

A binary number is often written with a subscript 2 (e.g. 1011₂) and a decimal number with a subscript 10 (e.g. 11₁₀). The right‑most bit is the least significant bit (LSB) and the left‑most is the most significant bit (MSB).

二进制数常写作下标 2(如 1011₂),十进制数写作下标 10(如 11₁₀)。最右边的位是最低有效位(LSB),最左边的是最高有效位(MSB)。

Place values: … 2⁴ 2³ 2² 2¹ 2⁰ (16, 8, 4, 2, 1)

位权:… 2⁴ 2³ 2² 2¹ 2⁰ (16、8、4、2、1)


2. Converting Binary to Decimal | 二进制转十进制

To convert a binary number to decimal, multiply each bit by its place value (power of 2) and add the results.

要将二进制数转换为十进制,将每一位乘以其位权(2 的幂),再将结果相加。

Decimal value = Σ (bitᵢ × 2ⁱ)

十进制值 = Σ (位ᵢ × 2ⁱ)

Example: 1101₂ = (1 × 8) + (1 × 4) + (0 × 2) + (1 × 1) = 8 + 4 + 0 + 1 = 13₁₀.

示例:1101₂ = (1 × 8) + (1 × 4) + (0 × 2) + (1 × 1) = 8 + 4 + 0 + 1 = 13₁₀。


3. Converting Decimal to Binary | 十进制转二进制

To convert a decimal integer to binary, repeatedly divide the number by 2 and record the remainders. Read the remainders from the bottom upwards to get the binary equivalent.

要将十进制整数转换为二进制,反复将数字除以 2 并记录余数。从下往上读取余数,就得到对应的二进制数。

Example: Convert 19₁₀ to binary:

示例:将 19₁₀ 转换为二进制:

  • 19 ÷ 2 = 9 remainder 1
  • 9 ÷ 2 = 4 remainder 1
  • 4 ÷ 2 = 2 remainder 0
  • 2 ÷ 2 = 1 remainder 0
  • 1 ÷ 2 = 0 remainder 1

Reading upwards: 10011₂. So 19₁₀ = 10011₂.

从下往上读:10011₂。所以 19₁₀ = 10011₂。


4. Binary Arithmetic: Addition | 二进制算术:加法

Binary addition follows simple rules, very similar to decimal addition but only using 0s and 1s.

二进制加法遵循简单的规则,与十进制加法非常相似,但只用 0 和 1。

0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
1 + 1 = 0, carry 1 to the next column
1 + 1 + 1 = 1, carry 1

When a column adds up to 2, write 0 and carry 1. When a column adds up to 3, write 1 and carry 1.

当一列相加为 2 时,写下 0 并进位 1。当一列相加为 3 时,写下 1 并进位 1。

Example: 1011₂ + 0110₂ = 10001₂.

示例:1011₂ + 0110₂ = 10001₂。


5. Boolean Logic: AND, OR, NOT | 布尔逻辑:与、或、非

Boolean logic operates on true/false values, often represented as 1 (true) and 0 (false). The three fundamental operations are AND, OR, and NOT.

布尔逻辑处理真/假值,通常用 1(真)和 0(假)表示。三种基本运算是与、或、非。

  • AND (∧): output is 1 only if all inputs are 1.
  • AND (∧):只有所有输入都为 1 时,输出才为 1。
  • OR (∨): output is 1 if at least one input is 1.
  • OR (∨):只要至少有一个输入为 1,输出就为 1。
  • NOT (¬): flips the input; 1 becomes 0, 0 becomes 1.
  • NOT (¬):将输入取反;1 变成 0,0 变成 1。

These operations can be expressed using Boolean expressions like A AND B, A OR B, NOT A.

这些运算可以用布尔表达式表示,如 A AND B、A OR B、NOT A。


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

A truth table shows every possible input combination and the resulting output for a logic gate.

真值表显示逻辑门所有可能的输入组合及对应的输出。

AND gate (A ∧ B):

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

OR gate (A ∨ B):

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

NOT gate (¬A):

A Output
0 1
1 0

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

Boolean algebra has a set of laws that allow us to simplify expressions and design efficient logic circuits.

布尔代数有一组定律,可以让我们简化表达式并设计高效逻辑电路。

Commutative Law | 交换律

A ∧ B = B ∧ A    A ∨ B = B ∨ A

Associative Law | 结合律

(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)

De Morgan’s Theorems | 德摩根定理

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

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

These laws help turn complex AND/OR combinations into simpler forms using only NAND or NOR gates.

这些定律有助于将复杂的 AND/OR 组合转换为仅使用 NAND 或 NOR 门的更简单形式。


8. Data Storage Units | 数据存储单位

Computer storage is measured using a hierarchy of units based on the byte. A byte consists of 8 bits.

计算机存储使用基于字节的单位层级来衡量。一个字节由 8 个比特组成。

Unit Abbreviation Size in bytes
1 bit b 1/8 byte
1 byte B 1 byte
1 kilobyte KB 1,024 bytes
1 megabyte MB 1,024 KB = 1,048,576 bytes
1 gigabyte GB 1,024 MB
1 terabyte TB 1,024 GB

Remember: when converting between units, multiply or divide by 1,024, not 1,000.

请记住:在单位之间转换时,要乘以或除以 1,024,而不是 1,000。


9. Calculating Image File Size | 图像文件大小计算

An image file size depends on its dimensions (width and height in pixels) and the colour depth (bits per pixel).

图像文件的大小取决于其尺寸(以像素为单位的宽度和高度)以及颜色深度(每像素的比特数)。

Image file size (bytes) = (width in pixels × height in pixels × colour depth in bits) ÷ 8

图像文件大小(字节)= (宽(像素)× 高(像素)× 颜色深度(比特))÷ 8

Example: A 200 × 100 pixel image with a colour depth of 24 bits. Size = (200 × 100 × 24) ÷ 8 = 480,000 ÷ 8 = 60,000 bytes = 60 KB.

示例:一张 200×100 像素、颜色深度为 24 比特的图像。大小 = (200 × 100 × 24) ÷ 8 = 480,000 ÷ 8 = 60,000 字节 = 60 KB。


10. Sound File Size Estimation | 声音文件大小估算

Uncompressed sound file size is calculated from the sample rate, sample resolution (bit depth), number of channels, and duration.

未压缩声音文件的大小是根据采样率、采样精度(位深度)、声道数和持续时间计算的。

Sound file size (bytes) = sample rate (Hz) × bit depth × channels × time (seconds) ÷ 8

声音文件大小(字节)= 采样率(Hz)× 位深度 × 声道数 × 时间(秒)÷ 8

Example: 10 seconds of CD‑quality audio (44,100 Hz, 16‑bit, stereo): size = 44,100 × 16 × 2 × 10 ÷ 8 = 1,764,000 bytes ≈ 1.76 MB.

示例:10 秒 CD 质量音频(44,100 Hz、16 位、立体声):大小 = 44,100 × 16 × 2 × 10 ÷ 8 = 1,764,000 字节 ≈ 1.76 MB。


11. Data Transfer Time | 数据传输时间

To find how long it takes to transfer a file, divide the data size by the transfer rate. Keep units consistent (both in bits or both in bytes).

要计算传输文件所需的时间,用数据大小除以传输速率。保持单位一致(都用比特或都用字节)。

Transfer time (seconds) = file size (bits) ÷ transfer rate (bits per second)

传输时间(秒)= 文件大小(比特)÷ 传输速率(比特/秒)

If file size is given in bytes, multiply by 8 to convert to bits. Transfer rates are often expressed in bps (bits per second) or Mbps.

如果文件大小以字节给出,需乘以 8 转换为比特。传输速率通常以 bps(比特每秒)或 Mbps 表示。


12. Key Programming Operators | 关键编程运算符

Programming often uses mathematical, comparison, and logical operators. Understanding their symbols is essential for reading and writing code.

编程中经常使用算术、比较和逻辑运算符。理解它们的符号对读写代码至关重要。

Arithmetic operators | 算术运算符

  • + (addition / 加), – (subtraction / 减), * (multiplication / 乘), / (division / 除), MOD (remainder / 取余)
  • +(加)、-(减)、*(乘)、/(除)、MOD(取余数)

Comparison operators | 比较运算符

  • == (equal to / 等于), != or <> (not equal / 不等于), > (greater than / 大于), < (less than / 小于), >= (greater than or equal / 大于等于), <= (less than or equal / 小于等于)
  • ==(等于)、!= 或 <>(不等于)、>(大于)、<(小于)、>=(大于等于)、<=(小于等于)

Logical operators | 逻辑运算符

  • AND, OR, NOT – often used in conditions.
  • AND、OR、NOT – 常用于条件判断。

These operators form the basis of decisions and loops in programming.

这些运算符构成了编程中判断和循环的基础。


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