A Buffer is an electronic circuit element used to isolate an input from an output. The buffer’s output state mirrors the input state.
| Input | Output |
| —– | ———————– |
| A | Q |
| 0 | |
| 1 | |
A Not gate or an inverter is a logic gate which implements logical negation. It outputs a bit opposite of the bit that is put into it.
| Input | Output |
|---|---|
| A | Q |
| 0 | |
| 1 |
The And gate is a basic digital logic gate that implements logical conjunction. A high output (1) results only if all the inputs to the and gate are high (1). If not all inputs to the and gate are high, low output results.
| Input1 | Input2 | Output |
|---|---|---|
| A | B | Q |
| 0 | 0 | |
| 0 | 1 | |
| 1 | 0 | |
| 1 | 1 |
The Or gate is a digital logic gate that implements logical disjunction. It outputs a 1 if any inputs are 1, or outputs a 0 only if all inputs are 0.
| Input1 | Input2 | Output |
|---|---|---|
| A | B | Q |
| 0 | 0 | |
| 0 | 1 | |
| 1 | 0 | |
| 1 | 1 |
A Nand gate (not-and) is a logic gate which produces an output which is false, only if all its inputs are true; thus its output is complement to that of an And gate.
| Input1 | Input2 | Output |
|---|---|---|
| A | B | Q |
| 0 | 0 | |
| 0 | 1 | |
| 1 | 0 | |
| 1 | 1 |
The Nor gate is a digital logic gate which produces a high output (1) result if both the inputs to the gate are low (0). If one or both input is high (1), a low output (0) results; thus its output is complement to that of an Or gate.
| Input1 | Input2 | Output |
|---|---|---|
| A | B | Q |
| 0 | 0 | |
| 0 | 1 | |
| 1 | 0 | |
| 1 | 1 |
The Xor(Exclusive Or) gate is a digital logic gate that gives a true (1 or high) output when the number of true inputs is odd. An Xor gate implements an exclusive or; that is, a true output results if one, and only one, of the inputs to the gate is true. If both inputs are false (0/low) or both are true, a false output results.
| Input1 | Input2 | Output |
|---|---|---|
| A | B | Q |
| 0 | 0 | |
| 0 | 1 | |
| 1 | 0 | |
| 1 | 1 |
The Xnor gate is a digital logic gate whose function is the logical complement of the Exclusive Or (Xor) gate.
| Input1 | Input2 | Output |
|---|---|---|
| A | B | Q |
| 0 | 0 | |
| 0 | 1 | |
| 1 | 0 | |
| 1 | 1 |
Now try some where there is more than one gate.
| Input | Output | ||
|---|---|---|---|
| A | B | Sum | Carry |
| 0 | 0 | ||
| 0 | 1 | ||
| 1 | 0 | ||
| 1 | 1 |
| Input | Output | |||
|---|---|---|---|---|
| A | B | Carry in | Sum | Carry |
| 0 | 0 | 0 | ||
| 0 | 0 | 1 | ||
| 0 | 1 | 0 | ||
| 0 | 1 | 1 | ||
| 1 | 0 | 0 | ||
| 1 | 0 | 1 | ||
| 1 | 1 | 0 | ||
| 1 | 1 | 1 |