GCSE Edexcel Computer Science: Binary Revision Guide | GCSE Edexcel 计算机:二进制考点精讲

📚 GCSE Edexcel Computer Science: Binary Revision Guide | GCSE Edexcel 计算机:二进制考点精讲

Binary is the fundamental language of all modern computers. Every piece of data, every instruction, every pixel you see on a screen is represented using only two symbols: 0 and 1. For your Edexcel GCSE Computer Science exam, you need to be confident in converting between binary, denary, and hexadecimal, performing binary arithmetic, understanding logical shifts, and explaining how overflow occurs. This guide breaks down each key concept with step-by-step methods, examples, and tips to help you secure top marks.

二进制是现代计算机的基本语言。你看到的每一个数据、每一条指令、屏幕上的每一个像素,归根结底都只用两个符号表示:0 和 1。在 Edexcel GCSE 计算机科学考试中,你必须熟练掌握二进制、十进制和十六进制之间的转换,进行二进制算术运算,理解逻辑移位,并解释溢出的产生。本指南将逐步拆解每一个核心概念,结合示例和技巧,帮助你拿下高分。


1. The Binary Number System | 二进制数制基础

Computers use the binary (base‑2) number system, which has only two digits: 0 and 1. Each binary digit is called a bit. In contrast, humans typically use denary (base‑10), which has ten digits (0 – 9). Every position in a binary number represents a power of 2, with the least significant bit on the right.

计算机使用二进制(基数为 2)数制,只包含两个数码:0 和 1。每一个二进制数字称为一个比特(bit)。而人类日常使用的是十进制(基数为 10),拥有十个数码(0 – 9)。二进制数中每一位都代表 2 的幂,最低有效位在最右边。

The place values for an 8‑bit binary number (a byte) are shown below:

8 位二进制数(一个字节)的位值如下:

Place values: 128   64   32   16   8   4   2   1

For example, the binary number 01001101 represents the denary value: 0 + 64 + 0 + 0 + 8 + 4 + 0 + 1 = 77. The leading zero does not affect the value.

例如,二进制数 01001101 对应的十进制值为:0 + 64 + 0 + 0 + 8 + 4 + 0 + 1 = 77。前导零不影响数值。


2. Bits, Nibbles, Bytes and Storage Units | 比特、半字节、字节与存储单位

You must know the hierarchy of data units. A bit is a single binary value (0 or 1). A nibble is a group of 4 bits. A byte is a group of 8 bits – the smallest addressable unit in most computers. From there, storage capacities scale by powers of 10 (or sometimes powers of 2).

你必须掌握数据单位的层级关系。一个比特是最小的二进制值(0 或 1)。半字节(nibble)是 4 个比特。字节(byte)是 8 个比特——在大多数计算机中这是最小的可寻址单元。更大的存储容量按 10 的幂(有时按 2 的幂)递增。

Unit Abbreviation Equivalent
bit b Single 0 or 1
nibble 4 bits
byte B 8 bits
kilobyte kB 1000 bytes
megabyte MB 1000 kilobytes
gigabyte GB 1000 megabytes

In the exam, you should remember that file sizes and storage devices are often quoted using these decimal-based units, though you might also see the binary equivalents (kibibyte, mebibyte) for more precise memory sizes.

考试中要记住,文件大小和存储设备通常使用这些基于十进制的单位,不过你也可能见到二进制当量单位(kibibyte、mebibyte)用于更精确的内存大小表示。


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

To convert an 8‑bit binary number to denary, write down the place values 128, 64, 32, 16, 8, 4, 2, 1 above each bit. Whenever a 1 appears, add the corresponding place value. A 0 contributes nothing.

将 8 位二进制数转换为十进制时,先把 128、64、32、16、8、4、2、1 这些位值对齐写在每个比特上方。当某一位是 1 时,加上对应的位值;是 0 则加 0。

Example: Convert 10110110₂ to denary.

示例:将二进制数 10110110₂ 转换为十进制。

128 | 64 | 32 | 16 | 8 | 4 | 2 | 1
  1   |  0  |  1  |  1  | 0 | 1 | 1 | 0

