📚 GCSE CIE Computer Science: Calculation Practice Intensive | GCSE CIE 计算机科学:计算题专项训练
Success in CIE IGCSE Computer Science depends heavily on mastering calculation questions, from number conversions to file size estimation. This intensive revision guide covers all topic areas where you need to apply precise arithmetic and logical steps.
在 CIE IGCSE 计算机科学中,能否掌握各类计算题——从进制转换到文件大小估算——直接影响考试得分。本专项训练指南覆盖了所有需要你运用精确算术和逻辑步骤的考点。
1. Binary and Denary Conversions | 二进制与十进制转换
Binary numbers use base 2 with digits 0 and 1, while denary (decimal) uses base 10. Every binary bit has a place value that is a power of 2, starting from 1 on the right.
二进制使用基数为2的数字0和1,而十进制基数为10。每个二进制位都有一个权值,该权值是2的幂次,从最右边的1开始。
To convert binary to denary, add the place values of bits that are 1. For example, 1101₂ = (1×8) + (1×4) + (0×2) + (1×1) = 13₁₀.
将二进制转换为十进制时,将所有为1的位所对应的权值相加。例如,1101₂ = (1×8)+(1×4)+(0×2)+(1×1)=13₁₀。
To convert denary to binary, use repeated division by 2 or subtract the largest power of 2. For 79: 79 – 64 = 15, 15 – 8 = 7, 7 – 4 = 3, 3 – 2 = 1, 1 – 1 = 0, giving binary 1001111₂ (often written as 0100 1111 in 8 bits).
将十进制转为二进制,可使用连续除以2取余法,或减去最大2的幂。以79为例:79-64=15,15-8=7,7-4=3,3-2=1,1-1=0,得到二进制1001111₂(8位表示常写为0100 1111)。
Place values: … 128 64 32 16 8 4 2 1
2. Binary Addition and Overflow | 二进制加法与溢出
Binary addition follows four basic rules: 0+0=0, 0+1=1, 1+0=1, 1+1=0 carry 1. You add column by column from right to left, carrying over when the sum reaches 2.
二进制加法遵循四条基本规则:0+0=0、0+1=1、1+0=1、1+1=0并向左进1。从右向左逐列相加,当和为2时进位。
Example: 1010₂ (10) + 0110₂ (6) = 10000₂ (16). Observe that with 4-bit registers, this result exceeds the range and causes an overflow error because the carry into the most significant bit changes the sign in two’s complement.
示例:1010₂ (10) + 0110₂ (6) = 10000₂ (16)。在4位寄存器中,这个结果超出了表示范围,会导致溢出错误,因为在补码表示中最高位进位会改变符号。
1 0 1 0
+ 0 1 1 0
─────────
1 0 0 0 0
Overflow occurs when the result of an addition is too large to fit into the allocated number of bits. Detecting it involves checking the carry into and out of the sign bit.
当加法结果超出分配给指定位数时,就会发生溢出。检测溢出需要检查符号位的进位和出位情况。
3. Hexadecimal Conversions and Uses | 十六进制转换与应用
Hexadecimal (base 16) uses digits 0–9 and letters A–F. It provides a compact way to represent binary, since one hex digit corresponds to 4 bits (a nibble).
十六进制(基16)使用数字0-9和字母A-F。它提供了一种紧凑的二进制表示方式,因为一个十六进制位对应4个二进制位(半字节)。
To convert binary to hex, group bits into nibbles from the right, then convert each group. Example: 1101 0110₂ → D6₁₆.
将二进制转为十六进制,从右向左每4位一组,然后转换每组。例如:1101 0110₂ → D6₁₆。
To convert denary to hex, divide by 16 successively or first convert to binary. Example: 255₁₀ = FF₁₆.
将十进制转为十六进制,可通过连续除以16或先转为二进制。例如:255₁₀ = FF₁₆。
4. Logic Gate Calculations | 逻辑门计算
Logic gates perform Boolean operations. You need to be able to calculate output of combinational circuits given inputs. The core gates are AND (output 1 only if all inputs 1), OR (output 1 if any input 1), NOT (inverts), NAND (AND followed by NOT), NOR, and XOR.
逻辑门执行布尔运算。你需要能够根据输入计算组合电路的输出。基本门包括与门(仅当所有输入为1时输出1)、或门(任一输入为1时输出1)、非门(取反)、与非门(与后取反)、或非门和异或门。
Example: For inputs A=1, B=0 into a circuit (A AND B) OR (NOT A). First, A AND B = 0. NOT A = 0. Then 0 OR 0 = 0. So output is 0.
示例:输入A=1、B=0,电路为(A AND B) OR (NOT A)。首先A AND B = 0。NOT A = 0。然后0 OR 0 = 0,输出为0。
| A | B | A AND B | NOT A | Output |
|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 1 |
| 0 | 1 | 0 | 1 | 1 |
| 1 | 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 0 | 1 |
5. Calculating Text File Sizes | 文本文件大小计算
Text file size depends on the number of characters and the bits per character. Standard ASCII uses 7 bits (often stored as 8 bits), while Unicode may use 16 or 32 bits per character.
文本文件大小取决于字符数和每个字符的
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课程辅导,国外大学本科硕士研究生博士课程论文辅导