IGCSE AQA Computer Science: Calculation Practice | IGCSE AQA 计算机:计算题专项训练

📚 IGCSE AQA Computer Science: Calculation Practice | IGCSE AQA 计算机:计算题专项训练

Calculations are integral to the IGCSE AQA Computer Science specification. This revision guide covers essential numerical techniques—from number bases and logic to file sizes and error detection—helping you master the quantitative skills needed for the exam. Practise each method and check your answers carefully.

计算题是 IGCSE AQA 计算机科学课程的核心部分。本复习指南涵盖从数制转换、逻辑运算到文件大小及错误检测等关键计算技巧,助你掌握考试所需的定量技能。勤练每种方法并仔细核对答案。

1. Binary to Denary Conversion | 二进制转十进制

To convert a binary number to denary, multiply each bit by its place value, which is a power of 2, starting from the rightmost bit (2⁰). Then add all the products.

要将二进制数转换为十进制,将每一位乘以其位权值(2的幂),从最右边的位(2⁰)开始。然后将所有乘积相加。

Example: Convert 101101₂ to denary.

例子:将 101101₂ 转换为十进制。

101101₂ = (1×2⁵) + (0×2⁴) + (1×2³) + (1×2²) + (0×2¹) + (1×2⁰) = 32 + 0 + 8 + 4 + 0 + 1 = 45


2. Denary to Binary Conversion | 十进制转二进制

One common method is repeated division by 2. Keep dividing the denary number by 2, recording the remainder each time. Read the remainders from bottom to top to form the binary number.

一种常用方法是不断除以2。将十进制数不断除以2,每次都记录余数。从下往上读取余数即得到二进制数。

Example: Convert 29 to binary. 29 ÷ 2 = 14 remainder 1; 14 ÷ 2 = 7 rem 0; 7 ÷ 2 = 3 rem 1; 3 ÷ 2 = 1 rem 1; 1 ÷ 2 = 0 rem 1. Reading remainders upward: 11101₂.

例子:将29转换为二进制。29 ÷ 2 = 14 余 1;14 ÷ 2 = 7 余 0;7 ÷ 2 = 3 余 1;3 ÷ 2 = 1 余 1;1 ÷ 2 = 0 余 1。余数向上读:11101₂。

29₁₀ = 11101₂


3. Hexadecimal Conversions | 十六进制转换

Hexadecimal uses digits 0-9 and letters A-F (10-15). To convert binary to hex, group bits into nibbles (4 bits) and convert each nibble. To convert denary to hex, divide by 16 repeatedly.

十六进制使用数字0-9和字母A-F(代表10-15)。二进制转十六进制时,将位按4位一组分组,转换每组;十进制转十六进制则反复除以16。

Example: Convert 10101111₂ to hex. Group as 1010 1111. 1010₂ = A (10), 1111₂ = F (15). So hex is AF₁₆.

例子:将 10101111₂ 转换为十六进制。分组为 1010 1111。1010₂ = A(10),1111₂ = F(15)。所以十六进制为 AF₁₆。

Denary to hex: 203 ÷ 16 = 12 rem 11, 12 ÷ 16 = 0 rem 12. Remainders read upward: 12 (C) then 11 (B) → CB₁₆.

十进制转十六进制:203 ÷ 16 = 12 余 11,12 ÷ 16 = 0 余 12。余数向上读:12(C)然后是11(B)→ CB₁₆。

10101111₂ = AF₁₆, 203₁₀ = CB₁₆


4. Binary Addition and Overflow | 二进制加法与溢出

Add binary numbers column by column, carrying 1 to the next column when the sum is 2 (10₂) or 3 (11₂). If the result exceeds the bit-width (e.g. 8 bits) and the carry into the most significant bit is different from the carry out, an overflow error occurs.

按列相加二进制数,当和为2(10₂)或3(11₂)时向下一列进位1。如果结果超出位宽(如8位)且最高位的进位与进位输出不同,则发生溢出错误。

Example: Add 01011010₂ (90) and 01100101₂ (101) using 8 bits. 01011010 + 01100101 = 10111111₂ (191), no overflow. But 10000000₂ (128) + 10000000₂ (128) = 1 00000000₂, the result is 0 with carry out of 1 → overflow because carry into MSB is 0, carry out is 1 in 8‑bit signed interpretation.

例子:用8位计算 01011010₂(90)+ 01100101₂(101)= 10111111₂(191),无溢出。但 10000000₂(128)+ 10000000₂(128)= 1 00000000₂,结果写入8位为0且进位输出1,在带符号8位表示中溢出(进位入MSB=0,进位出=1)。

更多咨询请联系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