← 返回资讯屏轩教育 · 行业资讯

7S Homework Unit 5 | 7S家庭作业 第5单元

2026-08-21 13:46 · 本文部分内容由AI辅助创作

📚 7S Homework Unit 5 | 7S家庭作业 第5单元

This unit covers core topics in computer science, focusing on how computers represent data and make decisions using logic gates. These concepts are essential for understanding how digital systems work and often appear in homework and exams.

本单元涵盖计算机科学的核心主题,重点介绍计算机如何表示数据以及如何使用逻辑门进行决策。这些概念对于理解数字系统的工作原理至关重要,并且经常出现在作业和考试中。

1. Introduction to Data Representation | 数据表示简介

Computers use binary because electronic circuits have two stable states: on and off. These states are represented by 1 and 0. All data, whether numbers, text, images, or sound, must be converted into binary before a computer can process it.

计算机使用二进制,因为电子电路有两种稳定状态:开和关。这些状态用 1 和 0 表示。所有数据(无论是数字、文本、图像还是声音)都必须先转换成二进制,计算机才能处理它们。

A single binary digit is called a bit. A group of 8 bits is called a byte. Larger units include kilobytes, megabytes, and gigabytes. Understanding these units helps you estimate file sizes and memory usage.

一个二进制位称为比特(bit)。一组 8 个比特称为一个字节(byte)。更大的单位包括千字节(KB)、兆字节(MB)和千兆字节(GB)。理解这些单位有助于估算文件大小和内存使用量。

Data representation is not just about numbers. It also covers how text, images, and sound are stored digitally. Each type of data has its own encoding scheme.

数据表示不仅涉及数字。它还包括文本、图像和声音如何以数字方式存储。每种数据类型都有自己的编码方案。


2. Binary Number System | 二进制数系统

The decimal system uses base 10 with digits 0 to 9. The binary system uses base 2 with only two digits: 0 and 1. Each position in a binary number represents a power of 2, starting from 2⁰ on the right.

十进制系统使用基数 10,数字为 0 到 9。二进制系统使用基数 2,只有两个数字:0 和 1。二进制数中的每一位代表 2 的幂,从右侧的 2⁰ 开始。

number 1101₂ can be expanded as: 1101₂ = 1×2³ + 1×2² + 0×2¹ + 1×2⁰ = 8 + 4 + 0 + 1 = 13₁₀.

例如,二进制数 1101₂ 可以展开为:1101₂ = 1×2³ + 1×2² + 0×2¹ + 1×2⁰ = 8 + 4 + 0 + 1 = 13₁₀。

The leftmost bit in a binary number is called the most significant bit (MSB), and the rightmost bit is the least significant bit (LSB). This order matters when we convert or perform arithmetic.

二进制数中最左边的位称为最高有效位(MSB),最右边的位称为最低有效位(LSB)。这个顺序在转换或执行算术运算时很重要。


3. Converting Between Binary and Decimal | 二进制与十进制转换

0₂ = 1×16 + 0×8 + 1×4 + 1×2 + 0×1 = 22₁₀. You can use a table to organise the powers of 2.

要将二进制转换为十进制,将每一位乘以其位权并相加。例如,10110₂ = 1×16 + 0×8 + 1×4 + 1×2 + 0×1 = 22₁₀。你可以使用表格来整理 2 的幂。

from bottom to top. For 25, the divisions give remainders 1, 0, 0, 1, 1, so 25₁₀ = 11001₂.

要将十进制转换为二进制,不断将十进制数除以 2 并记录余数。从下往上读取余数。对于 25,除法得到的余数为 1、0、0、1、1,因此 25₁₀ = 11001₂。

A quick check: always verify your answer by converting back. This helps avoid simple mistakes in homework.

快速检查:始终通过反向转换来验证答案。这有助于避免作业中的简单错误。


4. Hexadecimal Number System | 十六进制数系统

15. Hexadecimal is useful because it can represent large binary numbers in a shorter form.

十六进制使用基数 16。它使用数字 0 到 9 和字母 A 到 F,其中 A = 10、B = 11、C = 12、D = 13、E = 14、F = 15。十六进制很有用,因为它可以用较短的形式表示较大的二进制数。

ple, 1011₂ = B₁₆ and 1111₂ = F₁₆. Therefore, 10111111₂ can be grouped as 1011 1111 = BF₁₆.

