2. Basic Gates

  • Feel free to use your laptop

  • You are strongly encourage to work with others

    • When you get stuck, ask those sitting around you for help

    • Get used to working together in the labs

    • Peer teaching and peer learning has been empirically shown to be very effective

For these questions, feel free to use a single Digital workspace for all the circuits. However, label each circuit with labelled rectangles. These are components that can be found under Components -> Misc. -> Decoration -> Rectangle.

Where possible, each question should have complete tests. The test component can be found under Components -> Misc. -> Test case. Once a test component is placed on the workspace, right click on the component to edit the test data.

Questions may have restrictions on the logic gates that may be used. When restrictions are stated, they only apply to the gates; inputs, outputs, wires, etc. may be still be used.

2.1. Creating Gates with Universal Operators

For these questions, although only a single gate type may be used, feel free to use as many copies of these gates as needed.

2.1.1. NAND

  1. Using only NAND, create a circuit that performs NAND

    • This circuit is intentionally trivial

  2. Using only NAND, create a circuit that performs NOT

  3. Using only NAND and NOT, perform AND

  4. Using only NAND and NOT, perform OR

  5. Using only NAND and NOT, perform NOR

2.1.2. NOR

  1. Using only NOR, create a circuit that performs NOR

    • This circuit is intentionally trivial

  2. Using only NOR, create a circuit that performs NOT

  3. Using only NOR and NOT, perform OR

  4. Using only NOR and NOT, perform AND

  5. Using only NOR and NOT, perform NAND

2.2. From Truth Tables

For these questions, first create the truth table if one is not already provided.

  1. Using at least one NOT, create a circuit that performs the following

    \(A\)

    \(O\)

    0

    0

    1

    1

  2. Using only OR and NOT, create a circuit that always outputs 1, regardless of the input

    • Do not use a voltage source or a ground component

    \(A\)

    \(O\)

    0

    1

    1

    1

  3. Using only AND and NOT, create a circuit that always outputs 0, regardless of the input

    • Do not use a voltage source or a ground component

    \(A\)

    \(O\)

    0

    0

    1

    0

  4. Using only AND, OR, and NOT, create a circuit that performs XOR

  5. Using only a single AND and a single OR, create a circuit that performs \((a \lor b) \land (a \lor c)\)

  6. Using only a single AND and a single OR, create a circuit that performs the following

    • This circuit must have two inputs connected

    • Here, the X signifies that the state of \(B\) does not matter

      • In other words, the circuit should function as described, regardless of the state of \(B\)

    \(A\)

    \(B\)

    \(O\)

    0

    X

    0

    1

    X

    1

  7. Complete the following truth table and implement the functionality using only AND, OR, and NOT

    \(a\)

    \(b\)

    \(\lnot b\)

    \(a \land b\)

    \(a \land \lnot b\)

    \(\lnot(a \land b)\)

    \(\lnot(a \land b) \lor (a \land \lnot b)\)