Boolean algebra and Karnaugh maps
導入済み
14:50
RISC、パイプライン & ロジック
2人のチップデザイナーが同じ問題に直面しています:プログラムを高速に実行することです。一人はこう言います——強力な命令を作成して、1つの命令で多くの作業を行わせることです。もう一人はこう言います——keep…
英語のナレーション・英語と中国語の字幕を切り替え可能
このレッスンの内容
| English | 意味 |
|---|---|
| telephone relays | Switches controlled by electricity that connect or disconnect telephone circuits. |
| switch/swɪtʃ/ | A device that opens or closes a path for electric current. |
| Boolean variable | A variable that can have one of two values, 0 or 1. |
| circuit/ˈsɜːkɪt/ | A complete path through which electric current can flow. |
| expression/ekˈspreʃn/ | A combination of values and operations that gives a Boolean result. |
| Boolean algebra/ˈbuːlɪən ˈældʒɪbrə/ | ブール代数 |
| De Morgan's laws/də ˈmɔːɡənz lɔːz/ | ド・モルガンの法則 |
| Karnaugh map/ˈkɑːnɔː mæp/ | カーノ図 |
| overbar | A line above a value or expression that means NOT. |
| truth table/truːθ ˈteɪbl/ | 真値表 |
| Identity/aɪˈdentɪti/ | The law that OR with 0 or AND with 1 leaves a value unchanged. |
| Null/nʌl/ | The law that OR with 1 gives 1 and AND with 0 gives 0. |
| Idempotent | The law that combining a value with itself using OR or AND leaves it unchanged. |
| Inverse/ɪnˈvɜːs/ | The law that combining a value with its opposite gives 1 for OR and 0 for AND. |
| Absorption/əbˈsɔːpʃn/ | The law that A OR (A AND B) equals A. |
| negate | To change a Boolean value to its opposite, from 0 to 1 or 1 to 0. |
| NAND gates | Logic gates that give 0 only when all inputs are 1. |
| NOR gates | Logic gates that give 1 only when all inputs are 0. |
| chip | A small piece of material containing electronic circuits that perform computer functions. |
| Gray code/ɡreɪ kəʊd/ | グレーコード |
| term/tɜːm/ | A part of an expression separated from other parts by addition or subtraction, or an individual member of a sequence. |
| sum of products/sʌm ɒv ˈprɒdʌkts/ | A Boolean expression formed by joining AND terms using OR. |
| operator/ˈɒpəreɪtə/ | Symbols or keywords specifying operations to perform on values or expressions. |
デジタル時代を築いた修士論文
- 1937年、21歳の学生クレード・シャノンは、彼が研究していた電話のリレーが、ジョージ・ブールが80年前に真偽の推論のために考案した代数学と同じことをしていることに気づいた。
- スイッチがブール変数であれば、回路は式であり、式の簡略化は回路からゲートを取り除く。ゲートが少ないほど安価で高速、かつ省電力である。
- その論文は世紀で最も重要なものと言われている。このページのすべては、その一つのアイデアをツールとして用いることである。
- このレッスンはブール代数、ド・モルガンの法則、そして目視で同じ作業を行うカルノー図である。
記号と法則
+はOR、·はANDであり、しばしば省略される。また、オーバーバーはNOTを表す。真値表は同じものを網羅的に説明する。- 同一性: $A + 0 = A$と$A \cdot 1 = A$。零元: $A + 1 = 1$と$A \cdot 0 = 0$。
- 冪等: $A + A = A$。逆元: $A + \overline{A} = 1$と$A \cdot \overline{A} = 0$。
- 吸収: $A + A\cdot B = A$。なぜなら、$A$が真であれば$B$にかかわらず全体の式は真だからである。
Match each Boolean law to what it says.
難易度 2/5 · 140 コイン + 今日初回達成時の小ボーナス
These laws let you simplify Boolean expressions algebraically before building the circuit.
By the absorption law, A + A·B simplifies to ____.
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
If A is true the whole expression is true whatever B is, and if A is false both terms are false. B cannot affect the result.
デ・モルガンの法則
- ド・モルガンの法則は、試験で名前で使うことを求められる二つの法則である:
- 言葉でのレシピ:全体を否定し、ANDとORを入れ替え、各演算子を否定する。
- 実用的に重要なのは、これにより任意の式をNANDゲートのみ、またはNORゲートのみで書き換えられ、単一の反復ゲートで製造されたチップは製造コストが安くなるからだ。

二つの式、一つの真値表

Boolean algebra
A·B, A+B, Ā …
Boolean algebra is just these gates written as expressions — compare the truth tables.
By De Morgan's law, $\overline{A \cdot B}$ equals:
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
Negate the whole, swap AND→OR, negate each operand: $\overline{A \cdot B} = \overline{A} + \overline{B}$.
Applying De Morgan's law to an expression involves which steps? Select すべて that apply.
難易度 2/5 · 140 コイン + 今日初回達成時の小ボーナス
Negate the whole, swap the operator, negate each part. Order is irrelevant, since AND and OR are commutative.
解例:簡略化し、ゲート数を数える
- $Z = A\cdot B + A\cdot\overline{B}$を簡略化し、何节约束されるかを述べる。
- $A$でくくる:$Z = A\cdot(B + \overline{B})$。逆元の法則$B + \overline{B} = 1$より、よって$Z = A \cdot 1 = A$となる。
- The original needs two AND gates, a NOT and an OR: four gates. The simplified expression needs none, just the input $A$.
- 常に簡略化によって得られる benefit を述べるべきである:ゲート数が減るため、安価で高速、かつ低消費電力の回路になる。

