原住民族考試四等考試-電子工程類科計算機概要113 年第 6 題單選題
假設 A、B、C、F 都是布林變數,F= not(A or(B and C)),找出與 F 等效的布林運算式:
A(not A)or((not B)and(not C))
B(not A)and(B or C)
C(not A)or(B or C)
D(not A)and((not B)or(not C))正確答案
D正確答案
DeMorgan 定律:not(X or Y)=(not X) and (not Y),not(B and C)=(not B) or (not C)。
為什麼答案是 D
F=not(A or (B and C))=(not A) and not(B and C)=(not A) and ((not B) or (not C))。兩次 DeMorgan 完整套用,正解。
載入中…
完整詳解
Pro · 無限重點 DeMorgan 定律:not(X or Y)=(not X) and (not Y),not(B and C)=(not B) or (not C)。
兩層 DeMorgan:外層 or 變 and、內層 and 變 or,每個變數加 not。
逐選項分析
A✕ 陷阱
外層 not 穿透後應變成 and,但此選項仍為 or,且內層 (not B) and (not C) 也方向錯誤。典型 DeMorgan 誤用。
B✕
(B or C) 未對 B、C 取反,內層 DeMorgan 沒做完整,屬半套錯誤。
C✕
完全沒套用 DeMorgan,A 雖取反但 (B or C) 原封不動,且外層還是 or,整體邏輯與 F 相反。
D✓ 正確
F=not(A or (B and C))=(not A) and not(B and C)=(not A) and ((not B) or (not C))。兩次 DeMorgan 完整套用,正解。
DeMorgan 定律 (笛摩根)
| 原式 | 等效式 | 口訣 | 說明 |
|---|
| not(X or Y) | (not X) and (not Y) | 或變且、各自反 | 外層否定穿透 or |
| not(X and Y) | (not X) or (not Y) | 且變或、各自反 | 外層否定穿透 and |
| not(A or (B and C)) | (not A) and ((not B) or (not C)) | 兩層逐步拆 | 本題套用方式 |
DeMorgan 定律必須「運算符翻轉 + 變數取反」兩步同時做。考生常只做一半:A 選項運算符沒翻、B 選項變數沒取反,都是半套陷阱。務必記得 or↔and 要互換。