Add the values: 128 + 32 + 16 + 4 + 2 = 182₁₀. You can present this step as a sum to make your working clear.

相加得到:128 + 32 + 16 + 4 + 2 = 182₁₀。可以把这一步写成求和式,让解题过程更清晰。

A quick check: the highest possible 8‑bit binary number is 11111111, which equals 255. For Edexcel, you only need to handle whole numbers between 0 and 255 inclusive.

快速验证:8 位二进制数最大值为 11111111,等于 255。在 Edexcel 考试中,你只需要处理 0 至 255(含)的整数。


4. Converting Denary to Binary | 十进制转二进制

Two methods are acceptable: the division‑by‑2 method and the place‑value subtraction method. The subtraction method is often faster for exam conditions because you can work directly with place values.

两种方法都可接受:除二取余法和位值减法。在考试中位值减法通常更快,因为可以直接用位值表操作。

Subtraction method: start with the largest place value (128). If the denary number is greater than or equal to 128, write a 1 and subtract 128; otherwise write a 0. Move to 64, 32, and so on. Repeat until you reach 1.

位值减法:从最大的位值(128)开始。如果十进制数大于或等于 128,就写 1 并减去 128;否则写 0。接着处理 64、32,依此类推,一直处理到 1。

Example: Convert 200 to binary.

示例:将 200 转换为二进制。

  • 200 ≥ 128 → 1, remainder 72.
       200 ≥ 128 → 1,余数为 72。
  • 72 ≥ 64 → 1, remainder 8.
       72 ≥ 64 → 1,余数为 8。
  • 8 < 32 → 0.
       8 < 32 → 0。
  • 8 < 16 → 0.
       8 < 16 → 0。
  • 8 ≥ 8 → 1, remainder 0.
       8 ≥ 8 → 1,余数为 0。
  • 0 for remainder 4, 2, 1 → 0, 0, 0.

Thus 200₁₀ = 11001000₂. Always align the bits as an 8‑bit byte, adding leading zeros if necessary.

因此 200₁₀ = 11001000₂。始终将比特排列为 8 位字节,必要时补上前导零。


5. Binary Addition | 二进制加法

Binary addition follows four simple rules: 0 + 0 = 0, 1 + 0 = 0 + 1 = 1, 1 + 1 = 0 carry 1, and 1 + 1 + carry 1 = 1 carry 1. You need to be able to add two 8‑bit binary numbers and show the result in 8 bits, noting any overflow.

二进制加法遵循四条简单规则:0 + 0 = 0,1 + 0 = 0 + 1 = 1,1 + 1 = 0 进位 1,以及 1 + 1 + 进位 1 = 1 进位 1。你必须能够将两个 8 位二进制数相加,并以 8 位结果表示,同时注意任何溢出。

Example: Add 01011010₂ (90) and 00101100₂ (44).

示例:计算 01011010₂(90)与 00101100₂(44)之和。

 0 1 0 1 1 0 1 0
+ 0 0 1 0 1 1 0 0
――――――――――――
 1 0 0 0 0 1 1 0   (carry bits shown above columns)

Work from right to left: 0+0=0; 1+0=1; 0+1=1; 1+1=0 carry 1; 1+0+carry1=0 carry 1; 0+1+carry1=0 carry 1; 1+0+carry1=0 carry 1; 0+0+carry1=1. Result: 10000110₂ (134). No overflow because the numbers were within range.

从右向左逐列运算:0+0=0;1+0=1;0+1=1;1+1=0 进位1;1+0+进位1=0 进位1;0+1+进位1=0 进位1;1+0+进位1=0 进位1;0+0+进位1=1。结果为 10000110₂(134)。由于数字都在范围内,没有产生溢出。


6. Overflow in Binary Addition | 二进制加法的溢出

Overflow occurs when the result of an addition exceeds the maximum value that can be stored in the given number of bits. For an 8‑bit register, values can range from 0 to 255. If two numbers add up to more than 255, a ninth bit would be required. In an 8‑bit system, that extra bit is lost and the stored result appears incorrect.