Simplify $A\cdot B + A\cdot\overline{B}$.
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
Factor out A: $A(B + \overline{B}) = A \cdot 1 = A$.
A·B + A·NOT B needs two ANDs, one NOT and one OR. How many gates does its simplified form need?
難易度 2/5 · 140 コイン + 今日初回達成時の小ボーナス
It simplifies to just A, so the output is the input and no gate is needed at all. Four gates saved.
カルノー図
- カルノー図は、真値表から隣接する1をグループ化することで式を簡略化する。
- 行と列はグレイコード順にラベル付けされ、
00, 01, 11, 10、したがって隣接するセルはちょうど1つの変数のみで異なる。これが全てのコツであり、代数を邻接性として可視化する。 - 出力が1となるセルに1を入れ、辺の長さが2の累乗である1の矩形グループを見つける:1、2、4、8。グループは端部を**ラップ(wrap around)**して結合できる。

長方形が大きいほど、項は単純になる


A Karnaugh map simplifies a Boolean expression by:
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
You group adjacent 1s (in Gray-code order) into power-of-two rectangles; each group becomes a simplified term.
Why are the rows and columns of a Karnaugh map labelled 00, 01, 11, 10 rather than 00, 01, 10, 11?
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
Gray code order makes algebraic adjacency into physical adjacency. In counting order the grouping rule would simply not work.
グループの読み方
- グループ内において、変化しない変数は項に残り、変化する変数は消滅する。
- よって、2つのグループでは変数1つが、4つのグループでは2つが、8つのグループでは3つが消滅する。グループが大きいほど、項は単純になる。
- 可能な限り少なく、かつ大きくグループ化してすべての1を覆い、グループの項をORで組み合わせる。グループは重なり合ってもよく、重なり合いが大きなグループを可能にすることも多い。

In a Karnaugh map, a larger group of adjacent 1s eliminates more variables, giving a simpler term (a group of 2 drops one variable, a group of 4 drops two).
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
You group adjacent 1s into power-of-two rectangles in Gray-code order; the bigger the group, the simpler the term it becomes.
Put the steps of simplifying with a Karnaugh map in order.
難易度 3/5 · 200 コイン + 今日初回達成時の小ボーナス
Gray code, ones, biggest groups, drop what changes, OR the terms. Use as few and as large groups as will cover every 1.
解例:2変数の地図を読む
- $A$に対するカルノー図で、$B$のセルに1がある。$\overline{A}B$と$AB$を簡略化せよ。
- 2つの1は隣接しており、$B = 1$列を共有しているため、2の長方形としてグループ化される。
- そのグループ$B$内では1が一定ですが、$A$は0から1へと変化します。変化する変数は消滅します。
- よって、全体の式は単に$Z = B$となる。簡略化されていない積和形$\overline{A}B + AB$と比較すると、これはNOTゲート、2つのANDゲート、およびORゲートが必要である。

どの方法を選ぶか
- ブール代数は正確であり、変数の数に関わらず適用できるが、どの法則适用するかを見極める必要がある。
- カルノー図は機械的であり、2〜4変数(これが試験の出題範囲)では誤りが少なく、最大のグループ化を直接示してくれる。
- どちらも同じ答えを与える。カルノー図の利点は、簡略化が「検索」ではなく「観察」になる点である。
見落としやすいポイント
- ド・モルガンは全体を否定し、演算子を入れ替え、各部分を否定するである。演算子だけを替えるのは古典的な半分の正解である。
- K-mapの行はGray code順に並べなければならない
00, 01, 11, 10。二進数のカウント順では隣接性が正しくなく、グループ化が失敗する。 - グループのサイズは2の累乗であり、端を巻き返してもよい。3つのグループはグループではない。
- 簡略化が目的であることを述べよ:ゲート数が減るため、安価で高速、かつ低消費電力になる。
理解できましたか
- ブール代数は式をより少ない項に書き換えるため、回路にはより少ないゲートが必要になる
- ド・モルガン: $\overline{A + B} = \overline{A} \cdot \overline{B}$と$\overline{A \cdot B} = \overline{A} + \overline{B}$;吸収: $A + AB = A$;$A\cdot B + A\cdot\overline{B} = A$
- カルノー図は真値表から邻接する1をグループ化し、行と列はグレイコード順に配置されており、隣接変数は1つだけ異なる
- グループ内で変数が変化すると消滅するため、大きなグループは単純な項をもたらす:すべての1を、可能な限り少なく、かつ大きくグループ化して覆う
何が問題でしたか?この内容はサイトの運営チームだけが確認します。