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

Year 8 WJEC Computer Science: Formula & Theorem Quick Reference | 年8 WJEC 计算机:公式定理速查手册

2026-07-17 21:41 · 本文部分内容由AI辅助创作

📚 Year 8 WJEC Computer Science: Formula & Theorem Quick Reference | 年8 WJEC 计算机:公式定理速查手册

This quick reference handbook covers all the essential formulas and theorems you need to master for the Year 8 WJEC Computer Science curriculum. From binary arithmetic and Boolean logic to file size calculations and error detection, each section presents the core rules in plain English and Chinese, followed by concise examples. Use this guide to revise key facts and practise applying formulas in exam-style questions.

本速查手册涵盖了年8 WJEC 计算机科学课程必须掌握的所有重要公式与定理。从二进制运算和布尔逻辑到文件大小计算与错误检测,每一节都用简洁的英文和中文列出核心规则,并配有简明的示例。请使用本指南复习关键知识点,并在类似考题中练习应用这些公式。


1. Binary and Decimal Conversion | 二进制与十进制转换

Binary is a base‑2 number system using only digits 0 and 1. Each position represents a power of 2, with the rightmost bit corresponding to 2⁰.

二进制是一种基数为2的记数系统,只使用数字0和1。每个位置代表一个2的幂,最右边的位对应2⁰。

To convert a binary number to decimal, multiply each bit by its place value and add the products. If a binary number has n bits, the place values are 2ⁿ⁻¹, 2ⁿ⁻², …, 2¹, 2⁰.

要将二进制数转换为十进制,将每一位乘以其位值并累加。若二进制数有n位,位值依次为2ⁿ⁻¹、2ⁿ⁻²、…、2¹、2⁰。

Decimal = dₙ₋₁ × 2ⁿ⁻¹ + dₙ₋₂ × 2ⁿ⁻² + … + d₀ × 2⁰

the binary number 1101₂ is evaluated as 1×2³ + 1×2² + 0×2¹ + 1×2⁰ = 8 + 4 + 0 + 1 = 13₁₀.

例如,二进制数1101₂的计算过程为1×2³ + 1×2² + 0×2¹ + 1×2⁰ = 8 + 4 + 0 + 1 = 13₁₀。

To convert decimal to binary, repeatedly divide the decimal number by 2 and record the remainders. The binary result is the sequence of remainders read from bottom to top.

要将十进制转换为二进制,反复用2除十进制数并记录余数。从下往上读取余数序列即得二进制结果。


2. Binary Arithmetic | 二进制运算

Binary addition follows simple rules. When two bits add up to 2, write 0 and carry 1 to the next column. When three bits add up to 3, write 1 and carry 1.

二进制加法遵循简单的规则。两个位相加得2时,写0并向下一位进1;三个位相加得3时,写1并向下一位进1。

0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
1 + 1 = 0 carry 1
1 + 1 + 1 = 1 carry 1

When adding binary numbers, align them to the right and work from the least significant bit. If an overflow occurs beyond the allotted number of bits, the extra carry is discarded, which may lead to incorrect results if the sum cannot fit in the available bits.

二进制数相加时向右对齐,从最低位开始运算。如果超出分配的位数发生溢出,多余的进位数会被丢弃,若和无法放进可用位数,结果就会出错。

Addition examples:
0101₂ (5) + 0011₂ (3) = 1000₂ (8)

加法示例:
0101₂ (5) + 0011₂ (3) = 1000₂ (8)


3. Hexadecimal Numbers | 十六进制

Hexadecimal (hex) is a base‑16 system that uses digits 0–9 and letters A–F, where A=10, B=11, …, F=15. It provides a compact way to represent long binary strings.

十六进制是以16为基数的系统,使用数字0–9和字母A–F,其中A=10、B=11、…、F=15。它是表示长二进制串的简写方式。

To convert binary to hex, group the binary digits into nibbles (groups of four) from right to left, then replace each nibble with its hex equivalent. To convert hex to binary, expand each hex digit into a 4‑bit binary nibble.

将二进制转换为十六进制时,从右到左将二进制数每四位分成一组(半字节),然后将每组替换为等值的十六进制;十六进制转二进制则将每位十六进制数展开为4位二进制。

1011 1100₂ → B C₁₆

To convert hex to decimal, multiply each hex digit by the appropriate power of 16 and add the results.

将十六进制转换为十进制,将每位乘以相应的16的幂并求和。

Decimal = hₖ₋₁ × 16ᵏ⁻¹ + … + h₀ × 16⁰

For instance, 2F₁₆ = 2×16¹ + 15×16⁰ = 32 + 15 = 47₁₀.

例如,2F₁₆ = 2×16¹ + 15×16⁰ = 32 + 15 = 47₁₀。


4. Data Units | 数据单位

Digital information is measured in bits and bytes. The relationship between units uses powers of 2, as defined by the binary prefix system used in most computer science contexts.

数字信息以位和字节为单位。各单位之间的关系采用2的幂次,符合大多数计算机科学场景中使用的二进制前缀体系。