每个十六进制数字恰好对应 4 个二进制位。例如,1011₂ = B₁₆,1111₂ = F₁₆。因此,10111111₂ 可以分组为 1011 1111 = BF₁₆。

To convert binary to hexadecimal, split the binary number into groups of four bits, starting from the right. Then convert each group. To convert hexadecimal to binary, replace each hex digit with its 4-bit binary equivalent.

要将二进制转换为十六进制,从右侧开始将二进制数分成四位一组,然后转换每组。要将十六进制转换为二进制,将每个十六进制数字替换为其等价的四位二进制数。


广告 / Sponsored

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

0+0=0, 0+1=1, 1+0=1, and 1+1=10₂. When 1+1 occurs, write 0 and carry 1 to the next column.

二进制加法遵循与十进制加法类似的规则。基本规则是:0+0=0,0+1=1,1+0=1,1+1=10₂。当出现 1+1 时,写 0 并向下一列进 1。

1₂ (9). Work from right to left and keep track of carries. This is a common homework task.

例如,将 0110₂(6)和 0011₂(3)相加:0110 + 0011 = 1001₂(9)。从右到左计算并记录进位。这是常见的作业任务。

Overflow occurs when the result needs more bits than available. For example, in a 4-bit system, adding 1000₂ (8) and 1000₂ (8) gives 10000₂, which requires 5 bits. The extra bit is lost, causing an overflow error. Computers detect this with a carry flag.

当结果需要的位数超过可用位数时,就会发生溢出。例如,在 4 位系统中,将 1000₂(8)和 1000₂(8)相加得到 10000₂,这需要 5 位。多余的位丢失,导致溢出错误。计算机通过进位标志来检测溢出。


6. Character Encoding: ASCII and Unicode | 字符编码:ASCII 与 Unicode

To store text, computers assign a unique binary code to each character. ASCII (American Standard Code for Information Interchange) originally used 7 bits, representing 128 characters, including uppercase letters, lowercase letters, digits, and punctuation.

为了存储文本,计算机为每个字符分配唯一的二进制代码。ASCII(美国信息交换标准代码)最初使用 7 位,表示 128 个字符,包括大写字母、小写字母、数字和标点符号。

For example, the uppercase letter 'A' has ASCII code 65₁₀, which is 01000001₂. The lowercase 'a' is 97₁₀, or 01100001₂. Notice the difference of 32 between uppercase and lowercase codes.

例如,大写字母 'A' 的 ASCII 码是 65₁₀,即 01000001₂。小写 'a' 是 97₁₀,即 01100001₂。注意大写和小写代码之间相差 32。

ASCII cannot represent characters from all languages. Unicode was developed to cover a much wider range, using up to 32 bits per character. UTF-8 is a popular variable-length encoding that stays compatible with ASCII.

ASCII 无法表示所有语言的字符。Unicode 的开发是为了覆盖更广泛的范围,每个字符最多使用 32 位。UTF-8 是一种流行的可变长度编码,与 ASCII 保持兼容。


7. Images and Sound Representation | 图像与声音表示

Images are represented as a grid of pixels. Each pixel stores a colour value, usually in binary. The resolution is the number of pixels in the image, and colour depth is the number of bits used per pixel. A higher colour depth allows more colours but increases file size.

图像表示为像素网格。每个像素存储一个颜色值,通常用二进制表示。分辨率是图像中的像素数量,颜色深度是每个像素使用的位数。较高的颜色深度允许更多颜色,但会增加文件大小。

bit image can show 2²⁴ ≈ 16.7 million colours. This is why photos often use 24-bit colour.

例如,1 位图像只能显示黑色和白色;8 位图像可以显示 2⁸ = 256 种颜色;24 位图像可以显示 2²⁴ ≈ 1670 万种颜色。这就是为什么照片通常使用 24 位颜色。

Sound is

Published by TutorHao | Computer Science Revision Series | aleveler.com

广告 / Sponsored
正版包邮 TI-nspire CX Guide for IBDP & AP 书店 计算机与网络 书籍 畅想畅销书
计算机 备考教辅 · 正版现货 · 与本文内容相关
查看详情 / View on Taobao参考价 ¥115.0

更多咨询请联系16621398022(同微信)

备考资讯每日更新,关注不错过
考纲变化 · 科目分析 · 学习方法
扫码关注公众号 tutorhao
在微信里长按二维码识别关注
或截图后用「扫一扫 → 相册」选择本图
公众号:tutorhao