Year 8 OCR Computer Science: Quick Reference Handbook of Formulas and Theorems | Year 8 OCR 计算机:公式定理速查手册

📚 Year 8 OCR Computer Science: Quick Reference Handbook of Formulas and Theorems | Year 8 OCR 计算机:公式定理速查手册

Welcome to your Year 8 OCR Computer Science Quick Reference Handbook. This guide brings together the essential formulas, conversion rules, and theorems you will encounter in data representation, Boolean logic, storage calculations, and networking. Keep it handy for homework and revision – every rule is explained clearly and paired with a worked example.

欢迎使用你的 Year 8 OCR 计算机科学速查手册。本手册汇集了你在数据表示、布尔逻辑、存储计算和网络中会遇到的关键公式、转换法则与定理。随身携带,随时查阅——每条规则都配有清晰解释和实际用例。


1. Binary Place Values and Denary Conversion | 二进制位权与十进制转换

In the binary number system, each position (bit) carries a weight that is a power of 2. The rightmost bit is the least significant and has a weight of 2⁰ = 1. Moving leftwards, the weights double: 2¹ = 2, 2² = 4, 2³ = 8, and so on. To convert an 8‑bit binary number into decimal, multiply each bit by its place value and sum the results.

在二进制数系统中,每一个数位(位)的权重都是2的幂。最右侧的位是最低有效位,权重为2⁰ = 1。向左移动,权重依次翻倍:2¹ = 2, 2² = 4, 2³ = 8,依此类推。要将一个8位二进制数转换为十进制,只需将每一位乘以其位权再求和即可。

Decimal value = b₇×2⁷ + b₆×2⁶ + b₅×2⁵ + b₄×2⁴ + b₃×2³ + b₂×2² + b₁×2¹ + b₀×2⁰

For example, the binary number 01011001₂ is calculated as: 0×128 + 1×64 + 0×32 + 1×16 + 1×8 + 0×4 + 0×2 + 1×1 = 89 in decimal.

例如,二进制数 01011001₂ 的计算过程为:0×128 + 1×64 + 0×32 + 1×16 + 1×8 + 0×4 + 0×2 + 1×1 = 89(十进制)。


2. Denary to Binary Conversion by Repeated Division | 除二取余法十进制转二进制

To change a decimal (denary) number into binary, divide the number by 2 repeatedly, noting the remainder each time. The binary equivalent is obtained by reading the remainders from the last division upwards.

要将十进制数转换成二进制,反复将该数除以2,每次记录余数。将所得余数从最后一次除法开始向上读取,就得到了对应的二进制数。

  • Step 1: Divide the decimal number by 2.
  • Step 2: Record the remainder (0 or 1) on the right.
  • Step 3: Use the quotient for the next division.
  • Step 4: Repeat until the quotient becomes 0.
  • Step 5: Read the remainder column from bottom to top.
  • 步骤1:将十进制数除以2。
  • 步骤2:在右侧记下余数(0或1)。
  • 步骤3:用商进行下一次除法。
  • 步骤4:重复直至商为0。
  • 步骤5:从下至上读取余数列。

Example: Convert 25 to binary. 25 ÷ 2 = 12 remainder 1; 12 ÷ 2 = 6 remainder 0; 6 ÷ 2 = 3 remainder 0; 3 ÷ 2 = 1 remainder 1; 1 ÷ 2 = 0 remainder 1. Reading the remainders bottom-up gives 11001₂.

例子:将25转换为二进制。25 ÷ 2 = 12 余 1;12 ÷ 2 = 6 余 0;6 ÷ 2 = 3 余 0;3 ÷ 2 = 1 余 1;1 ÷ 2 = 0 余 1。从下往上读取余数得到 11001₂。


3. Hexadecimal Digits and Their Values | 十六进制数字与对应值

Hexadecimal (base 16) uses sixteen distinct symbols: the digits 0–9 represent the values zero to nine, and the letters A (10), B (11), C (12), D (13), E (14) and F (15) represent the remaining values. Each hex digit corresponds to exactly four binary bits, making it a compact way to write long binary strings.

