📚 Binary Numbers | 二进制数
Binary is a base-2 number system that uses only the digits 0 and 1. It is the foundation of all modern computing and digital electronics. In the Edexcel IGCSE Mathematics syllabus, you need to understand binary place values, conversions between binary and denary, binary arithmetic, and simple applications. This article will guide you through every key concept step by step.
二进制是一种以2为基数的数字系统,只使用0和1两个数字。它是现代计算和数字电子技术的基础。在Edexcel IGCSE数学考纲中,你需要理解二进制的位值、二进制与十进制之间的转换、二进制算术以及简单应用。本文将一步步带你掌握每个关键概念。
1. Why Binary? | 为什么用二进制?
The word “binary” means “two” or “two-fold”. A binary system has exactly two symbols: 0 and 1. In a computer, these two symbols are represented by physical states such as high/low voltage, on/off switch, or magnetic charge direction. Using only two states makes hardware simple, reliable, and cheap to build.
“二进制”一词意为“二”或“二重”。二进制系统恰好有两个符号:0和1。在计算机中,这两个符号通过物理状态表示,比如高/低电压、开/关开关或磁荷方向。仅使用两种状态使硬件简单、可靠且制造成本低廉。
Denary (base 10) uses ten digits: 0,1,2,3,4,5,6,7,8,9. When you see the number 255, it represents 2 hundreds, 5 tens, and 5 ones. The value of each digit depends on its position, and each position is a power of 10. Binary works in exactly the same way, but every position is a power of 2.
十进制使用十个数字:0,1,2,3,4,5,6,7,8,9。当你看到数字255时,它代表2个百、5个十和5个一。每个数字的值取决于其位置,而每个位置都是10的幂。二进制的工作原理完全相同,只是每个位置都是2的幂。
2. Place Values in Binary | 二进制的位值
In a binary number, the position of each digit corresponds to a power of 2. The rightmost digit is the 2⁰ place (units), the next digit to the left is 2¹ (twos), then 2² (fours), 2³ (eights), and so on. The powers increase by one each time you move one place to the left.
在二进制数中,每个数字的位置对应一个2的幂。最右边的数字是2⁰位(个位),其左边一位是2¹位(二倍位),再向左是2²位(四倍位)、2³位(八倍位),依此类推。每向左移动一位,幂就增加1。
The binary number 1011 can be expanded as:
1011₂ = 1 × 2³ + 0 × 2² + 1 × 2¹ + 1 × 2⁰
This equals 8 + 0 + 2 + 1 = 11 in denary. The subscript ₂ indicates the base of the number.
二进制数1011可以展开为:
1011₂ = 1 × 2³ + 0 × 2² + 1 × 2¹ + 1 × 2⁰
它的十进制值等于8 + 0 + 2 + 1 = 11。下标₂表示该数的进制。
| Power of 2 | 2⁷ | 2⁶ | 2⁵ | 2⁴ | 2³ | 2² | 2¹ | 2⁰ |
| Denary value | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
An 8-bit binary number can represent values from 00000000₂ = 0 to 11111111₂ = 255. That is why the number 255 is so important in computing: it is the maximum value of a single byte.
一个8位二进制数可以表示从00000000₂ = 0到11111111₂ = 255的所有值。这就是为什么255在计算中如此重要:它是一个字节(byte)所能表示的最大值。
3. Converting Binary to Denary | 二进制转十进制
To convert a binary number to denary, write down the place values above each digit, then add together all the place values where the binary digit is 1. If the digit is 0, skip that place.
要将二进制数转换为十进制,请在每个数字上方写出对应的位值,然后将二进制数字为1的那些位值全部相加。如果某个数字是0,则跳过该位。
Example: Convert 11010010₂ to denary.
示例:将11010010₂转换为十进制。
Write the place values from 2⁷ to 2⁰ under the digits:
在数字下方写出从2⁷到2⁰的位值:
| Binary digit | 1 | 1 | 0 | 1 | 0 | 0 | 1 | 0 |
| Place value | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
Add the values: 128 + 64 + 16 + 2 = 210. Therefore 11010010₂ = 210.
将这些位值相加:128 + 64 + 16 + 2 = 210。因此11010010₂ = 210。
4. Converting Denary to Binary | 十进制转二进制
There are two common methods to convert a denary number to binary: repeated division by 2, or subtracting powers of 2. The Edexcel syllabus accepts both methods.
将十进制数转换为二进制有两种常用方法:反复除以2,或减去2的幂。Edexcel考纲对两种方法都接受。
Method 1: Repeated division by 2.
方法1:反复除以2。
Take the denary number and divide it by 2. Record the remainder (0 or 1). Continue dividing the quotient by 2 until the quotient becomes 0. Then read the remainders upwards, from the last remainder to the first.
将十进制数除以2,记录余数(0或1)。继续将商除以2,直到商为0。然后从最后得到的余数开始,向上读取所有余数。
Example: Convert 29 to binary.
示例:将29转换为二进制。
| Division | Quotient | Remainder |
| 29 ÷ 2 | 14 | 1 |
| 14 ÷ 2 | 7 | 0 |
| 7 ÷ 2 | 3 | 1 |
| 3 ÷ 2 | 1 | 1 |
| 1 ÷ 2 | 0 | 1 |
Reading the remainders from bottom to top gives 11101₂. So 29 = 11101₂.
从下往上读取余数得到11101₂。因此29 = 11101₂。
Method 2: Repeatedly subtract the largest power of 2 that is ≤ the current number. If you use 16, 8, 4, 2, 1, mark a 1 for each used power and a 0 for each skipped power.
方法2:反复减去不超过当前数的最大2的幂。如果依次尝试16、8、4、2、1,则对于用到的幂记1,对于跳过的幂记0。
For 29: 29 − 16 = 13 (use 16), 13 − 8 = 5 (use 8), 5 − 4 = 1 (use 4), 1 − 2 = impossible (skip 2), 1 − 1 = 0 (use 1). The binary is 11101.
对于29:29 − 16 = 13(用16),13 − 8 = 5(用8),5 − 4 = 1(用4),1 − 2 = 不行(跳过2),1 − 1 = 0(用1)。二进制为11101。
5. Binary Addition | 二进制加法
Binary addition follows four simple rules:
二进制加法遵循四条简单规则:
-
0 + 0 = 0
0 + 0 = 0
-
0 + 1 = 1
0 + 1 = 1
-
1 + 0 = 1
1 + 0 = 1
-
1 + 1 = 0, carry 1
1 + 1 = 0,进1
If the sum of two digits is 2, we write 0 and carry 1 to the next left column. If the sum is 3 (i.e. 1 + 1 + a previous carry of 1), we write 1 and carry 1.
如果两个数字之和为2,我们写0并向左一列进1。如果和为3(即1 + 1 + 来自前一位的进位1),我们写1并进1。
Example: Add 1011₂ and 1101₂.
示例:计算1011₂ + 1101₂。
Align the numbers, then add from right to left:
将数字对齐,然后从右向左相加:
1 0 1 1₂
+ 1 1 0 1₂
= 1 1 0 0 0₂
Check in denary: 11 + 13 = 24, and 11000₂ = 16 + 8 = 24. The answer is correct.
用十进制检验:11 + 13 = 24,而11000₂ = 16 + 8 = 24。答案正确。
6. Binary Subtraction | 二进制减法
Binary subtraction is completed column by column from right to left. The rules are:
二进制减法从右到左逐列进行。规则如下:
-
0 − 0 = 0
0 − 0 = 0
-
1 − 0 = 1
1 − 0 = 1
-
1 − 1 = 0
1 − 1 = 0
-
0 − 1 = 1, borrow 1 from the next left column (turning that column’s digit into 0)
0 − 1 = 1,从左邻列借1(使该列数字变为0)
Example: Subtract 101₂ from 1110₂.
示例:计算1110₂ − 101₂。
Set up the subtraction:
列出竖式:
1 1 1 0₂
− 0 1 0 1₂
= 1 0 0 1₂
In the rightmost column, 0 − 1 requires a borrow from the next column. After borrowing, the result is 1. Continue subtracting normally. The answer 1001₂ = 9, and 14 − 5 = 9, so it is correct.
最右列中,0 − 1需要从下一列借位。借位后结果为1。继续正常相减。答案1001₂ = 9,而14 − 5 = 9,因此正确。
7. Binary Multiplication and Division | 二进制乘法与除法
Binary multiplication is similar to denary multiplication, but the only digits are 0 and 1. You multiply by each digit of the second number, shift left appropriately, then add the partial products.
二进制乘法与十进制乘法类似,但只有0和1两个数字。用第二个数的每一位去乘,适当左移,然后将各部分积相加。
Rule: 0 × 0 = 0, 0 × 1 = 0, 1 × 0 = 0, 1 × 1 = 1.
规则:0 × 0 = 0,0 × 1 = 0,1 × 0 = 0,1 × 1 = 1。
Example: Multiply 101₂ by 11₂.
示例:计算101₂ × 11₂。
1 0 1₂
× 1 1₂
= 1 1 1 1₂
This is 5 × 3 = 15, and 1111₂ = 8 + 4 + 2 + 1 = 15.
即5 × 3 = 15,而1111₂ = 8 + 4 + 2 + 1 = 15。
Binary division can be done by repeated subtraction. For simple cases, you can convert to denary, divide, then convert back, but the course expects you to understand the binary process.
二进制除法可以通过重复减法完成。对于简单情况,你可以先转成十进制再相除,然后再转回二进制,但课程要求你理解二进制过程本身。
8. Representing Negative Binary Numbers | 负数的二进制表示
In IGCSE Edexcel Mathematics, you may encounter two’s complement representation. The most significant bit (the leftmost bit) is the sign bit. If it is 0, the number is positive; if it is 1, the number is negative.
在Edexcel IGCSE数学中,你可能会遇到“二进制补码”表示法。最高有效位(最左边的位)是符号位。如果它是0,则数为正;如果它是1,则数为负。
For an 8-bit two’s complement number, the place values are:
对于8位二进制补码数,其位值为:
| −2⁷ | 2⁶ | 2⁵ | 2⁴ | 2³ | 2² | 2¹ | 2⁰ |
The leftmost place value is −128 instead of +128. For example, 10000011₂ = −128 + 2 + 1 = −125.
最左边的位值是−128而不是+128。例如,10000011₂ = −128 + 2 + 1 = −125。
To find the two’s complement of a number, invert all bits (0 becomes 1, 1 becomes 0) and then add 1. For example, the two’s complement of 00001100₂ (12) is 11110011₂ + 1 = 11110100₂, which represents −12.
要得到一个数的补码,先将所有位取反(0变1,1变0),然后加1。例如,00001100₂(12)的补码是11110011₂ + 1 = 11110100₂,表示−12。
9. Binary Fractions | 二进制小数
Binary numbers can also have a fractional part after a binary point. The place values to the right of the binary point are 2⁻¹, 2⁻², 2⁻³, and so on, which correspond to ½, ¼, ⅛, etc.
二进制数在“二进制小数点”之后也可以有小数部分。二进制小数点右侧的位值为2⁻¹、2⁻²、2⁻³等,分别对应½、¼、⅛等。
Example: 101.101₂ = 4 + 1 + ½ + ⅛ = 5.625 in denary.
示例:101.101₂ = 4 + 1 + ½ + ⅛ = 5.625(十进制)。
| 2² | 2¹ | 2⁰ | . | 2⁻¹ | 2⁻² | 2⁻³ |
| 4 | 2 | 1 | . | 0.5 | 0.25 | 0.125 |
To convert a denary fraction to binary, repeatedly multiply the fractional part by 2. The integer part of each product becomes the next binary digit.
要将十进制小数转换为二进制,反复将小数部分乘以2。每次乘积的整数部分成为下一个二进制数字。
For 0.375: 0.375 × 2 = 0.75 (digit 0); 0.75 × 2 = 1.5 (digit 1); 0.5 × 2 = 1.0 (digit 1). So 0.375 = 0.011₂.
对于0.375:0.375 × 2 = 0.75(数字0);0.75 × 2 = 1.5(数字1);0.5 × 2 = 1.0(数字1)。所以0.375 = 0.011₂。
10. 255 and the Byte | 255与字节
An 8-bit binary number has eight places. The largest 8-bit binary number is 11111111₂, which equals:
一个8位二进制数有八个位。最大的8位二进制数是11111111₂,它等于:
128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255
Because a byte is 8 bits, the maximum value stored in one byte is 255. This appears in computer colour codes, memory addresses, and image brightness values. In binary, 255 is written as eight consecutive 1s.
因为一个字节是8位,一个字节能存储的最大值是255。这出现在计算机颜色代码、内存地址和图像亮度值中。在二进制中,255写成八个连续的1。
The smallest 8-bit binary number is 00000000₂ = 0. So one byte can represent 256 different values in total, from 0 to 255.
最小的8位二进制数是00000000₂ = 0。因此一个字节总共可以表示256个不同的值,即从0到255。
11. Applications in Computing | 二进制在计算机中的应用
Computers use binary to store and process all data. Every character you type is converted into a binary code. For example, in the ASCII code, the capital letter ‘A’ is represented as 01000001₂ = 65.
计算机使用二进制来存储和处理所有数据。你输入的每个字符都会被转换成二进制代码。例如,在ASCII码中,大写字母’A’表示为01000001₂ = 65。
Images are stored as a grid of pixels, where each pixel has a brightness value between 0 and 255 if stored in one byte. Sound files are also sampled and each sample is encoded as a binary number.
图像以像素网格形式存储,如果使用一个字节存储,每个像素有一个介于0到255之间的亮度值。声音文件同样被采样,每个样本都编码为一个二进制数。
Logic gates inside processors operate using binary signals. A circuit outputs 0 or 1 depending on the input voltages. The rules of binary arithmetic are implemented with logic gates such as AND, OR, and XOR.
处理器内部的逻辑门使用二进制信号运行。电路根据输入电压输出0或1。二进制算术规则是通过与门、或门、异或门等逻辑门实现的。
12. Exam Tips | 考试要点
When converting from binary to denary, draw the place values above the digits to avoid careless mistakes. Double-check your final answer by converting it back to binary.
将二进制转换为十进制时,在数字上方写出位值,以避免粗心错误。通过将答案转回二进制来检查最终结果。
For addition, always start from the rightmost column and carry over correctly. If you confuse the order, the result will be wrong. In subtraction, take care with borrowing: one borrowed in binary is worth two in the current column.
进行加法时,务必从最右列开始并正确处理进位。如果顺序弄错,结果就会出错。在减法中,注意借位:二进制中借1在当前列相当于2。
Memorise the powers of 2 up to at least 2⁷ = 128. This will speed up conversions and help you spot mistakes. Remember that 2⁰ = 1, not 0.
至少记住2⁷ = 128以内的2的幂。这能加快转换速度并帮助你发现错误。记住2⁰ = 1,而不是0。
If you are given a binary number with a subscript, such as 1111₂, use the subscript in your working. If no subscript is given, the context will usually make the base clear. In exam questions, always state the base of your
Published by TutorHao | IGCSE Mathematics Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)
屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导Cancel reply