Year 9 SQA Computing: Mock Unit Test Walkthrough | SQA 九年级计算机:单元测试模拟卷解析

📚 Year 9 SQA Computing: Mock Unit Test Walkthrough | SQA 九年级计算机:单元测试模拟卷解析

Welcome to our step-by-step walkthrough of a typical Year 9 SQA Computing mock unit test. This guide will help you review essential topics, from number systems and flowcharts to networking and logic gates. Each question is followed by a clear answer and detailed explanation, so you can strengthen your understanding and avoid common mistakes in your real test.

欢迎阅读这篇针对九年级 SQA 计算机模拟单元测试的逐步解析。本指南将帮助你复习从数字系统和流程图到网络和逻辑门等关键主题。我们为每道题给出了明确的答案和详细的中英文解释,助你巩固知识,在实际考试中避开常见错误。


1. Question 1: Binary to Decimal Conversion | 二进制转十进制转换

Question: Convert the binary number 1101₂ to decimal. Show your working.

题目:将二进制数 1101₂ 转换为十进制。写出演算过程。

Answer: The decimal equivalent of 1101₂ is 13₁₀.

答案:1101₂ 的十进制表示是 13₁₀。

To convert binary to decimal, write the place values as powers of 2, starting from 2⁰ on the right. For a 4-bit number, the place values are 2³ (8), 2² (4), 2¹ (2), and 2⁰ (1).

将二进制转换为十进制时,从右向左写出以 2 为底的位权值,最右边是 2⁰。对于 4 位二进制数,位权值依次为 2³ (8)、2² (4)、2¹ (2) 和 2⁰ (1)。

Now multiply each binary digit by its place value: 1 × 8 = 8, 1 × 4 = 4, 0 × 2 = 0, 1 × 1 = 1. Add the results: 8 + 4 + 0 + 1 = 13.

将每一位二进制数字与对应位权值相乘:1×8=8,1×4=4,0×2=0,1×1=1。把乘积相加:8+4+0+1=13。

A common error is to read the place values from left to right as 1, 2, 4, 8 instead of the correct order. Always double-check the powers of 2.

常见错误是把左起第一位误认为位权 1,然后依次 2、4、8。务必确认正确顺序:从右向左幂次增大。


2. Question 2: Decimal to Binary Conversion | 十进制转二进制转换

Question: Convert the decimal number 25 to binary using division by 2. Write the binary answer as an 8-bit number.

题目:采用除 2 取余法把十进制数 25 转换成二进制,并写出 8 位二进制表示。

Answer: 25₁₀ = 00011001₂ (in 8-bit representation).

答案:25₁₀ = 00011001₂(8 位二进制形式)。

Divide 25 repeatedly by 2 and record the remainders. 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.

反复把 25 除以 2 并记录余数:25 ÷ 2 = 12 余 1,12 ÷ 2 = 6 余 0,6 ÷ 2 = 3 余 0,3 ÷ 2 = 1 余 1,1 ÷ 2 = 0 余 1。

Read the remainders from bottom to top to get 11001. To make it an 8-bit value, add three leading zeros: 00011001₂.

从下往上读出余数得到 11001。为了凑足 8 位,在前面补三个零,成为 00011001₂。

Remember that in computing, data is often stored in groups of 8 bits (one byte). Showing the leading zeros clarifies the full representation.

请记住,计算机中数据常以 8 位(一个字节)为一组存储。写出前导零可以明确完整的表示形式。


3. Question 3: Flowchart Logic | 流程图逻辑判断

Question: Study the flowchart below: Start → Input A, Input B → Decision: Is A > B? → If Yes, Output A; If No, Output B → Stop. If the inputs are A=7 and B=12, what is the output?

题目:阅读如下流程图:开始 → 输入 A、输入 B → 判断 A > B?→ 若是,输出 A;若否,输出 B → 结束。当输入 A=7、B=12 时,输出结果是什么?

Answer: The program will output 12.

答案:程序将输出 12。

The flowchart describes a simple selection (if-else) structure. The condition ‘Is A > B?’ compares the two numbers. Since 7 is not greater than 12, the condition is false, so the ‘No’ path is taken and B is output.

该流程图描述了一个简单的选择(if-else)结构。条件“A > B?”对两数进行比较。因为 7 不大于 12,条件为假,所以走“否”分支并输出 B 的值。

Understanding flowchart symbols is essential: a diamond represents a decision, a parallelogram represents input/output, and a rectangle represents a process. Always follow the arrows carefully.

理解流程图符号很关键:菱形表示判断,平行四边形表示输入/输出,矩形表示处理步骤。务必认真跟随箭头方向执行。


