📚 GCSE OCR Computer Science: Formula Summary Handbook | GCSE OCR 计算机:公式汇总手册
Welcome to the GCSE OCR Computer Science Formula Summary Handbook. This guide compiles the most important calculations, conversions, and Boolean simplification rules you will encounter in the exams. Having these formulae at your fingertips can save you time, reduce errors, and give you greater confidence in numerical and logic-based questions.
欢迎使用 GCSE OCR 计算机科学公式汇总手册。本指南整理了考试中会遇到的重要计算、换算规则以及布尔代数简化方法。熟记这些公式能帮助你节省时间、减少错误,在面对数值计算与逻辑题目时更加胸有成竹。
1. Units of Data Storage and Conversion | 数据存储单位与换算
In OCR GCSE Computer Science, file size calculations almost always use decimal multiples: 1 kilobyte (KB) is 1000 bytes, 1 megabyte (MB) is 1000 KB, 1 gigabyte (GB) is 1000 MB, and 1 terabyte (TB) is 1000 GB. For memory capacities and exact addressing, exam questions sometimes use binary multiples where 1 kibibyte (KiB) = 1024 bytes. Always read the context carefully.
在 OCR GCSE 计算机科学中,文件大小计算几乎总是采用十进制倍数:1 千字节 (KB) = 1000 字节,1 兆字节 (MB) = 1000 KB,1 吉字节 (GB) = 1000 MB,1 太字节 (TB) = 1000 GB。对于内存容量与精确寻址,考题有时会使用二进制倍数,即 1 kibibyte (KiB) = 1024 字节。解题前务必仔细审题,确认上下文。
To convert from a smaller unit to a larger one, divide by 1000 (or 1024 for binary prefixes). To convert from a larger unit to a smaller one, multiply. The fundamental building blocks are 8 bits = 1 byte. Use these relationships to express sizes in bits, bytes, kilobytes or even megabytes.
从小单位转换为大单位时,除以 1000(若使用二进制前缀则除以 1024);从大单位转换为小单位时,乘以相应系数。最基本的换算关系是 8 位 = 1 字节。通过这些关系,可以灵活地从位、字节、千字节转换到兆字节等。
2. Image File Size Calculation | 图像文件大小计算
For an uncompressed bitmap image, the file size in bits is determined by: file size (bits) = image width (px) × image height (px) × colour depth (bpp). To obtain the size in bytes, divide the result by 8. If the question asks for size in KB, divide further by 1000.
对于未压缩的位图图像,以位为单位的文件大小计算公式为:文件大小(位) = 图像宽度(像素) × 图像高度(像素) × 色深(位/像素)。若要以字节为单位,需将结果除以 8。如果题目要求以 KB 为单位,再除以 1000。
Example: a 400 × 300 pixel image with 24‑bit colour has a raw size of 400 × 300 × 24 = 2,880,000 bits. In bytes this is 2,880,000 ÷ 8 = 360,000 B. Dividing by 1000 gives 360 KB.
示例:一张 400 × 300 像素、24 位色深的图像,原始大小为 400 × 300 × 24 = 2,880,000 位。换成字节为 2,880,000 ÷ 8 = 360,000 B,再除以 1000 得到 360 KB。
Remember that images saved with metadata (e.g. headers, EXIF data) will be slightly larger, but examination questions usually ignore this unless stated otherwise. Also note that indexed colour images reduce the colour depth, for example 8‑bit palettes shrink the per‑pixel storage.
请注意,包含元数据(如文件头、EXIF 信息)的图像会略大一些,但考试题目一般忽略此项,除非另有说明。另外,索引色图像会降低色深,例如 8 位调色板会减少每个像素的存储量。
3. Sound File Size Calculation | 声音文件大小计算
The size of an uncompressed audio file can be calculated with: file size (bits) = sample rate (Hz) × bit depth × duration (s) × number of channels. To express the result in bytes, divide by 8.
未压缩音频文件的大小可按以下公式计算:文件大小(位) = 采样率 (Hz) × 位深度 × 时长(秒) × 声道数。若要以字节表示,需除以 8。
For instance, a 10‑second stereo recording at 44.1 kHz sampling rate and 16‑bit depth produces: 44,100 × 16 × 10 × 2 = 14,112,000 bits. In bytes that is 14,112,000 ÷ 8 = 1,764,000 B, which is approximately 1,764 KB or 1.76 MB.
例如,一段采样率 44.1 kHz、位深度为 16 的 10 秒立体声录音,其大小为 44,100 × 16 × 10 × 2 = 14,112,000 位。换成字节为 14,112,000 ÷ 8 = 1,764,000 B,大约为 1,764 KB 或 1.76 MB。
Sometimes you will be given sample rate in kHz. Simply multiply by 1000 to obtain Hz before using the formula. Always check the units and ensure duration is in seconds.
有时题目给出的采样率单位为 kHz,只需乘以 1000 转换为 Hz 再代入公式即可。请务必检查单位,并确保时长以秒为单位。
4. Text File Size Estimation | 文本文件大小估算
The size of a plain text file can be estimated as: file size (bytes) ≈ number of characters × bytes per character. In standard ASCII, each character uses 1 byte (8 bits). In Unicode encodings such as UTF‑8, characters may occupy more than 1 byte depending on the character set.
纯文本文件的大小可估算为:文件大小(字节) ≈ 字符数 × 每字符字节数。在标准 ASCII 编码中,每个字符占用 1 字节(8 位)。在 UTF‑8 等 Unicode 编码中,某些字符可能占用超过 1 字节,具体取决于字符集。
Most GCSE OCR questions assume simple ASCII, so you can use 1 byte per character. If a passage contains 2000 characters, the estimated file size is 2000 bytes, or 2 KB. When calculating storage for large documents, always convert to sensible units.
多数 GCSE OCR 试题假定使用简单的 ASCII,因此可以按照每个字符 1 字节计算。如果一段文字包含 2000 个字符,则估计文件大小为 2000 字节,即 2 KB。在计算大文档的存储需求时,记得转换为合适的单位。
5. Video File Size Approximation | 视频文件大小近似计算
A rough estimate for uncompressed video file size is: size (bits) ≈ width × height × colour depth × frame rate (fps) × duration (s). In practice, video is almost always compressed, so you might also need to divide by a compression factor if it is given.
对未压缩视频文件大小的粗略估算公式为:大小(位) ≈ 宽度 × 高度 × 色深 × 帧率 (fps) × 时长(秒)。实际上,视频几乎总是经过压缩的,因此如果题目给出了压缩因子,还需要再除以该因子。
Example: a 30‑second 1920 × 1080 pixel video with 24‑bit colour at 30 fps would, in an uncompressed form, require 1920 × 1080 × 24 × 30 × 30 = 44,789,760,000 bits, roughly 5.6 GB. With a compression ratio of 100:1 the size would be far smaller.
示例:一段 30 秒、1920 × 1080 像素、24 位色深、30 fps 的视频,未压缩情况下需要 1920 × 1080 × 24 × 30 × 30 = 44,789,760,000 位,约 5.6 GB。若压缩比为 100:1,文件大小会远小于此值。
At GCSE level, you are unlikely to be asked to calculate raw video sizes without compression, but knowing the relationship between frames and overall duration is useful for understanding streaming and storage demands.
在 GCSE 阶段,虽然不太可能要求计算无压缩的原始视频大小,但理解帧与总时长之间的关系,有助于理解流媒体传输和存储需求。
6. Data Transfer Time | 数据传输时间
Transfer time is calculated using: time (seconds) = file size ÷ transfer rate. Both terms must be in compatible units, typically the same multiple of bits or bytes. Always convert so that file size and transfer rate are expressed in the same unit.
传输时间的计算公式为:时间(秒) = 文件大小 ÷ 传输速率。两者必须使用一致的单位,通常要么都采用位与 bps,要么都采用字节与 Bps。务必进行单位转换,使两者单位相同。
If a 40 MB file is to be sent over a connection with a speed of 20 Mbps, first convert the file size to bits: 40 MB × 8 = 320 Mb. Then time = 320 Mb ÷ 20 Mbps = 16 seconds.
如果要通过 20 Mbps 的连接发送一个 40 MB 的文件,首先将文件大小转换为位:40 MB × 8 = 320 Mb。然后计算时间:320 Mb ÷ 20 Mbps = 16 秒。
Be careful with prefixes: a broadband speed of 8 Mb/s is not the same as 8 MB/s. Misunderstanding this is a common source of avoidable marks lost.
要留意前缀:8 Mb/s 的宽带速度不同于 8 MB/s。混淆这一点是常见的失分原因,而它完全是可以避免的。
7. Boolean Algebra Simplification Rules | 布尔代数简化规则
Boolean algebra is used to simplify logic circuits and expressions. The table below shows the most important identities. While the exam does not ask you to apply all these algebraically, understanding the rules helps with tracing truth tables and minimising gate counts.
布尔代数常用来化简逻辑电路和逻辑表达式。下表列出了最重要的恒等式。考试虽然不要求纯代数推导,但理解这些规则有助于填写真值表和减少门电路数量。
| Law | Expression | Simplification |
|---|---|---|
| Identity | A AND 1, A OR 0 | = A |
| Null | A AND 0, A OR 1 | = 0, = 1 |
| Idempotent | A AND A, A OR A | = A |
| Complement | A AND NOT A, A OR NOT A | = 0, = 1 |
| Absorption | A OR (A AND B) | = A |
| De Morgan’s | NOT (A AND B), NOT (A OR B) | = (NOT A) OR (NOT B), = (NOT A) AND (NOT B) |
| Double Negation | NOT (NOT A) | = A |
These laws underpin truth table verification and the design of efficient circuits. In questions that ask you to draw a logic circuit for a given expression, applying them can lead to a simpler diagram with fewer gates.
这些定律是验证真值表和设计高效电路的基础。在要求根据表达式绘制逻辑电路的题目中,运用这些规则往往能画出使用更少门电路的简化图。
8. Binary Addition and Overflow Detection | 二进制加法与溢出检测
Binary addition follows simple rules: 0 + 0 = 0, 0 + 1 = 1, 1 + 0 = 1, and 1 + 1 = 0 with a carry of 1 to the next column. When working with a fixed number of bits, a carry out of the most significant bit that cannot be stored indicates an overflow error.
二进制加法遵循简单的规则:0 + 0 = 0,0 + 1 = 1,1 + 0 = 1,1 + 1 = 0 并向下一列进 1。当使用固定位数时,若最高位产生进位且无法被存储,则表示发生了溢出错误。
For example, adding 0110 (6) and 0101 (5) in 4‑bit binary yields 1011, which is 11 in decimal and fits within the 4‑bit range. However, adding 1100 (12) and 0110 (6) produces a carry into a non‑existent 5th bit, so the 4‑bit result is 0010 (2), indicating overflow.
例如,在 4 位二进制下,将 0110 (6) 与 0101 (5) 相加,得到 1011 (十进制 11),该数值在 4 位表示范围内。而将 1100 (12) 与 0110 (6) 相加时,会产生向第 5 位的进位,4 位结果为 0010 (2),表明发生了溢出。
Overflow is particularly important when dealing with two’s complement signed numbers. If the sum of two positive numbers gives a negative result, or the sum of two negative numbers gives a positive result, an overflow has occurred.
在使用二进制补码表示有符号数时,溢出尤为重要。如果两个正数相加得到负数,或两个负数相加得到正数,就说明发生了溢出。
9. Hexadecimal and Binary Conversion | 十六进制与二进制转换
Hexadecimal (base 16) provides a compact way to represent binary. Each hex digit maps to exactly four binary bits: 0 = 0000, 1 = 0001, 2 = 0010, …, 9 = 1001, A = 1010, B = 1011, C = 1100, D = 1101, E = 1110, F = 1111. To convert between the two, group binary digits into nibbles (groups of four) starting from the right.
十六进制(基数为 16)提供了一种紧凑表示二进制的方法。每个十六进制数字恰好对应 4 位二进制:0 = 0000,1 = 0001,2 = 0010,……,9 = 1001,A = 1010,B = 1011,C = 1100,D = 1101,E = 1110,F = 1111。两者相互转换时,从右向左将二进制位每 4 位分为一组即可。
Example: the binary number 11010111 is split into 1101 (D) and 0111 (7), giving the hex value D7. Conversely, hex 3A
Published by TutorHao | GCSE Computer Science Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)
屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导Cancel reply