UnitAbbreviationValue in bytes
1 bitb1/8 byte
1 byteB1 byte = 8 bits
1 kilobyteKB2¹⁰ B = 1 024 B
1 megabyteMB2²⁰ B = 1 048 576 B
1 gigabyteGB2³⁰ B
1 terabyteTB2⁴⁰ B

The conversion rule to remember: 1 KB = 1024 bytes, 1 MB = 1024 KB, and so on. Always check whether the question expects binary (1024) or decimal (1000) units; WJEC typically uses binary measures for storage.

记住转换规则:1 KB = 1024 字节,1 MB = 1024 KB,依此类推。务必确认题目要求的是二进制单位(1024)还是十进制单位(1000);WJEC 通常在存储容量中使用二进制单位。


广告 / Sponsored

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

h × height, and colour depth is the number of bits used to store the colour of each pixel.

位图图像的大小取决于其分辨率和色彩深度。分辨率是宽×高的像素数量,色彩深度是存储每个像素颜色所用的位数。

Total bits = Width (pixels) × Height (pixels) × Colour Depth (bpp)

To express the file size in bytes, divide the total bits by 8. Often the result is further converted to KB or MB for convenience.

若要以字节表示文件大小,将总位数除以8。为了方便,通常再进一步换算为 KB 或 MB。

Example: an image of 1920 × 1080 pixels with 24‑bit colour depth requires 1920 × 1080 × 24 = 49 766 400 bits = 6 220 800 bytes ≈ 6.22 MB.

示例:一张1920×1080像素、24位色彩深度的图像需要 1920×1080×24 = 49 766 400 位 = 6 220 800 字节 ≈ 6.22 MB。


6. Sound File Size | 音频文件大小

Digital audio file size is calculated using sample rate, bit depth, duration and number of channels. Sample rate is measured in hertz (Hz), bit depth in bits per sample, and duration in seconds.

数字音频文件的大小由采样率、位深度、时长和声道数计算得出。采样率以赫兹(Hz)为单位,位深度以每样本位数计,时长以秒计。

Total bits = Sample Rate (Hz) × Bit Depth × Duration (s) × Channels

For mono audio the number of channels is 1; for stereo it is 2. Once you have the total bits, divide by 8 to obtain bytes.

单声道音频的声道数为1,立体声为2。得到总位数后,除以8即得字节数。

Example: a 10‑second stereo recording at 44.1 kHz with 16‑bit depth uses 44 100 × 16 × 10 × 2 = 14 112 000 bits = 1 764 000 bytes ≈ 1.76 MB.

示例:一段10秒钟的立体声录音,采样率44.1 kHz、16位深度,需要 44 100 × 16 × 10 × 2 = 14 112 000 位 = 1 764 000 字节 ≈ 1.76 MB。


7. Text Encoding | 文本编码

Text is stored by converting each character into a numeric code. The number of bits assigned to each character determines the total number of characters that can be represented.

文本通过将每个字符转换为数字编码来存储。分配给每个字符的位数决定了可表示的字符总数。

Number of characters representable = 2ⁿ (where n is bits per character)

nded ASCII uses 8 bits (1 byte) and can represent 256 characters. Unicode typically uses variable‑length encoding (UTF‑8) but allows representation of over a million characters.

标准 ASCII 使用每字符7位,可表示2⁷=128个字符。扩展 ASCII 使用8位(1字节),可表示256个字符。Unicode 通常采用变长编码(UTF‑8),能表示超过一百万个字符。

For a plain text file, the size in bytes is roughly equal to the number of characters if 8‑bit encoding is used. Thus:

对于纯文本文件,若采用8位编码,文件大小(字节)约等于字符数。因此:

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


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

Logic gates are the building blocks of digital circuits. Each gate implements a Boolean function. The behaviour is completely described by a truth table listing all possible input combinations and the corresponding output.

逻辑门是数字电路的构建模块。每种门实现一个布尔函数,其行为由列出所有可能输入组合及对应输出的真值表完整描述。

AND gate — Output is true only when all inputs are true.

与门 — 仅当所有输入都为真时输出才为真。

ABA AND B
000
010
100
111

OR gate — Output is true if at least one input is true.

或门 — 如果至少有一个输入为真,输出就为真。

ABA OR B
000
011
101
111

NOT gate — Output is the inverse of the single input.

非门 — 输出等于单一输入的反相。

ANOT A
01
10

9. Logic Circuits and Boolean Expressions | 逻辑电路与布尔表达式

A logic circuit combines several gates. Its function can be described by a Boolean expression. Common notation: AND is represented by a dot (·) or ∧, OR by a plus (+) or ∨, and NOT by an overbar or ¬.

逻辑电路由多个门组合而成,其功能可用布尔表达式来描述。常用符号:与用点(·)或∧表示,或用加号(+)或∨表示

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

广告 / Sponsored
Linux高级程序设计(高等院校计算机技术十二五规划教材)/刘加海/季江民/浙江大学出版社
计算机 备考教辅 · 正版现货 · 与本文内容相关
查看详情 / View on Taobao参考价 ¥55.6

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

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