📚 Year 10 CAIE Computer Science: Interdisciplinary Comprehensive Question Training | Year 10 CAIE 计算机:跨学科综合题型训练
Interdisciplinary questions help you connect computing concepts with real-world applications in mathematics, science, business and ethics. This training set provides worked examples that bridge the gap between theoretical knowledge and practical problem-solving across subjects.
跨学科题目有助于你将计算机概念与数学、科学、商业和伦理中的实际应用联系起来。这套训练提供了完整的例题,在学科之间架起理论知识与实际问题解决之间的桥梁。
1. Two's Complement Subtraction in Sensor Systems | 传感器系统中的二进制补码减法
A robotic arm uses 8-bit two's complement integers to store joint angles from two sensors. Sensor X reads 01001011, and sensor Y reads 00101101. The control unit must compute X - Y to correct a tilt. Calculate the result and verify whether an overflow occurs.
一个机械臂使用8位二进制补码整数存储两个传感器的关节角度。传感器X读数为01001011,传感器Y读数为00101101。控制单元必须计算X - Y以校正倾斜。计算结果并验证是否发生溢出。
= 75₁₀, 00101101₂ = 45₁₀. The expected answer is 30, which fits in an 8-bit signed range.
步骤1:将两个二进制值转换为十进制。01001011₂ = 75₁₀,00101101₂ = 45₁₀。预期答案为30,这在8位有符号数范围内。
Step 2: Find the two's complement of Y. Invert its bits to get 11010010, then add 1 to obtain 11010011. This represents -45 in two's complement.
步骤2:求出Y的二进制补码。反转其位得到11010010,然后加1得到11010011。这就是-45的补码表示。
Step 3: Add X and the two' = 1 00011110. The extra carry beyond bit 7 is discarded, leaving 00011110, which is 30₁₀.
步骤3:将X与Y的补码相加:01001011 + 11010011 = 1 00011110。超出第7位的额外进位被丢弃,剩下00011110,即30₁₀。
This interdisciplinary task blends binary arithmetic (computer science) with precision control in engineering. Overflow detection is essential here, and the calculation confirms no overflow because the expected result stays within the range -128 to +127.
这项跨学科任务将二进制算术(计算机科学)与工程中的精确控制融合在一起。在此溢出检测至关重要,计算确认无溢出,因为预期结果保持在-128到+127范围内。
2. Logic Circuit Design for a Laboratory Alarm | 实验室报警器的逻辑电路设计
A chemistry lab requires an alarm that triggers when either a gas sensor (G) and a smoke detector (S) both detect threats, or a manual emergency button (E) is pressed. Write the Boolean expression, draw the logic gate arrangement, and produce the truth table.
一个化学实验室需要一个报警器,当气体传感器(G)和烟雾探测器(S)同时检测到危险,或手动紧急按钮(E)被按下时触发。写出布尔表达式,绘制逻辑门组合,并列出真值表。
function is Alarm = (G AND S) OR E. Using standard symbols, the expression becomes A = (G ∧ S) ∨ E. This can be built with one AND gate followed by an OR gate.
所需的逻辑功能是Alarm = (G AND S) OR E。使用标准符号,表达式为A = (G ∧ S) ∨ E。这可以由一个与门和一个或门构建。
The truth table is as follows:
真值表如下:
| G | S | E | A = (G∧S)∨E |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 |
| 0 | 1 | 0 | 0 |
| 0 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 |
| 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | 1 |
| 1 | 1 | 1 | 1 |
Designing logic circuits connects Boolean algebra (mathematics) with electronic engineering. The same approach is used in real safety systems, where combining sensor inputs can reduce false alarms while ensuring emergency overrides.
设计逻辑电路将布尔代数(数学)与电子工程联系起来。相同的方法用于实际的安全系统,结合传感器输入可以减少误报,同时确保紧急越权控制。
3. Caesar Cipher Encryption for Secure Messaging | 用于安全通信的凯撒密码加密
A history teacher wants to encrypt the plaintext 'COMPUTER' using a Caesar cipher with a left shift of 5 positions. Write pseudocode for the encryption algorithm and produce the ciphertext. Then discuss one major vulnerability of this method.
一位历史老师想用凯撒密码将明文'COMPUTER'加密,左移5位。写出加密算法的伪代码并生成密文。然后讨论该方法的一个主要弱点。
The Caesar cipher shifts each letter by a fixed number of places in the alphabet. A left shift of 5 means every letter moves 5 positions earlier: A becomes V, B becomes W, and so on.
凯撒密码将每个字母在字母表中移动固定数量。左移5位意味着每个字母向前移动5位:A变为V,B变为W,以此类推。
Pseudocode for encryption:
INPUT plaintext, shift
FOR each character ch in plaintext
IF ch is a letter THEN
position = numerical value of ch (A=0, B=1, ..., Z=25)
new_position = (position - shift) MOD 26
cipher_ch = letter corresponding to new_position
ELSE
cipher_ch = ch
OUTPUT cipher_ch
ENDFOR
加密伪代码:
输入 plaintext, shift
对于 plaintext 中的每个字符 ch
如果 ch 是字母 则
position = ch 的数值 (A=0, B=1, ..., Z=25)
new_position = (position - shift) MOD 26
cipher_ch = 对应 new_position 的字母
否则
cipher_ch = ch
输出 cipher_ch
结束循环
Applying the algorithm to 'C O M P U T E R' U (20) → 15 → P; T (19) → 14 → O; E (4) → -1 → 25 → Z; R (17) → 12 → M. The ciphertext is 'XJHKPOZM'.
对'C O M P U T E R'应用算法: H; P (15) → 10 → K; U (20) → 15 → P; T (19) → 14 → O; E (4) → -1 → 25 → Z; R (17) → 12 → M。密文为'XJHKPOZM'。
The main vulnerability is that Caesar cipher is vulnerable to brute-force attacks – there are only 25 possible keys. This links computer security with mathematical cryptography and historical code-breaking.
主要弱点是凯撒密码易受暴力破解攻击——只有25个可能的密钥。这将计算机安全与数学密码学及历史破译联系起来。
4. Statistical Analysis with Array Algorithms | 数组算法与统计分析
A sports coach stores the distances (in cm) jumped by an athlete in six attempts in an array: [552, 608, 583, 559, 601, 578]. Write an algorithm to find the mean jump distance, the best performance (maximum), and count how many jumps exceeded 590 cm.
一位体育教练将一名运动员六次跳远的距离(厘米)存储在一个数组中:[552, 608, 583, 559, 601, 578]。编写算法求出平均跳远距离、最佳成绩(最大值),并统计超过590厘米的跳远次数。
Algorithm in structured English:
结构化英语算法:
SET total TO 0 SET max TO jumps[0] SET count_above TO 0 FOR i FROM 0 TO 5 total ← total + jumps[i] IF jumps[i] > max THEN max ← jumps[i] ENDIF IF jumps[i] > 590 THEN count_above ← count_above + 1 ENDIF ENDFOR mean ← total / 6 OUTPUT mean, max, count_above
08) and index 4 (601) leaves max = 608; values above 590 are 608, 601, so count_above = 2.
追踪算法:total变为552+608+583+559+601+578 = 3481;mean = 3481 ÷ 6 ≈ 580.17厘米;max在索引1(608)和索引4(601)更新后最终为608;超过590的值是608和601,因此count_above = 2。
This task demonstrates how programming handles descriptive statistics. It integrates algorithmic thinking with practical data analysis, core to both computer science and applied mathematics.
此任务演示了编程如何处理描述性统计。它将算法思维与实际数据分析相结合,这是计算机科学和应用数学的核心。
5. SQL Queries for Business Inventory Reporting | 面向商业库存报告的SQL查询
he names of products that have generated a total revenue (Price × Quantity) greater than 1000.
一个商业数据库有两张表:Products(ProductID, Name, Price) 和 Orders(OrderID, ProductID, Quantity)。编写SQL查询,检索总营收(Price × Quantity)超过1000的产品名称。
The required query uses SUM aggregation, JOIN, GROUP BY and HAVING. The solution is:
所需查询使用了SUM聚合、JOIN、GROUP BY和HAVING。解决方案如下:
SELECT Products.Name FROM Products JOIN Orders ON Products.ProductID = Orders.ProductID GROUP BY Products.Name HAVING SUM(Products.Price * Orders.Quantity) > 1000;
Explanation: The JOIN links each order with the product details. Multiplying Price by Quantity gives the revenue per order line. GROUP BY Name combines all orders for the same product, and HAVING filters the aggregated result, keeping only those with total revenue exceeding 1000.
解释:JOIN将每个订单与产品详情连接。Price乘以Quantity给出每条订单行的营收。GROUP BY Name合并同一产品的所有订单,HAVING过滤聚合结果,仅保留总营收超过1000的产品。
This task merges database querying with business analytics, showing how data engines answer managerial questions. Understanding aggregate functions and conditions is essential for CAIE practical assessments.
此任务融合了数据库查询与商业分析,展示了数据引擎如何回答管理问题。理解聚合函数和条件对于CAIE实践评估至关重要。
6. Floating-Point Errors in Scientific Measurements | 科学测量中的浮点误差
In a physics simulation, a programmer adds 0.1 and 0.2 and expects exactly 0.3, but the computer outputs 0.30000000000000004. Explain why this happens using the binary representation of floating-point numbers, and suggest how to mitigate such errors.
在物理模拟中,程序员将0.1和0.2相加,期望得到精确的0.3,但计算机输出0.30000000000000004。请用浮点数的二进制表示解释原因,并提出如何减少此类误差。
represented exactly in binary; they are repeating fractions: 0.1₁₀ ≈ 0.0001100110011...₂.
浮点数以二进制存储为符号、尾数和指数(IEEE 754)。十进制0.1₁₀和0.2₁₀无法用二进制精确表示;它们是无限循环小数:0.1₁₀ ≈ 0.0001100110011...₂。
When these approximations are stored in 32- or 64-bit formats, tiny rounding errors accumulate. Adding them produces a value slightly greater than 0.3 due to the carry in the binary fraction.
当这些近似值以32位或64位格式存储时,微小的舍入误差累积起来。相加时由于二进制小数部分进位,结果略大于0.3。
To mitigate this, never compare floating-point numbers for exact equality. Instead, check if the absolute difference is less than a small tolerance ε (e.g., 0.0001). This practice is vital in scientific computing and engineering.
为了减少误差,切勿进行浮点数的精确相等比较。取而代之,检查绝对差是否小于一个很小的容差值ε(例如0.0001)。这种做法在科学计算和工程中至关重要。
7. Network Topology Decision for a Multi-Site School | 多校区学校的网络拓扑决策
A school group has three campuses spread across a city: a main office, a secondary school, and a primary school. Each campus needs internet access and shared file servers. Compare bus, star and ring topologies, and recommend the most suitable topology considering cost, reliability, and ease of expansion. Justify your choice.
一个学校集团在市区有三个校区:主办公室、中学和小学。每个校区都需要互联网接入和共享文件服务器。比较总线、星形和环形拓扑,并考虑成本、可靠性和扩展便利性,推荐最合适的拓扑。证明你的选择。
Bus topology uses a single backbone cable; it is cheap but a cable break disables the whole segment and collisions increase with many devices. Star topology connects all nodes to a central switch; a node failure does not affect others, but a switch failure is critical. Ring topology passes data in one direction; a single break can halt the network unless dual rings are used.
总线拓扑使用单根主干电缆;成本低,但电缆断裂会瘫痪整个网段,且设备多时冲突增加。星形拓扑将所有节点连接到中央交换机;节点故障不影响其他,但交换机故障是致命的。环形拓扑单向传递数据;单点断开会中断全网,除非使用双环。
For the school, a star topology centred at the main office with high-capacity switches is recommended. Each campus can have its own local star sub-network connected via fibre links to the core switch. This provides high reliability – a classroom switch failure isolates only that segment. It also scales well when adding new labs or wireless access points. Although initial switch cost is higher than bus cabling, the long-term reliability and ease of management justify the investment.
对于该学校,建议采用以主办公室为中心、配置高容量交换机的星形拓扑。每个校区可拥有自己的本地星形子网,通过光纤链路连接到核心交换机。这提供了高可靠性——某个教室的交换机故障仅隔离该网段。在增加新实验室或无线接入点时,扩展也很方便。尽管初期交换机成本高于总线布线,但长期可靠性和管理便利性证明投资是值得的。
8. Ethical Evaluation of an AI Recruitment Tool | AI招聘工具的伦理评估
A tech company develops an AI system that analyses candidates' CVs and social media to predict job performance. The algorithm was trained on historical data of successful employees, most of whom are male. Identify two ethical concerns related to bias and privacy, and propose technical and policy measures to address them.
一家科技公司开发了一套AI系统,通过分析候选人的简历和社交媒体来预测工作表现。该算法使用成功员工的历史数据进行训练,而他们大多是男性。识别两个与偏见和隐私相关的伦理问题,并提出技术和政策措施加以解决。
Ethical concern 1: Algorithmic bias – if training data over-represents one gender, the model may unfairly favour male applicants, discriminating against qualified females. This violates fairness principles in computing.
伦理问题1:算法偏见——如果训练数据过多代表某一性别,模型可能不公平地偏袒男性申请者,歧视合格的女性。这违反了计算领域的公平性原则。
Technical measure: Regularly audit the training dataset for demographic balance, and apply techniques such as re-weighting or adversarial debiasing to reduce bias in the model's predictions.
技术措施:定期审计训练数据集的人口统计学平衡,并应用重新加权或对抗性去偏等技术以减少模型预测中的偏见。
Ethical concern 2: Privacy invasion – collecting social media content without explicit, informed consent can breach data protection laws (e.g., GDPR). The system may infer sensitive attributes like political views or health status.
伦理问题2:隐私侵犯——在未获得明确、知情同意的情况下收集社交媒体内容可能违反数据保护法(如GDPR)。系统可能推断出政治观点或健康状况等敏感属性。
Policy measure: Implement strict consent mechanisms where candidates opt in and understand what data is analysed. Minimise data collection to only job-relevant information, and anonymise personal identifiers during processing.
政策措施:实施严格的同意机制,让候选人选择加入并了解哪些数据被分析。将数据收集限制在仅与工作相关的信息,并在处理过程中匿名化个人标识符。
This exercise connects computer science with sociology and law, reinforcing the importance of responsible technology development.
此练习将计算机科学与社会学和法律联系起来,强化了负责任技术发展的重要性。
Published by TutorHao | Computer Science Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)

或截图后用「扫一扫 → 相册」选择本图