ECE 275: Boolean algebra review

https://vikasdhiman.info/ECE275-Sequential-Logic/

Basic gates

AND gate
\( L_{\text{AND}}(x_1, x_2) = x_1 \cdot x_2 \)
OR gate
\( L_{\text{OR}}(x_1, x_2) = x_1 + x_2 \)

NOT gate
\( L_{\text{NOT}}(x_1) = \bar{x}_1 \)
Source:Verilog 3rd, Brown and Vranesic 2014

Boolean algebra

Single variable Theorems

  • \( x \cdot 0 = ? \)

    \( x \cdot 0 = 0 \)

  • \( x + 1 = ? \)

    \( x + 1 = 1 \)

  • \( x \cdot 1 = ? \)

    \( x \cdot 1 = x \)

  • \( x + 0 = ? \)

    \( x + 0 = x \)

  • \( x \cdot x = ? \)

    \( x \cdot x = x \)

  • \( x + x = ? \)

    \( x + x = x \)

  • \( x \cdot \bar{x} = ? \)

    \( x \cdot \bar{x} = 0 \)

  • \( x + \bar{x} = ? \)

    \( x + \bar{x} = 1 \)

  • \(\bar{\bar{x}} = x \)
\[ \newcommand{\bx}{\bar{x}} \newcommand{\by}{\bar{y}} \newcommand{\bz}{\bar{z}} \]

Sample homework problem

Use algebraic manipulation to find the minimum product of sums expression for the function


\[ f = x_1 \bx_3 \bx_4 + x_2 \bx_3 \bx_4 + x_1 \bx_2 \bx_3 \]
\[ f = x_1 \bx_3 \bx_4 + x_2 \bx_3 \bx_4 + x_1 \bx_2 \bx_3 \]

Soln

\begin{align} f &= x_1 \bx_3 \bx_4 + x_2 \bx_3 \bx_4 + x_1 \bx_2 \bx_3 & \\ &= x_1 (x_2 + \bx_2) \bx_3 \bx_4 + x_2 \bx_3 \bx_4 + x_1 \bx_2 \bx_3 & \because 1 = x_2 + \bx_2 \end{align}
\(\bar{x}_1\) \(x_1 \)
\(\bar{x}_2\) \(x_2 \) \(\bar{x}_2\)
\(\bar{x}_3\)\(\bar{x}_4\) 0 1 1 1
\(x_4\) 0 0 0 1
\(x_3\) 0 0 0 0
\(\bar{x}_4\) 0 0 0 0
\begin{align} &= x_1 x_2 \bx_3 \bx_4 + x_1 \bx_2 \bx_3 \bx_4 + x_2 \bx_3 \bx_4 + x_1 \bx_2 \bx_3 & \text{ by distributive prop. } \\ &= (x_1 + 1) x_2 \bx_3 \bx_4 + x_1 \bx_2 \bx_3 (x_4 + 1) & \text{ by distributive prop. } \\ &= x_2 \bx_3 \bx_4 + x_1 \bx_2 \bx_3 & \text{ by absorption } \end{align} This is the simplest sum-of-product form.

Sample homework problems

Use algebraic manipulation to prove that

\[ x + yz = (x+y)(x+z) \]

Soln

To prove: \( x + yz = (x+y)(x+z) \)
\begin{align} \text{RHS} &= (x+y)(x+z) \\ &= x(x+z)+ y(x+z) & \text{ by distributive prop} \\ &= x\cdot x + x\cdot z + y \cdot x + y \cdot z & \text{ by distributive prop } \\ &= x + xz + yx + yz & \because x \cdot x = x \\ &= x(1 + z + y) + yz & \text{by commutative prop} \\ &= x + yz = \text{LHS} & \text{ by absorption } \end{align}

Design of three-way light control

Soln: three-way light control


Truth table

Rowxyz f
0 0000
1 0011
2 0101
3 0110
4 1001
5 1010
6 1100
7 1111
\[ 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

Rowsx_1x_2 f
0 0000
1 0010
2 0101
3 0111
4 1000
5 1011
6 1100
7 1111
\( 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 \)

Sample homework problem

Determine whether or not the following expressions is valid

\[ \bx_1 x_3 + x_1 x_2 \bx_3 + \bx_1 x_2 + x_1 \bx_2 = \bx_2 x_3 + x_1 \bx_3 + x_2 \bx_3 + \bx_1 x_2 x_3 \]

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) \)

Review: Minterms

Truth table

Row numABCDf
000000
100011
200100
300110
401000
501011
601100
701110
810000
910010
1010100
1110110
1211000
1311011
1411100
1511110

Minterms

List of rows where function is 1

\(f = m_1 + m_5 + m_{13} \)

\(f = \sum m(1, 5, 13) \)

Review: Sum of products

Minterms

\(f = \sum m(1, 5, 13) \)

\(m_0\) \(\triangleq \bar{A} \bar{B} \bar{C} \bar{D} \)
\(m_1\) \(\triangleq \bar{A} \bar{B} \bar{C} D \)
\(m_2\) \(\triangleq \bar{A} \bar{B} C \bar{D} \)
\(m_3\) \(\triangleq \bar{A} \bar{B} C D \)
\(m_4\) \(\triangleq \bar{A} \bar{B} \bar{C} \bar{D} \)
\(m_5\) \(\triangleq \bar{A} \bar{B} \bar{C} D \)
\(m_6\) \(\triangleq \bar{A} \bar{B} C \bar{D} \)
\(m_7\) \(\triangleq \bar{A} \bar{B} C D \)
\(m_8\) \(\triangleq A \bar{B} \bar{C} \bar{D} \)
\(m_9\) \(\triangleq A \bar{B} \bar{C} D \)
\(m_{10}\) \(\triangleq A \bar{B} C \bar{D} \)
\(m_{11}\) \(\triangleq A \bar{B} C D \)
\(m_{12}\) \(\triangleq A B \bar{C} \bar{D} \)
\(m_{13}\) \(\triangleq A B \bar{C} D \)
\(m_{14}\) \(\triangleq A B C \bar{D} \)
\(m_{15}\) \(\triangleq A B C D \)

Sum of products

\( f = \bar{A} \bar{B} \bar{C} D + \bar{A} \bar{B} \bar{C} D + A B \bar{C} D \)

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 an expression for

\(f = \sum m(0, 2, 3, 4, 5, 6, 7) \)

Thanks, Questions, Feedback?

https://vikasdhiman.info/ECE275-Sequential-Logic/