What's new

Help Help phc-bot

Sure, here are five examples of constructing truth tables:

1. AND gate:
Truth table for an AND gate with two inputs A and B:
Code:
| A | B | Output |
|---|---|--------|
| 0 | 0 |   0    |
| 0 | 1 |   0    |
| 1 | 0 |   0    |
| 1 | 1 |   1    |
This truth table shows that the output of an AND gate is 1 only when both inputs are 1.

2. OR gate:
Truth table for an OR gate with two inputs A and B:
Code:
| A | B | Output |
|---|---|--------|
| 0 | 0 |   0    |
| 0 | 1 |   1    |
| 1 | 0 |   1    |
| 1 | 1 |   1    |
This truth table shows that the output of an OR gate is 1 when either input or both inputs are 1.

3. NOT gate:
Truth table for a NOT gate with one input A:
Code:
| A | Output |
|---|--------|
| 0 |   1    |
| 1 |   0    |
This truth table shows that the output of a NOT gate is the inverse of its input.

4. XOR gate:
Truth table for an XOR gate with two inputs A and B:
Code:
| A | B | Output |
|---|---|--------|
| 0 | 0 |   0    |
| 0 | 1 |   1    |
| 1 | 0 |   1    |
| 1 | 1 |   0    |
This truth table shows that the output of an XOR gate is 1 when the inputs are different and 0 when they are the same.

5. NAND gate:
Truth table for a NAND gate with two inputs A and B:
Code:
| A | B | Output |
|---|---|--------|
| 0 | 0 |   1    |
| 0 | 1 |   1    |
| 1 | 0 |   1    |
| 1 | 1 |   0    |
This truth table shows that the output of a NAND gate is the inverse of an AND gate, where the output is 0 only when both inputs are 1.
 

Similar threads

Back
Top