Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

1Learning Outcomes

In the previous section we explained how to generate a truth-table from a given circuit (we simply need to evaluate it for input combinations). The big question is: How do we go the other way? How do we derive a circuit of logic gates from a truth-table?

2Boolean Algebra Operations

Table 1:Boolean algebra basic operations: AND, OR, and NOT. See the logic gate section for truth tables.

OperationBoolean Algebra NotationNotes
AND(a, b)aba \cdot b, ababBasic operation. The \cdot is often dropped, as in the second notation.
OR(a, b)a+ba + bBasic operation.
NOT(a)a\overline{a}Basic operation.

We can also define operations for NAND, NOR, and XOR (though these are not considered basic operations).

Table 2:Boolean algebra NAND, NOR, XOR.

OperationBoolean Algebra NotationNotes
NAND(a, b)ab\overline{a \cdot b} ab\overline{ab}“Not AND”
NOR(a, b)a+b\overline{a + b}“Not OR”
XOR(a, b)aba \oplus bNot a basic operation, but common
enough to have its own symbol.[1]

3Why use Boolean Algebra

The value of Boolean algebra for circuit design comes from the fact that Boolean expressions can be manipulated mathematically. In general, it is much easier to manipulate equations than it is to directly manipulate circuits.

  1. Simplify Circuits. A Boolean algebra expression can be simplified. This simplification will lead directly to a circuit simplification. Using fewer gates means using fewer transistors—cheaper and more energy-efficient!

  2. Verify circuits. Another use for Boolean algebra is in circuit verification. Given a circuit and a Boolean equation, we can ask the question, “Do the two different representations represent the same function?” The first step would be to derive a new Boolean expression based on the circuit. Then through algebraic manipulation we could manipulate the expressions until they match, thereby “proving” the eqivalence of the two.

3.1Example

We can use Boolean algebra to verify the below simplification. The first circuit (y=ab+a+cy = ab + a + c), which uses three gates, is equivalent to the second circuit (y=a+cy = a + c), which uses just one OR gate. We describe this approach at the end of this section.

"TODO"

Figure 1:First circuit: y=ab+a+cy = ab + a + c.

"TODO"

Figure 2:Second equivalent circuit: y=a+cy = a + c.

We will revisit this example.

4Laws of Boolean Algebra

Along with Boolean algebra comes a collection of laws that apply to Boolean expressions. These are simple algebraic equalities that are known to be true. We can manipulate other Boolean expressions through successive application of these laws.

Table 3 lists the most important of the common Boolean laws.

Table 3:Laws of Boolean Algebra.

AND FormOR Form
xy=yxx \cdot y = y \cdot xx+y=y+xx + y = y + xCommutativity
(xy)z=x(yz)(xy)z = x(yz)(x+y)+z=x+(y+z)(x + y) + z = x + (y + z)Associativity
x1=xx \cdot 1 = xx+0=xx + 0 = xIdentity
x0=0x \cdot 0 = 0x+1=1x + 1 = 1Laws of 0’s and 1’s
xy+x=xxy + x = x(x+y)x=x(x + y)x = xUniting Theorem
x(y+z)=xy+xzx(y + z) = xy + xzx+yz=(x+y)(x+z)x + yz = (x + y)(x + z)Distributivity
xx=xx \cdot x = xx+x=xx + x = xIdempotence
xx=0x \cdot \overline{x} = 0x+x=1x + \overline{x} = 1Inverse (Complement)
xy=x+y\overline{xy} = \overline{x} + \overline{y}x+y=xy\overline{x + y} = \overline{x} \cdot \overline{y}DeMorgan’s Laws

Some laws are similar to ordinary (non-Boolean) algebra, but many are specific to Boolean algebra and rely on variables taking on precisely two truth values: 1 (true) and 0(false).

Because of the symmetry of Boolean algebra all these laws come in two versions (the two columns above), one being called the dual version of the other. Practically speaking, this means you only need to remember one version of the law, and the other one can be naturally derived.

4.1Proofs

Analyze the proofs below, which fall into two categories:

4.2Example, revisited

Let us return to the example described above and prove that the first circuit is equivalent to the second circuit.

y=ab+a+cEquation derived from original circuit=a(b+1)+cDistributivity=a(1)+cLaw of 1’s=a+cIdentity (AND)\begin{aligned} y &= ab + a + c && \text{Equation derived from original circuit} \\ &= a(b + 1) + c && \text{Distributivity} \\ &= a(1) + c && \text{Law of 1's} \\ &= a + c && \text{Identity (AND)} \end{aligned}
Footnotes
  1. ab=(a+b)ab=ab+aba \oplus b = (a + b)\overline{ab} = a\overline{b}+\overline{a}b