十六进制(基数为16)使用十六个不同的符号:数字0–9表示零至九的值,字母 A (10)、B (11)、C (12)、D (13)、E (14) 和 F (15) 表示剩余的数值。每个十六进制数字恰好对应四位二进制位,因此可以紧凑地书写长二进制串。

Hex Digit Denary Value Binary Nibble
0 0 0000
1 1 0001
2 2 0010
3 3 0011
4 4 0100
5 5 0101
6 6 0110
7 7 0111
8 8 1000
9 9 1001
A 10 1010
B 11 1011
C 12 1100
D 13 1101
E 14 1110
F 15 1111

4. Binary to Hexadecimal Grouping Rule | 二进制转十六进制分组法则

To convert a binary number into hexadecimal, split the binary digits into groups of four (nibbles), starting from the right. If the leftmost group has fewer than four bits, pad it with leading zeros. Then replace each nibble with its matching hex digit from the table above.

要将二进制数转换成十六进制,从右侧开始将二进制数字每四位一组进行切分。如果最左侧的一组不足四位,就用零补齐。然后将每一组四位二进制替换成上表中对应的十六进制数字。

Binary → groups of 4 → hex digits

Example: 10111010₂ → split as 1011 1010. 1011₂ = B, 1010₂ = A, so the result is BA₁₆.

例子:10111010₂ → 切分为 1011 1010。1011₂ = B, 1010₂ = A,因此结果为 BA₁₆。


5. Binary Addition and Overflow Rules | 二进制加法与溢出规则

Binary addition follows four straightforward rules: 0 + 0 = 0; 0 + 1 = 1; 1 + 0 = 1; 1 + 1 = 0, carry 1 to the next column. When a column has a carry‑in, use the rule 1 + 1 + 1 = 1, carry 1. If the final carry exceeds the available bit width, an overflow error occurs, meaning the result is too large to be stored correctly.

二进制加法遵循四条简单规则:0 + 0 = 0;0 + 1 = 1;1 + 0 = 1;1 + 1 = 0,并向下一列进位1。当某一列有进位输入时,使用规则 1 + 1 + 1 = 1,进位1。如果最后的进位超出了可用的位宽,就会发生溢出错误,这意味着结果太大而无法正确存储。

  • 0 + 0 = 0
  • 0 + 1 = 1
  • 1 + 0 = 1
  • 1 + 1 = 0 (carry 1)
  • 1 + 1 + 1 = 1 (carry 1)

Example: adding two 8‑bit numbers 10101010 (170) and 01010101 (85) gives 11111111 (255) with no overflow. But 11111111 + 00000001 would produce a 9‑bit result that overflows in an 8‑bit register, leaving 00000000.

示例:将两个8位二进制数 10101010 (170) 与 01010101 (85) 相加,得到 11111111 (255),没有溢出。然而 11111111 + 00000001 会产生一个9位的结果,在8位寄存器中会溢出,保留 00000000。


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

Digital circuits use logic gates to perform Boolean operations. The three fundamental gates are AND, OR, and NOT. An AND gate outputs 1 only when all inputs are 1. An OR gate outputs 1 if at least one input is 1. A NOT gate (inverter) flips a single input: 0 becomes 1, and 1 becomes 0.

数字电路使用逻辑门来执行布尔运算。三种基本逻辑门是:与门、或门和非门。与门仅在所有输入均为1时输出1;或门只要有一个输入为1就输出1;非门(反相器)将单一输入翻转:0变1,1变0。

Truth tables provide a complete description of a gate’s behaviour. They list every possible input combination and the corresponding output.

真值表完整地描述了逻辑门的行为。它列出了所有可能的输入组合以及对应的输出。


7. Truth Tables for Basic Logic Gates | 基本逻辑门真值表

Below are the truth tables for a two‑input AND gate, a two‑input OR gate, and a single‑input NOT gate.

以下是二输入与门、二输入或门和单输入非门的真值表。

AND Gate
Input A Input B Output Q
0 0 0
0 1 0
1 0 更多咨询请联系16621398022(同微信)

Comments

屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导Cancel reply

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