AS WJEC Computer Science: Formula and Theorem Quick Reference Handbook | AS WJEC计算机科学:公式定理速查手册

📚 AS WJEC Computer Science: Formula and Theorem Quick Reference Handbook | AS WJEC计算机科学:公式定理速查手册

This quick reference handbook summarises the key formulas, theorems, and calculations required for the AS WJEC Computer Science specification. Whether you are revising for an exam or consolidating your understanding, each section presents the essential knowledge in a concise, bilingual format. Keep this guide handy for rapid recall of data storage conversions, file size calculations, Boolean algebra laws, encryption ciphers, error detection techniques, and algorithm efficiency measures.

本速查手册总结了 AS WJEC 计算机科学课程所需的关键公式、定理和计算方法。无论你是为了备考复习,还是巩固理解,每个部分都以简洁的中英双语形式呈现必要知识。随身携带本指南,以便快速回忆数据存储换算、文件大小计算、布尔代数定律、加密密码、错误检测技术以及算法效率度量。


1. Data Storage Units and Conversions | 数据存储单位与换算

All data in a computer is stored using binary digits (bits). A group of 8 bits forms a byte, and larger units are based on powers of 2. The table below shows the common units, their symbols, and how they relate to bytes using the binary system (where 1 KB = 1024 bytes).

Unit Symbol Equivalent in bytes Power of 2
Bit b 1/8 byte
Nibble 4 bits (1/2 byte)
Byte B 1 byte 2⁰
Kilobyte KB 1,024 bytes 2¹⁰
Megabyte MB 1,024 KB = 1,048,576 bytes 2²⁰
Gigabyte GB 1,024 MB 2³⁰
Terabyte TB 1,024 GB 2⁴⁰
Petabyte PB 1,024 TB 2⁵⁰

计算机中的所有数据都以二进制数字(比特)存储。8 个比特组成一个字节,更大的单位基于 2 的幂次。下表显示了常用单位、其符号以及它们与字节的二进制关系(其中 1 KB = 1024 字节)。

Number of bits = Number of bytes × 8

To convert between any two units, multiply or divide by 1024 repeatedly.

要在任意两个单位之间转换,反复乘以或除以 1024 即可。


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

The size of an uncompressed audio file depends on the sample rate, sample resolution (bit depth), number of channels, and duration. The basic formula in bits is:

Sound file size (bits) = Sample rate (Hz) × Sample resolution (bits) × Number of channels × Length (seconds)

To express the size in bytes, divide the result by 8. For example, a 44,100 Hz, 16-bit, stereo (2-channel) recording of 10 seconds requires:

44,100 × 16 × 2 × 10 = 14,112,000 bits = 1,764,000 bytes ≈ 1.68 MB

无压缩音频文件的大小取决于采样率、采样分辨率(比特深度)、声道数和时长。以比特为单位的计算公式为:

声音文件大小(比特) = 采样率(Hz) × 采样分辨率(比特) × 声道数 × 时长(秒)

若以字节表示,将结果除以 8。例如,一段 44,100 Hz、16 比特、立体声(2 声道)、时长 10 秒的录音需要:

44,100 × 16 × 2 × 10 = 14,112,000 比特 = 1,764,000 字节 ≈ 1.68 MB


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

A bitmap image’s file size is determined by its resolution (width × height in pixels) and colour depth (bits per pixel). The raw file size in bits is:

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

To obtain the size in bytes, divide by 8. For instance, a 1920 × 1080 image with a 24-bit colour depth produces:

1920 × 1080 × 24 = 49,766,400 bits = 6,220,800 bytes ≈ 5.93 MB

位图图像的文件大小由其分辨率(宽度 × 高度,以像素计)和色彩深度(每像素比特数)决定。原始文件大小(比特)为:

图像文件大小(比特) = 宽度(像素) × 高度(像素) × 色彩深度(每像素比特数)

转为字节时除以 8。例如,一幅 1920 × 1080、24 位色彩深度的图像产生:

