Episode 5: Compositions part 1

Preview

Now that we’ve met all of the Great Gates, we can visit their Circuit Circus!

We can put a bunch of gates together by sticking outputs of some gates into inputs of other gates. We refer to these as compositions of gates; we also say that a composition of logic gates forms a logic circuit.

You’ve already seen a few examples of compositions of gates, each involving the NOT gate:

  1. OR then NOT gives NOR,
  2. AND then NOT gives NAND,
  3. XOR then NOT gives XNOR.

Play

First, consider the NOT-NOT composition from Episode 1. What did the diagram for a NOT-NOT composition look like? What did its truth table look like? How would you use a sentence to describe what the NOT-NOT gate does to an input?

What about other examples? The example below shows an AND-AND gate and an OR-OR or gate. Notice that in these examples, the first gate and the second gate in the composition have two inputs and one output. This means that the output of the first gate serves as one input of the second gate and that the composition has three inputs and one output.

Play with the inputs to see how the outputs of the compositions are affected.

[CircuitVerse embed: https://circuitverse.org/simulator/embed/and-and-and-or-or]

Progress

Drag the gates on the right into the empty spots on the left to create a logic diagram represented by the Boolean expression:

$(A \cdot B) \cdot (C \cdot D)$

Drag the gates into the empty spots to create a logic diagram represented by the Boolean expression:

$(A + B) \oplus (C \cdot D)$

When two different logic circuits have the same truth table, we consider them to be equivalent. This is because for the same set of inputs, they return the same set of outputs. A number of properties that you know from algebra work for Boolean algebra too! You already saw in Episode 2 that AND and OR are commutative. Here are some other examples of other familiar algebraic properties arising from composition of gates:

$(A + B)+C = A + (B+C)$associativity of OR
$(A \cdot B)\cdot C = A \cdot (B \cdot C)$associativity of AND
$A \cdot (B+C) = A \cdot B + A \cdot C$distribution of AND over OR

Practice

In the next exercises, we will explore other famous examples of properties that logic gates satisfy called De Morgan’s laws. There are two equations that make up De Morgan’s laws; we will see one equation in each of the exercises below. Each equation has two sides (a left side and a right side), so there are four expressions total.

EXERCISE 1

EXERCISE 2