Boolesche Algebra
| \(x\) | \(\neg x\) |
|---|---|
| 0 | 1 |
| 1 | 0 |
| \(x\) | \(y\) | \(x\lor y\) |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
| \(x\) | \(y\) | \(x\land y\) |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
Weitere Verknüpfungen, zusammengesetzt aus \(\neg\), \(\lor\), \(\land\):
| \(x\) | \(y\) | \(x\oplus y\) | \(\overline{x\oplus y}\) | \(x\uparrow y\) |
|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 1 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 1 | 0 | 1 |
| 1 | 1 | 0 | 1 | 0 |
Boolesche Funktionen
Eine Schaltfunktion \(f:B^n\to B^1\) heißt (\(n\)-stellige) Boolesche Funktion.
Zusammenhang zu Schaltfunktionen:
Sei \(F:B^n\to B^m\) mit \(F(x_{n-1},\ldots,x_1,x_0)=(y_{m-1},\ldots,y_1,y_0)\).
Setzt man für jedes \(i\in\{m-1,\ldots,0\}\)
\[ f_i:B^n\to B \quad\text{definiert durch}\quad f_i(x_{n-1},\ldots,x_1,x_0)=y_i, \]
so ist \(F\) wie folgt darstellbar:
\[ F(x_{n-1},\ldots,x_0)=\big(f_{m-1}(x_{n-1},\ldots,x_0),\ f_{m-2}(x_{n-1},\ldots,x_0),\ \ldots,\ f_0(x_{n-1},\ldots,x_0)\big) \]
für alle \(x_{n-1},\ldots,x_0\in B\).
| \(x_1\) | \(x_0\) | \(y_1\) | \(y_0\) |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 |
| 1 | 1 | 1 | 0 |
| \(x\) | \(f_0(x)\) | \(f_1(x)\) | \(f_2(x)\) | \(f_3(x)\) |
|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 1 |
| 1 | 0 | 1 | 0 | 1 |
| \(x\) | \(y\) | \(f_0\) | \(f_1\) | \(f_2\) | \(f_3\) | \(f_4\) | \(f_5\) | \(f_6\) | \(f_7\) |
|---|---|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 0 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 |
| 1 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 |
| (1) | \(x\land\overline{x}\) | \(x\land{}y\) | \(x\land\overline{y}\) | \(x\) | \(\overline{x}\land{}y\) | \(y\) | \(x\oplus{}y\) | \(x\lor y\) | |
| (2) | \(\equiv 0\) | Min | \(>\) | \(x\) | \(<\) | \(y\) | \(\neq\) | Max | |
| (3) | \(\wedge\) | \(\nrightarrow\) | \(x\) | \(\nleftarrow\) | \(y\) | \(\nleftrightarrow\) | \(\vee\) | ||
| (4) | AND | XOR | OR |
| \(x\) | \(y\) | \(f_8\) | \(f_9\) | \(f_{10}\) | \(f_{11}\) | \(f_{12}\) | \(f_{13}\) | \(f_{14}\) | \(f_{15}\) |
|---|---|---|---|---|---|---|---|---|---|
| 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
| 0 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 |
| 1 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 |
| (1) | \(\overline{x\lor y}\) | \(\overline{x\oplus{}y}\) | \(\overline{y}\) | \(x\lor \overline{y}\) | \(\overline{x}\) | \(\overline{x}\lor y\) | \(\overline{x\land{}y}\) | \(x\lor \overline{x}\) | |
| (2) | 1-Max | \(=\) | 1-\(y\) | \(\geq\) | 1-\(x\) | \(\leq\) | 1-Min | \(\equiv 1\) | |
| (3) | \(\downarrow\) | \(\leftrightarrow\) | \(\neg{}y\) | \(\leftarrow\) | \(\neg{}x\) | \(\rightarrow\) | \(\uparrow\) | ||
| (4) | NOR | XNOR | NAND |
| \(i\) | \(x_2\) | \(x_1\) | \(x_0\) | \(f(x_2,x_1,x_0)\) |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 1 | 0 |
| 2 | 0 | 1 | 0 | 0 |
| 3 | 0 | 1 | 1 | 1 |
| 4 | 1 | 0 | 0 | 0 |
| 5 | 1 | 0 | 1 | 1 |
| 6 | 1 | 1 | 0 | 0 |
| 7 | 1 | 1 | 1 | 1 |
Folgende Darstellungen werden vorgestellt:
Disjunktive und Konjunktive Normalform
Gegeben: \(B^3\) in dieser Darstellung.
Minterm: eine Anzahl von Literalen (booleschen Variablen wie z.B. \(x_2\)), die alle durch ein UND (\(\land\)) verknüpft sind.
Beispiele für Minterme:
\[ \begin{aligned} m_3(x_2,x_1,x_0) &= \overline{x_2}x_1x_0\\ m_4(x_2,x_1,x_0) &= x_2\overline{x_1}\,\overline{x_0} \end{aligned} \]
| \(i\) | \(x_2\) | \(x_1\) | \(x_0\) |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 1 |
| 2 | 0 | 1 | 0 |
| 3 | 0 | 1 | 1 |
| 4 | 1 | 0 | 0 |
| 5 | 1 | 0 | 1 |
| 6 | 1 | 1 | 0 |
| 7 | 1 | 1 | 1 |
Jede Boolesche Funktion \(f:B^n\to B\) ist eindeutig darstellbar als Summe der Minterme ihrer einschlägigen Indizes.
D.h.: Ist \(I\subseteq\{0,\ldots,2^n-1\}\) die Menge der einschlägigen Indizes von \(f\), so gilt
\[ f=\bigvee_{i\in I}m_i \]
und keine andere Minterm-Summe stellt \(f\) dar.
Die Summe der Minterme der einschlägigen Indizes wird als Disjunktive Normalform (DNF) bezeichnet.
Gegeben seien die beiden Minterme \(m_3=\overline{x_2}x_1x_0\) und \(m_4=x_2\overline{x_1}\,\overline{x_0}\). Ist \(f(x_2,x_1,x_0)=m_3\lor m_4=\overline{x_2}x_1x_0\lor x_2\overline{x_1}\,\overline{x_0}\) wieder ein Minterm?
Sei \(f:B^3\to B\) gegeben durch die Tabelle.
DNF:
\[ \begin{aligned} f(x_2,x_1,x_0) &= m_3\lor m_5\lor m_7\\ &= \overline{x_2}x_1x_0\lor x_2\overline{x_1}x_0\lor x_2x_1x_0 \end{aligned} \]
| \(i\) | \(x_2\) | \(x_1\) | \(x_0\) | \(f(x_2,x_1,x_0)\) |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 1 | 0 |
| 2 | 0 | 1 | 0 | 0 |
| 3 | 0 | 1 | 1 | 1 |
| 4 | 1 | 0 | 0 | 0 |
| 5 | 1 | 0 | 1 | 1 |
| 6 | 1 | 1 | 0 | 0 |
| 7 | 1 | 1 | 1 | 1 |
Gegeben: \(B^3\) in dieser Darstellung.
Maxterm: eine Anzahl von Literalen (booleschen Variablen wie z.B. \(x_2\)), die alle durch ein ODER (\(\lor\)) verknüpft sind.
Beispiele für Maxterme:
\[ \begin{aligned} M_3(x_2,x_1,x_0) &= x_2\lor \overline{x_1}\lor \overline{x_0}\\ M_4(x_2,x_1,x_0) &= \overline{x_2}\lor x_1\lor x_0 \end{aligned} \]
| \(i\) | \(x_2\) | \(x_1\) | \(x_0\) |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 1 |
| 2 | 0 | 1 | 0 |
| 3 | 0 | 1 | 1 |
| 4 | 1 | 0 | 0 |
| 5 | 1 | 0 | 1 |
| 6 | 1 | 1 | 0 |
| 7 | 1 | 1 | 1 |
Sei \(f:B^3\to B\) gegeben durch die Tabelle.
KNF:
\[ f(x_2,x_1,x_0) = M_0\land M_1\land M_2\land M_4\land M_6 \]
| \(i\) | \(x_2\) | \(x_1\) | \(x_0\) | \(f(x_2,x_1,x_0)\) |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 1 | 0 |
| 2 | 0 | 1 | 0 | 0 |
| 3 | 0 | 1 | 1 | 1 |
| 4 | 1 | 0 | 0 | 0 |
| 5 | 1 | 0 | 1 | 1 |
| 6 | 1 | 1 | 0 | 0 |
| 7 | 1 | 1 | 1 | 1 |
\[ \begin{aligned} f(x_2,x_1,x_0) &= (x_2\lor x_1\lor x_0)\land(x_2\lor x_1\lor \overline{x_0})\land(x_2\lor \overline{x_1}\lor x_0)\\ &\quad\land(\overline{x_2}\lor x_1\lor x_0)\land(\overline{x_2}\lor \overline{x_1}\lor x_0) \end{aligned} \]
Funktionale Vollständigkeit
| \(x\) | \(y\) | \(f_{14}\) |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
\(f_{14}=x\uparrow y\) (NAND, 1-Min)
\(\Rightarrow\) Funktional vollständig
| \(x\) | \(y\) | \(f_{14}\) |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
\(f_{14}=x\uparrow y\) (NAND, 1-Min)
| \(x\) | \(y\) | \(f_{13}\) |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
\(f_{13}=x\to y\)
\[ \begin{aligned} 1\to 1 &= 1\\ 1\to x &= x\\ x\to 1 &= 1\\ x\to x &= 1 \end{aligned} \]
\(\Rightarrow\) Nicht funktional vollständig
| \(x\) | \(y\) | \(f_{13}\) |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
\(f_{13}=x\to y\)
Schaltnetze
Sei \(f:B^3\to B\) gegeben durch die Tabelle.
DNF:
\[ \begin{aligned} f(x_2,x_1,x_0) &= m_3\lor m_5\lor m_7\\ &= \overline{x_2}x_1x_0\lor x_2\overline{x_1}x_0\lor x_2x_1x_0 \end{aligned} \]
| \(i\) | \(x_2\) | \(x_1\) | \(x_0\) | \(f(x_2,x_1,x_0)\) |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 1 | 0 |
| 2 | 0 | 1 | 0 | 0 |
| 3 | 0 | 1 | 1 | 1 |
| 4 | 1 | 0 | 0 | 0 |
| 5 | 1 | 0 | 1 | 1 |
| 6 | 1 | 1 | 0 | 0 |
| 7 | 1 | 1 | 1 | 1 |
Alternative Schaltung:
DAG = Directed Acyclic Graph (gerichteter azyklischer Graph)
Beispiel:
\[ f(x_2,x_1,x_0)=\overline{x_2}x_1x_0\lor x_2\overline{x_1}x_0\lor x_2x_1x_0 \]
Annahmen:
Hier: 0-Verklemmung bzw. Stuck-at-Zero-Fault
\(f_i\): die von der Schaltung berechnete Funktion, wenn Draht \(i\) gerissen ist (Wert 0).
\[ \begin{aligned} f_1 &= \overline{0}\land x_1x_0\lor x_2\overline{x_1}x_0\lor x_2x_1x_0 = x_1x_0\lor x_2x_0\\ f_2 &= 0\land x_1x_0\lor x_2\overline{x_1}x_0\lor x_2x_1x_0 = x_2x_0\\ f_3 &= \overline{x_2}x_1x_0\lor x_2x_1x_0 = x_1x_0\\ f_4 &= \overline{x_2}x_1x_0\lor x_2\overline{x_1}x_0\\ f_5 &= x_2\overline{x_1}x_0\lor x_2x_1x_0 = x_2x_0\\ f_6 &= \overline{x_2}x_1x_0\lor x_2x_0\\ f_7 &= x_1x_0\\ f_8 &= \overline{x_2}x_1x_0\lor x_2\overline{x_1}x_0\\ f_9 &= x_2x_0 \end{aligned} \]
\[ \begin{aligned} f_{10} &= x_1x_0\\ f_{11} &= \overline{x_2}x_1x_0\lor x_2\overline{x_1}x_0\\ f_{12} &= 0\land x_0\lor x_2\overline{x_1}x_0\lor x_2x_1x_0 = x_2x_0\\ f_{13} &= x_1x_0\\ f_{14} &= \overline{x_2}x_1x_0\lor x_2\overline{x_1}x_0\\ f_{15} &= x_2x_0\\ f_{16} &= x_1x_0\\ f_{17} &= x_2x_1x_0\\ f_{18} &= \overline{x_2}x_1x_0\lor x_2\overline{x_1}x_0 \end{aligned} \]
Hinweis: \(xyz\lor x\overline{y}z=xz\)
| \(x_2\) | \(x_1\) | \(x_0\) | \(f_1\) | \(f_2\) | \(f_3\) | \(f_4\) | \(f_5\) | \(f_6\) | \(f_7\) | \(f_8\) | \(f_9\) | \(f_{10}\) | \(f_{11}\) | \(f_{12}\) | \(f_{13}\) | \(f_{14}\) | \(f_{15}\) | \(f_{16}\) | \(f_{17}\) | \(f_{18}\) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 0 | 1 |
| 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 1 | 0 | 1 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 0 | 0 | 1 |
| 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 |
Es gilt:
\[ \begin{aligned} f_1 &= f_6\\ f_2 &= f_5 = f_9 = f_{12} = f_{15}\\ f_3 &= f_7 = f_{10} = f_{13} = f_{16}\\ f_4 &= f_8 = f_{11} = f_{14} = f_{18} \end{aligned} \]
| \(x_2\) | \(x_1\) | \(x_0\) | \(f\) | \(f_1\) | \(f_2\) | \(f_3\) | \(f_4\) | \(f_{17}\) |
|---|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
| 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 1 | 1 | 0 | 1 | 1 | 0 |
| 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 1 | 0 | 1 | 1 | 1 | 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 1 |
| Zeilen-Nr. | \(x_2\) | \(x_1\) | \(x_0\) | \(f\) | \(f\oplus f_1\) | \(f\oplus f_2\) | \(f\oplus f_3\) | \(f\oplus f_4\) | \(f\oplus f_{17}\) |
|---|---|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
| 2 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 3 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 1 |
| 4 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 5 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 |
| 6 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 7 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 1 | 0 |
Alternative Darstellungen
\[ f(x_i/a)=f(x_{n-1},\ldots,x_{i+1},a,x_{i-1},\ldots,x_0) \]
Dabei sei \(a\) ein fester Wert:
| \(x_2\) | \(x_1\) | \(x_0\) | \(f\) |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 |
| 0 | 1 | 0 | 0 |
| 0 | 1 | 1 | 1 |
| 1 | 0 | 0 | 1 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 0 |
| 1 | 1 | 1 | 1 |
\[ f=\ ? \]
Gültig: Ordnung \(x_2<x_1<x_0\); die 1-Kante von \(x_2\) überspringt \(x_1\) und \(x_0\)
Ungültig: Kreis \(x_2\to x_1\to x_2\)
Ungültig: keine feste Variablenordnung (\(x_1\) vor \(x_0\) links, \(x_0\) vor \(x_1\) rechts)
| Dualzahl | Gray-Code |
|---|---|
| 00 | 00 |
| 01 | 01 |
| 10 | 11 |
| 11 | 10 |
| \(c_2\) | \(c_1\) | \(c_0\) | \(C_2\) | \(C_1\) | \(C_0\) |
|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 | 0 | 1 |
| 0 | 1 | 0 | 0 | 1 | 1 |
| 0 | 1 | 1 | 0 | 1 | 0 |
| 1 | 0 | 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 1 | 1 | 1 |
| 1 | 1 | 0 | 1 | 0 | 1 |
| 1 | 1 | 1 | 1 | 0 | 0 |
\[ \begin{aligned} C_2 &= f(c_2,c_1,c_0) = c_2\overline{c_1}\,\overline{c_0}\lor c_2\overline{c_1}c_0\lor c_2c_1\overline{c_0}\lor c_2c_1c_0\\[1.5em] C_1 &= g(c_2,c_1,c_0) = \overline{c_2}c_1\overline{c_0}\lor \overline{c_2}c_1c_0\lor c_2\overline{c_1}\,\overline{c_0}\lor c_2\overline{c_1}c_0\\[1.5em] C_0 &= h(c_2,c_1,c_0) = \overline{c_2}\,\overline{c_1}c_0\lor \overline{c_2}c_1\overline{c_0}\lor c_2\overline{c_1}c_0\lor c_2c_1\overline{c_0} \end{aligned} \]