| | \(\bar{A}\) | \(A \) |
| | \(\bar{B}\) | \(B \) | \(\bar{B}\) |
\(\bar{C}\) | \(\bar{D}\) |
\(m_0\) | \(m_4\) | \(m_{12}\) | \(m_8\) |
\(D\) |
\(m_1\) | \(m_5\) | \(m_{13}\) | \(m_9\) |
\(C\) |
\(m_3\) | \(m_7\) | \(m_{15}\) | \(m_{11}\) |
\(\bar{D}\) |
\(m_2\) | \(m_6\) | \(m_{14}\) | \(m_{10}\) |
| | \(\bar{A}\) | \(A \) |
| | \(\bar{B}\) | \(B \) | \(\bar{B}\) |
\(\bar{C}\) | \(\bar{D}\) |
0 | 0 | 0 | 0 |
\(D\) |
1 | 1 | 1 | 0 |
\(C\) |
0 | 0 | 0 | 0 |
\(\bar{D}\) |
0 | 0 | 0 | 0 |
K-map to expression
K-map
| | \(\bar{A}\) | \(A \) |
| | \(\bar{B}\) | \(B \) | \(\bar{B}\) |
\(\bar{C}\) | \(\bar{D}\) |
0 | 0 | 0 | 0 |
\(D\) |
1 | 1 | 1 | 0 |
\(C\) |
0 | 0 | 0 | 0 |
\(\bar{D}\) |
0 | 0 | 0 | 0 |
Expression
\(f = \bar{A}\bar{C}D + B\bar{C}D \)
Expression to truth table
Expression
\(f = \bar{A}\bar{C}D + B\bar{C}D \)
Truth table
Row num | A | B | C | D |
\(\bar{A}\bar{C}D\) |
\(B\bar{C}D\) |
f |
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1 | 0 | 0 | 0 | 1 | 1 | 0 | 1 |
2 | 0 | 0 | 1 | 0 | 0 | 0 | 0 |
3 | 0 | 0 | 1 | 1 | 0 | 0 | 0 |
4 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
5 | 0 | 1 | 0 | 1 | 1 | 1 | 1 |
6 | 0 | 1 | 1 | 0 | 0 | 0 | 0 |
7 | 0 | 1 | 1 | 1 | 0 | 0 | 0 |
8 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
9 | 1 | 0 | 0 | 1 | 0 | 0 | 0 |
10 | 1 | 0 | 1 | 0 | 0 | 0 | 0 |
11 | 1 | 0 | 1 | 1 | 0 | 0 | 0 |
12 | 1 | 1 | 0 | 0 | 0 | 0 | 0 |
13 | 1 | 1 | 0 | 1 | 0 | 1 | 1 |
14 | 1 | 1 | 1 | 0 | 0 | 0 | 0 |
15 | 1 | 1 | 1 | 1 | 0 | 0 | 0 |
Truth table to timing diagram
Row num | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
A | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
B | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 |
C | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 |
D | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 |
f | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 |
Boolean expression to Verilog
\( f = \overline{(A\bar{B} + C)}D \)
Verilog
module examplefunction1(A, B, C, D, f);
input A, B, C, D;
output f;
assign f = (~(A&(~B) | C))&D;
endmodule
Functionally equiv networks
\(f_1 = \overline{(A\bar{B} + C)}D \)
\(f_2 = (\bar{A} + B)\bar{C}D \)
Boolean algebra
Axioms
-
\( 0 \cdot 0 = 0 \)
-
\( 1 + 1 = 1 \)
-
\( 1 \cdot 1 = 1 \)
-
\( 0 + 0 = 0 \)
-
\( 0 \cdot 1 = 1 \cdot 0 = 0 \)
-
\( \bar{0} = 1 \)
-
\( \bar{1} = 0 \)
Single variable Theorems
-
\( x \cdot 0 = 0 \)
-
\( x + 1 = 1 \)
-
\( x \cdot 1 = x \)
-
\( x + 0 = x \)
-
\( x \cdot x = x \)
-
\( x + x = x \)
-
\( x \cdot \bar{x} = 0 \)
\( x + \bar{x} = 1 \)
-
\(\bar{\bar{x}} = x \)
Duality: Swap \( + \) with \( \cdot \) and \( 0 \) with \( 1 \) to get another law
Two and three variable properties
\(x \cdot y = y \cdot x\) | Commutative |
\(x + y = y + x\) |
\(x \cdot (y \cdot z) = (x \cdot y) \cdot z\) | Associative |
\(x + (y + z)= (x + y) + z\) |
\(x \cdot (y + z) = x\cdot y + x \cdot z\) | Distributive |
\(x + y\cdot z = (x+y) \cdot (x+z)\) |
DeMorgan's theorem
- \( \overline{x \cdot y} = \bar{x} + \bar{y} \)
- \( \overline{x + y} = \bar{x} \cdot \bar{y} \)
DeMorgan's theorem
- \( \overline{x \cdot y} = \bar{x} + \bar{y} \)
- \( \overline{x + y} = \bar{x} \cdot \bar{y} \)
Prove that for two variable function
\( \bar{m}_0 = M_0 \)
Soln: Prove that for two variable function
\( \bar{m}_0 = M_0 \)
\begin{align}
m_0 &= \bar{x}_1 \bar{x}_2 & \text{ by definition of } m_0
\\
\implies \bar{m}_0 &= \overline{\bar{x}_1 \bar{x}_2} &
\\
&= \bar{\bar{x}}_1 + \bar{\bar{x}}_2 & \text{ by DeMorgan's theorem }
\\
&= x_1 + x_2 = M_0 & \text{ by definition of } M_0
\end{align}
Inequality
- Define \(x \le y \) as \(x = 0\) whenever \( y = 0 \)
- If \(x \le y \) and \( y \le x\), then \( x = y \)
- If \(x \le y \), then \( x \cdot y = x \) and \(x + y = y\)
- \(x \cdot z \le z \) and \( x \cdot z \le x\)
Two and three variable properties
\(x + x \cdot y = x \) | Absorption |
\(x \cdot (x + y) = x \) |
\(x \cdot y + x \cdot \bar{y} = x \) | Combining |
\((x + y)\cdot (x + \bar{y}) = x \) |
Two and three variable properties
\(x + \bar{x}y = x + y \) | Concensus |
\(x \cdot (\bar{x} + y) = x \cdot y \) |
\(x \cdot y + y \cdot z + \bar{x} \cdot z = x \cdot y + \bar{x} \cdot z \) |
\((x + y) \cdot ( y + z ) \cdot (\bar{x} + z) = (x + y) \cdot (\bar{x} + z) \) |
\[
\newcommand{\bx}{\bar{x}}
\newcommand{\by}{\bar{y}}
\newcommand{\bz}{\bar{z}}
\]
Prove that
If \( x + y = 1 \) and \( xy = 0 \) then \( \bx = y \)
Soln: Prove that
If \( x + y = 1 \) and \( xy = 0 \) then \( \bx = y \)
\begin{align}
&x + y = 1
\\
&\implies x \bx + y \bx = \bx & \text{ multiply both sides by } \bx
\\
&\implies y \bx = \bx & \because x \bx = 0
\\
&\implies y \bx + y x = \bx + y x & \text{ add } y x \text{ to both sides }
\\
&\implies y (\bx + x) = \bx & \text{by dist. prop. and } xy = y x = 0
\\
&\implies y = \bx &
\end{align}
Prove that for two variable function
\( \overline{\sum m(0, 2)} = \sum m(1, 3) \)
Soln: Prove that for two variable function
\( \overline{\sum m(0, 2)} = \sum m(1, 3) \)
We know that \( \sum m(0, 2) + \sum m(1, 3) = 1 \)
\begin{align}
\left(\sum m(0, 2) \right)& \cdot \left(\sum m(1, 3) \right)\\
&= (\bx_1 \bx_2 + x_1 \bx_2)(\bx_1 x_2 + x_1 x_2)
\\
&= \bx_1 \bx_2 \bx_1 x_2 + \bx_1 \bx_2 x_1 x_2 + x_1 \bx_2 \bx_1 x_2 + x_1 \bx_2 x_1 x_2
\\
&= 0
\end{align}
Prove that for three variable function
\( \sum m(0, 2, 3, 7) = \prod M(1, 4, 5, 6) \)
Soln: Prove that for three variable function
\begin{align}
\sum m(0, 2, 3, 7) &= m_0 + m_2 + m_3 + m_7
\\
&= \overline{ m_1 + m_4 + m_5 + m_6}
\\
&= \bar{m}_1 \bar{m}_4 \bar{m}_5 \bar{m}_6
\\
&= M_1 M_4 M_5 M_6
\\
&=\prod M(1, 4, 5, 6)
\end{align}
Design of three-way light control
Soln: three-way light control
Truth table
Row | x | y | z |
f |
0 | 0 | 0 | 0 | 0 |
1 | 0 | 0 | 1 | 1 |
2 | 0 | 1 | 0 | 1 |
3 | 0 | 1 | 1 | 0 |
4 | 1 | 0 | 0 | 1 |
5 | 1 | 0 | 1 | 0 |
6 | 1 | 1 | 0 | 0 |
7 | 1 | 1 | 1 | 1 |
\[ f = \sum m (1, 2, 4, 7)
\\= \bar{x} \bar{y} z + \bar{x} y \bar{z} + x \bar{y} \bar{z} + xyz \]
| \(\bar{x}\) | \(x \) |
| \(\bar{y}\) | \(y \) | \(\bar{y}\) |
\(\bar{z}\) |
0 | 1 | 0 | 1 |
\(z\) |
1 | 0 | 1 | 0 |
Design a multiplexer
Soln: multiplexer
Row | s | x_1 | x_2 |
f |
0 | 0 | 0 | 0 | 0 |
1 | 0 | 0 | 1 | 0 |
2 | 0 | 1 | 0 | 1 |
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 |
\( f = \sum m(2, 3, 5, 7) \)
| \(\bar{s}\) | \(s \) |
| \(\bar{x_1}\) | \(x_1 \) | \(\bar{x_1}\) |
\(\bar{x_2}\) |
0 | 1 | 0 | 0 |
\(x_2\) |
0 | 1 | 1 | 1 |
\(f = sx_1 + \bar{s} x_2 \)