# Why are we using a logic circuit

## Everything NAND, OR?

 K L. ^ K ^ L ^ K NAND ^ L OR 0 0 1 1 1 0 0 1 1 0 0 1 1 0 0 1 0 1 1 1 0 0 0 1

Table 7: OR from NAND and NOT

That fits quite well, except that the values ​​of are negated. We just have to add an emergency.

 K L. ^ K ^ L ^ K NAND ^ L ^ (^ K NAND ^ L) OR 0 0 1 1 1 0 0 0 1 1 0 0 1 1 1 0 0 1 0 1 1 1 1 0 0 0 1 1

Table 8: OR from NAND and NOT

In the truth table we have added some columns for intermediate results: ^ K and ^ L. It’s easy. To calculate ^ K AND ^ L, we take the values ​​of ^ K and ^ L and look in the NAND table. The column ^ (^ K NAND ^ L) is simple again.

And the result is, ^ (^ K NAND ^ L) K agrees OR L match. So

K OR L = NOT ((NOT K) AND (NOT L))

Confusing?

The logicians agree, you can't even read it properly. Therefore they write as lazy writing:

K + L = ^ (^ K * ^ L)

Looks like a formula with addition and multiplication. It applies

 description symbol example NOT ^ ^ A AND * A * B OR + A + B NAND ^ (A * B)

Table 9: Logical symbols

The above considerations are not simple, but with the truth table it was manageable. For the ancient Greeks, this required a long study in the philosophical schools.

Don't worry, we don't always need to do this type of pull-up. In the next internship we will learn how any logical functions can be converted into NAND logics with the help of a program.

Our knowledge

K + L = ^ (^ K * ^ L)

is crucial here.

We turn a NAND gate into an OR gate by switching a NOT in front of each input of the NAND and a NOT after the output.

### OR from NAND

We want to build electronics. So let's build an OR from NAND gates.

We need all four gates of the 74HC00 to build an OR.

We should build the circuit on the breadboard and check that the result matches the truth table for OR. If you want, you can connect LEDs to the outputs of the intermediate results (3, 6, 11) and check them using Table 8.

### NOR

If there is NAND, there should be NOR too. NAND is AND with a NOT after it. A NOR is then an OR with a NOT after it.

We need a second chip for this circuit. At the output of the circuit we have two NOTs in a row.

The power supplies for the chips are not shown in Figure 3. The unused inputs of U2 are also not shown.

Convention:
The power supply of components does not have to be shown. All unused connections are connected to 0V or at 5V placed.

We set up a truth table:

Table 10: NOT NOT

We take from the table

^^ K = K NOT NOT K = K

We can think logically: Kurt is not not on the bridge, so: Kurt is on the bridge.

Aha! NOT behind NOT is canceled. The two NOTs can be omitted.

We check the circuits against the truth table for NOR

 K L. NOR 0 0 1 0 1 0 1 0 0 1 1 0

Table 11: NOR