Controlling electricity gives us the ability to make yes and no decisions or

and **true**

. By combining two signals, we can give a single **false**

or **true**

answer, depending on the **false**

. The flow of electricity is controlled using **logic**

(no, not named after Bill Gates - like a gate).**gates**

NOT

AND

NAND

OR

NOR

XOR

XNOR

All Truth Tables

NOT

The simplest gate, this item ** inverts** or reverses the signal. $Q= \overline A$

Input (A) | Output (Q) |

0 | 1 |

1 | 0 |

AND

Only outputs true if both inputs are true. $Q = A \cdot B \text{ or } A \times B$

A | B | Output (Q) |

0 | 0 | 0 |

0 | 1 | 0 |

1 | 0 | 0 |

1 | 1 | 1 |

NAND

Any gate with a dot is an `inverted`

gate. $Q = \overline{A \cdot B} \text{ or } \overline{A \times B}$
This is the NOT AND gate:

A | B | Output (Q) |

0 | 0 | 1 |

0 | 1 | 1 |

1 | 0 | 1 |

1 | 1 | 0 |

OR

One or the other or both! $Q = A+B$

A | B | Output (Q) |

0 | 0 | 0 |

0 | 1 | 1 |

1 | 0 | 1 |

1 | 1 | 1 |

NOR

Very simply NOT OR. $Q = \overline{A+B}$

A | B | Output (Q) |

0 | 0 | 1 |

0 | 1 | 0 |

1 | 0 | 0 |

1 | 1 | 0 |

XOR

Exclusive OR meaning only one is true, not both. $Q = A \bigoplus B$

A | B | Output (Q) |

0 | 0 | 0 |

0 | 1 | 1 |

1 | 0 | 1 |

1 | 1 | 0 |

XNOR

Exclusively NOT OR. If both inputs are the same, output true. $Q = \overline{A \bigoplus B}$

A | B | Output (Q) |

0 | 0 | 1 |

0 | 1 | 0 |

1 | 0 | 0 |

1 | 1 | 1 |

The two "universal" gates are

and **NOR**

- it is said that you can create all the other logic gates with a combination of just these two.**NAND**

There are tons of videos available about logic gates. If I had to pick a favourite, my current is this one, although she talks incredibly fast and you might need to slow it down or rewind.