当加法运算的结果超出给定比特数所能存储的最大值时,就会发生溢出。对于 8 位寄存器,可存储的值范围是 0 到 255。如果两个数相加的结果大于 255,就需要第九位比特。在 8 位系统中,额外的那一位会丢失,存储的结果看上去就是错误的。

Example: 11001100₂ (204) + 10101010₂ (170). After addition you get a carry into the 9th bit, resulting in 1 01110110₂, but the 8‑bit result stored is 01110110₂ (118). This is clearly wrong, and the overflow flag would be set in the processor.

示例:11001100₂(204) + 10101010₂(170)。相加后会产生向第 9 位的进位,得到 1 01110110₂,但实际存储的 8 位结果是 01110110₂(118)。这显然是错误的,处理器会因此置位溢出标志。

You can predict overflow: if the sum of two denary numbers exceeds 255, or if a carry into the 9th bit occurs in binary addition, overflow has happened.

你可以预判溢出:如果两个十进制数的和大于 255,或者在二进制加法中产生了向第 9 位的进位,那么就发生了溢出。


7. Logical Binary Shifts | 逻辑移位

A logical shift moves every bit in a binary number left or right by a specified number of places. Zeros are shifted into the empty positions, and bits that fall off the end are discarded. An n‑place shift has a predictable effect on the number’s value.

逻辑移位是将二进制数中的每一个比特向左或向右移动指定的位数。腾出的空位补 0,移出边界的比特则被丢弃。n 位移位会对数值产生可预测的影响。

  • Logical left shift – multiply by 2ⁿ. For example, shifting 00001101₂ (13) left by 2 places gives 00110100₂ (52). 13 × 2² = 52.
  • 逻辑左移:相当于乘以 2ⁿ。例如,将 00001101₂(13)左移 2 位得到 00110100₂(52)。13 × 2² = 52。
  • Logical right shift – divide by 2ⁿ, discarding any fractional part. Shifting 00101100₂ (44) right by 2 places gives 00001011₂ (11). 44 ÷ 4 = 11. (Remainder is lost.)
  • 逻辑右移:相当于除以 2ⁿ,丢弃小数部分。将 00101100₂(44)右移 2 位得到 00001011₂(11)。44 ÷ 4 = 11。(余数丢失。)

Be careful: shifting beyond the 8‑bit boundary will discard the high bits, which can cause a loss of data. For a left shift, if a 1 is shifted out of the most significant bit, overflow in a multiplication sense occurs.

注意:移位数超过 8 位边界会丢弃高位比特,导致数据丢失。对于左移,如果有 1 移出最高有效位,就发生了乘法意义上的溢出。


8. Introduction to Hexadecimal | 十六进制简介

Hexadecimal (base‑16) is a shorthand for binary. It uses sixteen symbols: 0–9 and A (10), B (11), C (12), D (13), E (14), F (15). Because 16 is 2⁴, each hex digit directly corresponds to a group of 4 binary bits (a nibble). This makes it much easier to read and write long binary sequences.

十六进制(基数为 16)是二进制的一种简写方式。它使用十六个符号:0–9 和 A(10)、B(11)、C(12)、D(13)、E(14)、F(15)。因为 16 = 2⁴,每个十六进制数字正好对应 4 个二进制比特(即一个半字节)。这使得读写长二进制序列变得容易得多。

A byte (8 bits) is represented by exactly two hex digits. For example, 11011001₂ can be split into 1101 (D) and 1001 (9), so the hex value is D9₁₆. You must be able to convert freely between binary, denary and hex.

一个字节(8 比特)可以精确地用两个十六进制数字表示。例如,11011001₂ 可以拆分为 1101(D)和 1001(9),因此十六进制值为 D9₁₆。你必须能够自由地在二进制、十进制和十六进制之间进行转换。


9. Converting Between Binary, Denary and Hexadecimal | 二进制、十进制与十六进制互转

Three conversions are most frequently examined:

最常考的三种转换如下:

Binary → Hex: group bits into nibbles from the right. Add leading zeros to make a complete nibble if needed. Convert each nibble to the corresponding hex digit.

二进制转十六进制:从右向左将比特每 4 个分为一组(半字节),如有必要在左侧补零构成完整的半字节。将每个半字节转换为对应的十六进制数字。

Example: 101110₂ → 0010 1110 → 2E₁₆.

示例:101110₂ → 0010 1110 → 2E₁₆。

Hex → Binary: replace each hex digit with its 4‑bit binary equivalent. Do not add extra spaces; just write the nibbles in order.

十六进制转二进制:将每个十六进制数字替换为对应的 4 比特二进制。不要添加额外空格,按顺序写出半字节即可。

Example: A3₁₆ → 1010 0011 → 10100011₂.

示例:A3₁₆ → 1010 0011 → 10100011₂。

Denary → Hex: convert the denary number to binary first (or divide repeatedly by 16), then group into nibbles. Alternatively, use the division‑by‑16 method, taking remainders as hex digits.

十进制转十六进制:先将十进制数转换为二进制(或者反复除以 16),再分组为半字节。也可用除 16 取余法,将余数写成十六进制数字。

Example: 200₁₀ → binary 11001000 → 1100 1000 → C8₁₆.

示例:200₁₀ → 二进制 11001000 → 1100 1000 → C8₁₆。


10. Why Hexadecimal is Used in Computing | 计算机中为何使用十六进制

Hexadecimal is not used because computers calculate in base 16; machines still use binary internally. Hex is a convenience for humans. It is far more compact and less error‑prone when displaying memory addresses, colour codes, and error messages. For example, a 32‑bit binary instruction is unwieldy, but its 8‑digit hex version is manageable.

十六进制并非因为计算机本身以十六进制运算;机器内部依然使用二进制。十六进制是为了方便人类而使用的。在显示内存地址、颜色代码和错误信息时,十六进制紧凑得多,也不容易出错。例如,一条 32 位的二进制指令非常冗长,而它对应的 8 位十六进制版本就很容易处理。

In web design, colours are often given as a 6‑digit hex string: #FF0077 represents red=FF, green=00, blue=77. This is a direct representation of three 8‑bit colour channels. Hex also appears in MAC addresses and ASCII tables.

在网页设计中,颜色常用 6 位十六进制字符串表示:#FF0077 代表红=FF、绿=00、蓝=77。这直接表示了三个 8 位颜色通道。十六进制还出现在 MAC 地址和 ASCII 表中。


11. Common Exam Pitfalls and Tips | 常见失分点与应试技巧

Even strong students lose marks through small slips. Watch out for these:

即使是成绩优秀的学生也可能因为小失误而丢分。请留意以下几点:

  • Forgetting to write binary in groups of 8 bits. Always show leading zeros in your final answer when the question asks for an 8‑bit representation.
    忘记以 8 位为单位书写二进制。当题目要求 8 位表示时,最终答案一定要包含前导零。
  • Mixing up nibble grouping direction. When converting to hex, group from the right, not the left.
    搞错半字节分组方向。转换为十六进制时,要从右开始分组,而不是从左。
  • Binary addition carry errors. Work slowly, write down carry bits above the columns.
    二进制加法进位错误。慢下来,在列上方标明进位比特。
  • Ignoring overflow effects in shifts. If a 1 is shifted out on a left shift, the value is not simply multiplied – data has been lost.
    忽略移位中的溢出效应。如果左移时有 1 被移出,数值并非简单相乘——数据已经丢失。
  • Hex digit case. Although Edexcel often accepts upper or lower case, it is safest to use uppercase A–F to avoid ambiguity.
    十六进制字母大小写。尽管 Edexcel 通常同时接受大小写,但为避免歧义,最稳妥的做法是使用大写 A–F。

Practice plenty of past paper questions. Many conversion questions carry multiple marks, and clear working can earn method marks even if the final answer is incorrect.

多做真题练习。很多转换类题目分值不低,清晰的解题过程甚至能在最终答案错误时帮你拿到方法分。


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