Circuits can be used to operate on binary values.

Our two values, $1$ and $0$, can be used in Boolean Logic to manipulate expressions. Binary $1$ and $0$ maps to true and false in Boolean Logic.

Truth Tables

Truth tables lay out true/false values for Boolean expressions, for each possible input.

$$\textcolor{pink}{\text{AND}}\\a\cdot b\\ \begin{array}{cc|c} \text{a}&\text{b}&\text{Y}\\ \hline 0&0&0\\ 0&1&0\\ 1&0&0\\ 1&1&1 \end{array}$$

$$\textcolor{pink}{\text{OR}}\\a+ b\\ \begin{array}{cc|c} \text{a}&\text{b}&\text{Y}\\ \hline 0&0&0\\ 0&1&1\\ 1&0&1\\ 1&1&1 \end{array}$$

$$\textcolor{pink}{\text{XOR}}\\ \begin{array}{cc|c} \text{a}&\text{b}&\text{Y}\\ \hline 0&0&0\\ 0&1&1\\ 1&0&1\\ 1&1&0 \end{array}$$

$$\textcolor{pink}{\text{NOT}}\\\overline a\\ \begin{array}{c|c} \text{a}&\text{Y}\\ \hline 0&1\\ 1&0\\ \end{array}$$


Transistors are solid-state switches.

A transistor diagram.

A transistor diagram.

Logic Gates

A logic gate represents a simple truth table.

The different gates require different numbers of transistors.

Logic gates that correspond to truth tables.

Logic gates that correspond to truth tables.

$\text{NAND}$ and $\text{NOR}$ gates are functionally complete, meaning you can build any other gate from them.

DeMorgan's Law

DeMorgan's Law gives us guidelines for the transformation of circuit expressions.

$$\overline{\overline{A}\cdot \overline{B}}=A+B\\ {\overline{A}\cdot \overline{B}}=\overline{A+B}\\ \overline{\overline{A}+ \overline{B}}=A\cdot B\\ {\overline{A}+ \overline{B}}=\overline{A\cdot B} $$

However, for larger expressions, it may be easier to make a truth table for your equation and then base your new equation on that.