Skip to content

Commit fd9aca7

Browse files
committed
Add implementation of exercise 3-31
1 parent 592a7da commit fd9aca7

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

README.org

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
习题完成情况:
2626
- 章节一: 43/46
2727
- 章节二: 88/97
28-
- 章节三: 30/82
28+
- 章节三: 31/82
2929
- 章节四: TODO
3030
- 章节五: TODO
3131
* 运行

chapter3/exercise3-31.org

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#+LATEX_CLASS: ramsay-org-article
2+
#+LATEX_CLASS_OPTIONS: [oneside,A4paper,12pt]
3+
#+AUTHOR: Ramsay Leung
4+
5+
#+DATE: 2025-07-15 Tue 20:17
6+
7+
因为电路没有办法表示优先级,以根据德摩根定律(De Morgan's Laws) 为例:
8+
#+begin_src
9+
;;; A OR B = NOT((NOT A) AND (NOT B))
10+
#+end_src
11+
12+
正确的优先级应该是先执行 =(NOT A)= 与 =(NOT B)=,然后再执行 =AND=, 最后执行 =NOT=;
13+
14+
如果不立即执行,那么在执行 =AND= 的时候,初始值不确定, 也不知道 =(NOT A)= 是否被执行, 输入处于未定义状态。
15+
16+
此外,真实的电路在连接时就会立即产生相应的电平变化

0 commit comments

Comments
 (0)