Logic Circuits

Logic Circuits … are the basis for digital computing and machine automation. 

The simplest logic circuits have two binary inputs (taking values 0=False and 1=True) and produce a binary output.

We’re all familiar with the phrase at Halloween “Trick OR Treat”, where we get a True output if either input is true. 

But less familiar (at Halloween!) is AND, where both inputs must be true for an output, or Exclusive OR (XOR) where the output is True if only one of the inputs is True.

There are complementary versions for each of these logic circuits that negate the output. 

Boolean Logic - at Halloween!

As important is the Invert or Negation function. It has one input, one output, and they are always opposites. When the input is true the output is false; when the input is false the output is true. 

Here’s a concise and formal description and truth table for each of the two-input logic circuits. Check them out against the Halloween Pumpkin diagrams 😉.

Each gate performs a basic logical operation, and their outputs are determined strictly by the current state of their inputs.

You can find a dynamic simulation of these circuits as a summary of how they work here. See if it checks with your understanding of! 

1. **OR Gate:**

– Description: Outputs true (1) if at least one of the inputs is true. More info here —> Inclusive OR Gate
– Truth Table:

| A | B | Output |
|—|—|——–|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |

2. **AND Gate:**

– Description: Outputs true only if both inputs are true. More info here —> AND Gate
– Truth Table:

| A | B | Output |
|—|—|——–|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |

3. **XOR Gate (Exclusive OR):**

– Description: Outputs true only if the inputs are different. More info here —> Exclusive OR Gate
– Truth Table:

| A | B | Output |
|—|—|——–|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |

4. **NAND Gate (NOT AND):**

– Description: Outputs false only if both inputs are true (inverse of AND gate). More info here —> 
– Truth Table:

| A | B | Output |
|—|—|——–|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |

5. **NOR Gate (NOT OR):**

– Description: Outputs true only if both inputs are false (inverse of OR gate). More info here —> Negative OR (NOR) Circuit
– Truth Table:

| A | B | Output |
|—|—|——–|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 0 |

6. **NXOR Gate (NOT XOR or XNOR):**

– Description: Outputs true only if the inputs are the same (inverse of XOR gate). More info here —> 
– Truth Table:

| A | B | Output |
|—|—|——–|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |

Page Design: Donald KALLGREN, MSEE,  Copyright 2023

Truth Tables and Descriptions provided by ChatGPT 4 in response to this prompt:

”Provide a concise description and truth table for each of the following two-input logic circuits: OR, AND, XOR, NAND, NOR, NXOR”.