Logic Gates And Logic Circuits (Copy)
Cheat Sheet: A Level Computer Science – Logic Gates and Boolean Logic
1. Logic Gates – Symbols & Functions
| Gate | Symbol | Function | Expression |
|---|---|---|---|
| NOT | ─○ | Inverts input | A’ or ¬A |
| AND | D-shaped with flat edge | True only if both inputs are 1 | A • B |
| OR | Curved edge | True if at least one input is 1 | A + B |
| NAND | AND + small circle | NOT(AND) | (A • B)’ |
| NOR | OR + small circle | NOT(OR) | (A + B)’ |
| XOR (EOR) | OR with extra curved line | True if inputs are different | A ⊕ B |
2. Truth Tables
| A | B | NOT A | A AND B | A OR B | A NAND B | A NOR B | A XOR B |
|---|---|---|---|---|---|---|---|
| 0 | 0 | 1 | 0 | 0 | 1 | 1 | 0 |
| 0 | 1 | 1 | 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 0 | 1 | 1 | 0 | 1 |
| 1 | 1 | 0 | 1 | 1 | 0 | 0 | 0 |
3. Constructing a Logic Circuit
From a Problem Statement
- Identify inputs and desired output conditions
- Translate rules into logic conditions using AND, OR, NOT, etc.
- Combine gates accordingly
From a Logic Expression
- Use the expression to draw gates in correct sequence
- Example:
Expression: (A + B) • C’
Circuit:- OR gate for A and B
- NOT gate for C
- AND gate combining OR result and NOT C
- Example:
From a Truth Table
- Identify rows with output = 1
- Write expression for each using AND of inputs
- Combine with OR for full expression
- Build circuit from expression
4. Constructing a Truth Table
From a Problem Statement
- Work out input/output combinations manually
- Fill table based on stated conditions
From a Logic Circuit
- Evaluate gate by gate using intermediate outputs
From a Logic Expression
- List all input combinations
- Apply logic operation step-by-step to find output
5. Constructing a Logic Expression
From a Problem Statement
- Translate conditions into Boolean terms using:
- AND (•) for all conditions to be true
- OR (+) for alternative conditions
- NOT (¬ or ‘) for negation
From a Logic Circuit
- Trace from inputs to output
- Label gates and intermediate outputs
- Write expressions accordingly
From a Truth Table
- For every row where output = 1:
- Use AND of inputs (inverted if 0)
- Combine all such terms with OR
- Example:
If Output = 1 when A = 0, B = 1 → Term = A’ • B
