说明
本文是个人学习用的非官方中英对照译文,原文:https://diveintosystems.org/book/C5-Arch/exercises.html。
原书采用 CC BY-NC-ND 4.0 许可(禁止演绎),请勿公开传播本译文。
标为「译注」「现代更新」的内容是译者补充,不代表原书作者观点;代码与原文逐字一致,未作改动。
5.11. Exercises
- 第 5 章练习(英文交互式练习,仍在编写中)
- Chapter 5 Exercises (in progress)
附加练习
Additional Exercises
- 只用 AND、OR 和 NOT 门构造一个 1 位 XOR 电路。明确写出所有步骤:从 XOR 的真值表开始,列出 XOR 为 1 时的逻辑表达式,再把这些表达式翻译成电路。
- Create a 1-bit XOR circuit using only AND, OR, and NOT gates. Explicitly show all steps starting from the truth table for XOR, then listing the logical expressions for when XOR is 1, and then translating the expressions into a circuit.
- 列出有 3 个输入值(A、B 和 CARRY IN)和 2 个输出值(SUM 和 CARRY OUT)的完整 1 位加法器电路的真值表。
- List the truth table for the full 1-bit adder circuit with 3 input values (A, B, and CARRY IN), and two output values (SUM and CARRY OUT).
- 只用基本逻辑门(AND、OR、NOT)和一个 1 位加法器电路,构造一个 4 位取负电路。假设高位(第 3 位)是 4 位补码值的符号位。关于补码数取负的细节,请参见第 4 章。
- Create a 4-bit negation circuit using only basic logic gates (AND, OR, NOT), and a 1-bit adder circuit. Assume that the high-order bit (bit 3) is the sign bit of the two’s complement 4-bit values. Refer to Chapter 4 for details on negation of two’s complement numbers.
- 对于控制电路一节中给出的四路多路复用器电路,解释为什么 S 输入值为 1 时多路复用器输出 B 的值。
- For the 4-way multiplexer circuit shown in the Control Circuits section, explain why an S input value of 1 results in the multiplexer outputting B’s value.
- 16 路多路复用器需要多少个选择位?解释你的答案。
- How many selection bits are needed for a 16-way multiplexer? Explain your answer.
- 画出一个存储着 0 的 RS 锁存器电路。然后,以存储电路一节中的 RS 锁存器图为例,逐步追踪向它写入 1 时电路的变化。
- Draw an RS latch circuit that stores 0. Then, trace through the updates to the circuit to write 1 into it. Use the RS latch figure in the Storage Circuits section, as an example.
- 对于存储电路一节中给出的门控 D 锁存器图,什么样的输入值会把 1 写入锁存器?什么样的输入会把 0 写入锁存器?
- For the figure of the gated D latch shown in the Storage Circuits section, what input values result in writing 1 into the latch? What inputs result in writing 0 into the latch?
- 解释为什么当 WE 输入为 0 时,门控 D 锁存器的 D 输入对锁存器中存储的值没有影响。
- Explain why the D input to the gated D latch has no affect on the value stored in the latch when the WE input is 0.