4. Question 4: Variables and Data Types | 变量与数据类型

Question: A student writes the following variable name: 3rdScore. Explain whether this is a valid variable name in most programming languages. Then identify a suitable data type for storing the value 95.5 in a variable called averageMark.

题目:一位学生写下变量名 3rdScore。请解释在大多数编程语言中,这个变量名是否合法。然后,为存储 95.5 这个值的变量 averageMark 指出合适的数据类型。

Answer: 3rdScore is not valid because variable names cannot begin with a digit. The value 95.5 should be stored as a float (or real) data type.

答案:3rdScore 不合法,因为变量名不能以数字开头。值 95.5 应使用浮点型(或实型)存储。

In languages like Python, Java, or Scratch, identifiers must start with a letter or underscore, not a digit. They can contain letters, digits, and underscores afterwards. Also, reserved words cannot be used.

在 Python、Java 或 Scratch 等语言中,标识符必须以字母或下划线开头,不能以数字开头。其后可包含字母、数字和下划线。此外,保留字也不能作为变量名。

The number 95.5 has a fractional part, so it requires a float (floating-point) data type, rather than an integer. Some languages also call it real or double.

数值 95.5 包含小数部分,因此需要浮点类型而非整数类型。某些编程语言也将其称为实型或双精度型。

Choosing the correct data type helps the computer allocate the right amount of memory and perform operations correctly.

选择合适的数据类型有助于计算机分配正确的内存空间并正确执行运算。


5. Question 5: Cybersecurity – Phishing | 网络安全 – 网络钓鱼

Question: What is a phishing attack? Describe one way users can protect themselves from phishing.

题目:什么是网络钓鱼攻击?请说明用户可以保护自己免受钓鱼攻击的一种方法。

Answer: Phishing is a social engineering attack where attackers send deceptive emails or messages to trick recipients into revealing personal information such as passwords, bank details, or login credentials. One protection method is to avoid clicking suspicious links and to verify the sender’s email address carefully.

答案:网络钓鱼是一种社会工程攻击,攻击者发送欺骗性电子邮件或消息,诱骗收件人泄露密码、银行资料或登录凭据等个人信息。防护方法之一是避免点击可疑链接,并仔细核实发件人的邮箱地址。

Phishing emails often appear to come from trusted organisations like banks, schools, or IT support. They usually contain urgent language to pressure the victim into acting quickly without thinking.

钓鱼邮件通常看起来来自银行、学校或 IT 支持等受信任机构。它们常使用紧急措辞,迫使受害者在未加思考的情况下快速采取行动。

To stay safe, users should look for signs such as spelling mistakes, generic greetings, and links that do not match the official website domain. Enabling two-factor authentication also adds an extra layer of security.

为确保安全,用户应留意拼写错误、泛用问候语以及与官方网站域名不符的链接等迹象。启用双因素认证也能增加额外的安全层。

Never enter sensitive information on a website unless you have manually typed the URL and checked for the padlock symbol (HTTPS).

除非手动输入网址并检查到安全锁标志(HTTPS),否则绝不要在网站上输入敏感信息。


6. Question 6: File Size Calculation | 文件大小计算

Question: A bitmap image has a resolution of 200 × 150 pixels. Each pixel uses 3 bytes to store colour information (RGB). Calculate the file size of this image in bytes. Then convert your answer to kilobytes (KB), showing your working. (1 KB = 1024 bytes)

题目:一张位图图像的分辨率为 200 × 150 像素。每个像素用 3 字节存储颜色信息(RGB)。计算该图像的文件大小(以字节为单位),并将结果转换为千字节(KB),写出演算过程。(1 KB = 1024 字节)

Answer: File size = 200 × 150 × 3 = 90,000 bytes. In kilobytes: 90,000 ÷ 1024 ≈ 87.89 KB.

答案:文件大小 = 200 × 150 × 3 = 90,000 字节。转换为千字节:90,000 ÷ 1024 ≈ 87.89 KB。

Step 1: Multiply the number of pixels by the colour depth. Total bytes = width × height × bytes per pixel = 200 × 150 × 3 = 90,000 bytes.

步骤一:像素总数乘以颜色深度。总字节数 = 宽 × 高 × 每像素字节数 = 200 × 150 × 3 = 90,000 字节。

Step 2: Convert bytes to kilobytes by dividing by 1024. 90,000 / 1024 = 87.890625. Rounded to two decimal places, it is approximately 87.89 KB.

步骤二:除以 1024 将字节换算为千字节。90,000 / 1024 = 87.890625。四舍五入至小数点后两位,约为 87.89 KB。

Understanding file size is important when considering storage space and transmission time. Higher resolution or greater colour depth results in larger files.

