# Gates and their rules

```Gates and their rules:
NOT Gate
Accepts 1 input and produces one output.
Also called an Inverter because the output is always opposite of the input.
AND Gate
Accepts two input signals.
If both are 1, the output is 1; otherwise, the output is 0.
OR Gate
Accepts two input signals
If both are 0, the output is 0: otherwise, the output is 1
XOR Gate
Accepts two input signals
If both are the same, the output is 0; otherwise, the output is 1.
Note: The difference between the XOR gate and the OR gate:
They differ in only one input situation:
When both inputs are 1, the OR gate produces a 1 and the XOR produces a 0.
XOR is called the exclusive OR because its output is 1 If (and only if):
Either one input or the other is a 1
Excluding the case that they both are.
It is one or the other, not both.
NAND Gate (the NOT of AND)
If both inputs are 1, the output is 0: otherwise, the output is 1.
NOR Gate (the NOT of OR)
If both inputs are 0, the output is 1; Otherwise, the output is 0.
Gates with more than two inputs:
A 3 input AND gate produces an output of 1 only if all input values are 1.
Combinational Circuits:
Gates are combined into circuits by using the output of one gate as the input for another:
Boolean Expression: AB+AC
Note that A is an input for both the top AND gate and the lower AND gate. The top gate is AB
and the lower is AC.
AB becomes the first input, D for the OR gate
```