ブール代数とカーナフ図
導入済みこのレッスンの内容
| English | 意味 |
|---|---|
| Boolean algebra/ˈbuːlɪən ˈældʒɪbrə/ | ブール代数 |
| absorption/əbˈsɔːpʃn/ | 吸収則 |
| De Morgan's theorem/də ˈmɔːɡənz ˈθɪərəm/ | ド・モルガンの定理 |
| Karnaugh map/ˈkɑːnɔː mæp/ | カルノ図 |
| don't-cares/dəʊnt keəz/ | ダントケース |
One bulb, two switches
- A hallway light can be switched from either end of the hall. Flip either switch and the light changes state.
- That wiring is a logic function of two inputs, and the electrician built it without writing any algebra. This lesson gives the algebra and a map that simplifies it.
Boolean algebra
- Boolean algebra 布尔代数 works on 0 and 1 with AND ($A \cdot B$), OR ($A + B$) and NOT ($A'$). Most laws match ordinary algebra: $A \cdot (B + C) = A \cdot B + A \cdot C$.
- New ones shorten expressions. $A + A = A$, $A + A' = 1$, and absorption 吸收律: $A + A \cdot B = A$, because whenever $A \cdot B$ is 1, $A$ already is.
A + A·B を簡略化せよ。
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
吸収則:$A \cdot B$ が 1 のとき、$A$ はすでに 1 であるため、その項は何も加算しない。$A, B$ の4つの行を確認して検証せよ。
De Morgan: break the bar, change the sign
- De Morgan's theorem 德摩根定律 moves a NOT through a bracket: $(A \cdot B)' = A' + B'$ and $(A + B)' = A' \cdot B'$.
- It is how a NAND or NOR circuit is read. "Not both" is the same as "at least one is off".
The hallway light is the XOR: $F = A' \cdot B + A \cdot B'$. It is 1 exactly when the two switches differ, so flipping either one changes $F$:
| Switch A | Switch B | Light F |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
各式を等しいものに対応させよ。
難易度 2/5 · 140 コイン + 今日初回達成時の小ボーナス
ド・モルガン:バーを取り外し、記号を変換する。ある変数とその否定形を OR すると常に 1 となり、AND すると常に 0 となる。
The Karnaugh map
- A Karnaugh map 卡诺图 lays out the truth table so that neighbouring cells differ in exactly one variable. The columns run 00, 01, 11, 10 (Gray-code order), and the edges wrap round.
- Circle 1s in rectangles of 1, 2, 4 or 8 cells. A group of $2^{k}$ cells removes $k$ variables: only the variables that stay constant across the group survive.
Kマップの四セルグループはどの変数を保持するか?
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
グループ内で両方の値を取る変数はセルを区別できないため消滅する。奇数列のグループでは C だけが残り、A と B は内部で変化するため除外される。
4変数Karnaugh図において、8個のセルのグループは、その積項にいくつの変数を残しますか?
難易度 2/5 · 140 コイン + 今日初回達成時の小ボーナス
$8 = 2^{3}$個のセルは、4 変数のうち 3 を除去して単一のリテラルを残します。例えば、$D$ だけが残ります。
Worked example: the odd rows
- $F = \sum m(1, 3, 5, 7)$ is 1 on the odd rows of a three-variable table: exactly the rows where $C = 1$.
- On the map the four cells form one group. $A$ and $B$ both change inside it, so they drop out and $F = C$. Check all 8 rows: it matches.

A, B, C の Σm(1, 3, 5, 7) に対するカルノー図のグループは —
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
奇数行はすべて C = 1 の行です:A と B を除去する4つのセルのグループがあります。8-行チェックにより F = C が確認できます。
Don't-cares
- Some input combinations never happen, such as codes 10 to 15 on a decimal digit. Mark them as don't-cares 无关项 (X) on the map.
- An X may join a group to make it bigger, which removes more variables. Never circle Xs on their own: they need no output.
dont-care セルだけで構成されたグループは、簡略化された式に加えるべきである。
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
Don't cares(無効条件)には出力が必要です。1s のグループに加わって拡大することはできますが、Xs のみのグループはゲートを追加するだけです。
Worked example: four-input majority
- $M$ is 1 when at least three of $A, B, C, D$ are 1: minterms 7, 11, 13, 14 and 15, the codes with three or four 1s.
- Four overlapping pairs give $M = A \cdot B \cdot C + A \cdot B \cdot D + A \cdot C \cdot D + B \cdot C \cdot D$, which factors to $M = A \cdot B \cdot (C + D) + C \cdot D \cdot (A + B)$.
- Checking all 16 rows against "count ≥ 3" agrees everywhere, and the factored form needs fewer gates than five separate minterms.
4変数の多数決関数(3以上の入力が 1 のとき 1 )の最小項は —
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
Count the 1s in each 4-bit code: 0111 (7), 1011 (11), 1101 (13), 1110 (14), 1111 (15) are exactly the codes with three or four 1s. Simplified: $AB(C+D) + CD(A+B)$, checked on all 16 rows.
Three common slips
- Grouping diagonally. Groups must be rectangles of $2^{k}$ cells; diagonal neighbours differ in two variables.
- Keeping a changing variable. If a variable is 0 in some cells of the group and 1 in others, it drops out.
- Not checking. With 8 or 16 rows, an exhaustive check takes a minute and catches every grouping error.
XOR A'·B + A·B' のK-mapには、隣接する1s が2つ以上存在しないため、より少ない積項に簡略化できません。
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
その1s は 01 と 10 に位置し、両方の変数が異なります:対角線上であり、隣接していません。XOR は2つの項として残り、独自のゲートを持つ理由就是这个。
Recap
- Absorption and De Morgan shorten expressions: break the bar, change the sign.
- K-map groups are rectangles of $2^{k}$ cells in Gray order; a group keeps only its constant variables.
- Don't-cares enlarge groups but never form one; verify every result on the full table.
何が問題でしたか?この内容はサイトの運営チームだけが確認します。