理解文件大小对考虑存储空间和传输时间很重要。分辨率越高或颜色深度越大,文件就越大。


7. Question 7: Logic Gates – AND Truth Table | 逻辑门 – 与门真值表

Question: Complete the truth table for a two-input AND gate. Let the inputs be A and B, and the output be Q.

题目:完成双输入与门(AND gate)的真值表。设输入为 A、B,输出为 Q。

Answer:

A B Q (A AND B)
0 0 0
0 1 0
1 0 0
1 1 1

答案:如上表所示。

An AND gate outputs 1 only when both inputs are 1. In all other input combinations, the output is 0. This is why it is also described as a logical conjunction.

与门仅在两个输入均为 1 时输出 1。在所有其他输入组合下,输出均为 0。因此它也被描述为逻辑与(合取)操作。

In computing, AND gates are fundamental building blocks of digital circuits. They are used in combination with other gates (OR, NOT) to perform arithmetic and decision-making functions.

在计算机中,与门是数字电路的基本构建块。它们与其他门(或门、非门)组合使用,以执行算术运算和决策功能。

Practice recognising the symbols: the AND gate is usually drawn with a D-shaped symbol, while the OR gate has a curved pointed shape. Remembering the truth tables will help you analyse more complex logic circuits.

练习识别符号:与门通常画成 D 形,而或门带有弧形尖头。记住真值表将有助于你分析更复杂的逻辑电路。


8. Question 8: Network Topology – Star | 网络拓扑 – 星型结构

Question: Describe one advantage and one disadvantage of a star network topology compared to a bus topology.

题目:与总线型拓扑相比,说明星型网络拓扑的一个优点和一个缺点。

Answer: Advantage: if one cable or device fails, only that connection is affected; the rest of the network continues to work. Disadvantage: if the central switch or hub fails, the entire network goes down.

答案:优点:当某条电缆或设备出现故障时,只有该连接受影响,网络的其余部分继续工作。缺点:如果中央交换机或集线器发生故障,整个网络都将瘫痪。

In a star topology, all devices are connected to a central node, such as a switch. This makes it easy to add new devices and troubleshoot problems because each connection is separate.

在星型拓扑中,所有设备都连接到中央节点(如交换机)。这使得添加新设备和排除故障非常方便,因为每条连接都是独立的。

In contrast, a bus topology has a single backbone cable. A break in the backbone can disrupt the entire network, and adding many devices can degrade performance. However, bus setups require less cabling and are cheaper in small networks.

相比之下,总线型拓扑使用单一主干电缆。主干断裂会中断整个网络,且添加众多设备会降低性能。不过,总线型布线较少,在小规模网络中成本较低。

When designing a school network, star topology is often chosen because reliability and ease of management are priorities, even though the central switch represents a single point of failure.

在设计学校网络时,星型拓扑常被选用,因为可靠性和易于管理是首要考虑因素,尽管中央交换机是单一故障点。


9. Question 9: Bubble Sort Trace | 冒泡排序演算

Question: The list [5, 2, 8, 1] is to be sorted into ascending order using bubble sort. Show the list after the first complete pass (one full traversal from left to right).

题目:要对列表 [5, 2, 8, 1] 使用冒泡排序按升序排列。请展示完成第一遍完整扫描(从左至右遍历一次)后的列表。

Answer: After the first pass, the list becomes [2, 5, 1, 8].

答案:第一遍扫描后,列表变为 [2, 5, 1, 8]。

During the first pass, bubble sort compares adjacent pairs and swaps them if they are in the wrong order. Compare 5 and 2: swap → [2, 5, 8, 1]. Next, compare 5 and 8: no swap. Finally, compare 8 and 1: swap → [2, 5, 1, 8]. The largest number (8) has ‘bubbled’ to the end.

在第一遍扫描中,冒泡排序比较相邻元素,若顺序错误则交换。比较 5 和 2:交换 → [2, 5, 8, 1]。然后比较 5 和 8:不交换。最后比较 8 和 1:交换 → [2, 5, 1, 8]。最大的数字 8 已“冒泡”到最后。

Subsequent passes will continue moving the next largest numbers into position. The process repeats until no swaps are needed, indicating the list is sorted.

后续的扫描将继续把次大的数字移到合适位置。这个过程会重复进行,直到一次扫描中无需任何交换,即表明列表已排序。

Bubble sort is straightforward to implement but is inefficient for large lists. Understanding its mechanics helps you grasp more advanced sorting algorithms later.

冒泡排序简单易实现,但对大型列表效率低下。理解其机理有助于将来掌握更高级的排序算法。


Published by TutorHao | Computing 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