1920 × 1080 × 24 = 49,766,400 比特 = 6,220,800 字节 ≈ 5.93 MB

Remember that additional metadata (headers, EXIF data) and compression may alter the final file size.

请记住,额外的元数据(文件头、EXIF 数据)和压缩可能会改变最终的文件大小。


4. Data Transfer Rate | 数据传输速率

When transmitting a file over a network, the time required depends on the file size and the transfer rate. The fundamental relationship is:

Transfer time (seconds) = File size ÷ Transfer rate

It is crucial to use consistent units. If the file size is given in bits and the rate in bits per second (bps), the result is directly in seconds. Convert all quantities to the same unit before calculating.

通过网络传输文件时,所需时间取决于文件大小和传输速率。基本关系为:

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

必须使用一致的单位。如果文件大小以比特为单位,速率以比特每秒(bps)为单位,则结果直接为秒。计算前要先将所有量转换为相同单位。

For example, transferring a 100 MB file over a 100 Mbps connection (note the capital ‘B’ for bytes and lowercase ‘b’ for bits):

File size = 100 MB = 100 × 1024 × 1024 × 8 bits = 838,860,800 bits

Transfer time = 838,860,800 bits ÷ 100,000,000 bps ≈ 8.39 seconds

例如,通过 100 Mbps 连接传输一个 100 MB 的文件(注意大写 B 表示字节,小写 b 表示比特):

文件大小 = 100 MB = 100 × 1024 × 1024 × 8 比特 = 838,860,800 比特

传输时间 = 838,860,800 比特 ÷ 100,000,000 bps ≈ 8.39 秒


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

Boolean algebra provides a set of rules for manipulating logical expressions. These laws are used to simplify logic circuits. The fundamental identities, using ‘+’ for OR, ‘·’ for AND, and ‘¬’ for NOT, are summarised below.

布尔代数提供了一组用于操作逻辑表达式的规则。这些定律用于简化逻辑电路。基本恒等式使用 ‘+’ 表示或,’·’ 表示与,’¬’ 表示非,汇总如下。

Law AND form OR form
Identity A · 1 = A A + 0 = A
Annihilator A · 0 = 0 A + 1 = 1
Idempotent A · A = A A + A = A
Complement A · ¬A = 0 A + ¬A = 1
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

这些定律可以组合使用,以推导出更简洁的表达式。例如,吸收律表明 A + (A · B) 简化为 A。

These laws can be used in combination to derive more compact expressions. For instance, the absorption law shows that A + (A · B) simplifies to A.


6. De Morgan’s Theorems | 德摩根定理

De Morgan’s theorems provide a way to transform expressions involving ANDs and ORs with negations. They are essential for simplifying NAND and NOR logic.

¬(A + B) = ¬A · ¬B

¬(A · B) = ¬A + ¬B

德摩根定理提供了一种转换包含与、或和非的表达式的方法。它们对于简化与非和或非逻辑至关重要。

¬(A + B) = ¬A · ¬B

¬(A · B) = ¬A + ¬B

In words, the complement of an OR is the AND of the complements, and the complement of an AND is the OR of the complements. These are extremely useful when converting between logic gate types.

换句话说,或运算的补是每个变量补的与,与运算的补是每个变量补的或。这在逻辑门类型转换中极其有用。


7. Logic Gate Simplification Using Boolean Rules | 使用布尔规则简化逻辑门

Before implementing a logic circuit, it is often beneficial to simplify its Boolean expression to reduce the number of gates. The laws from Section 5 and De Morgan’s theorems can be applied step by step. Common simplification steps include removing double negations, applying absorption, and factoring.

在实现逻辑电路之前,通常最好简化其布尔表达式以减少门的数量。可以逐步应用第 5 节中的定律和德摩根定理。常见的简化步骤包括消除双重否定、应用吸收律和因式分解。

For example, simplify ¬(¬A · B) + A · B:

= (¬

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