Skip to content

Activity 2.1.0 — Introduction to Logic & AOI Gates


Learning Objectives

By the end of this lesson, students will be able to:

  1. Define combinational logic and explain how it differs from sequential logic
  2. Identify and describe the three basic logic gates: AND, OR, and NOT
  3. Draw and interpret gate symbols using both ANSI and IEC standards
  4. Construct truth tables for basic gates
  5. Explain the purpose of AOI (AND-OR-Invert) logic in digital design
  6. Understand why Boolean variables can only have values of 0 or 1

Vocabulary

Vocabulary (click to expand)
Term Definition
Combinational Logic A type of digital logic where outputs depend only on current inputs, with no memory of previous states
Logic Gate A basic building block of digital circuits that performs a logical operation on one or more input signals
Truth Table A table showing all possible input combinations and corresponding output values for a logic circuit
Boolean Variable A variable that can only have one of two values: 0 (LOW) or 1 (HIGH)
AOI Logic AND-OR-Invert logic — a standard form of implementing combinational circuits using AND gates, OR gates, and inverters
ANSI Symbol American National Standards Institute standard for logic gate symbols (distinctive shape style)
IEC Symbol International Electrotechnical Commission standard for logic gate symbols (rectangular shape with qualifying indicators)

Part 1: What is Combinational Logic?

Digital electronics is the foundation of every computer, smartphone, calculator, and smart device you use. At the heart of all these systems are logic circuits that make decisions based on input signals.

Understanding Logic Types

There are two main categories of digital logic:

Combinational Logic: - Outputs depend ONLY on current inputs - No memory of previous states - Like a simple calculator: 2 + 2 always equals 4, regardless of what you calculated before

Sequential Logic: - Outputs depend on current inputs AND previous states - Has memory elements (like flip-flops) - Like a vending machine that remembers your inserted coins

In this unit, we focus entirely on combinational logic.

The Binary Nature of Digital Logic

In digital electronics, everything comes down to two states:

State Logic Value Voltage Level Common Representations
LOW 0 0V to 0.8V False, Off, No, Ground
HIGH 1 2.0V to 5V True, On, Yes, VCC

Key insight: Boolean algebra (developed by mathematician George Boole in 1854) is the mathematical system that describes how these two-valued (binary) variables interact. It is the perfect language for digital logic because our circuits also have only two states.


Part 2: The Three Basic Gates

Logic gates are the building blocks of all digital circuits. There are three fundamental gates you must know: AND, OR, and NOT.

The AND Gate

Definition: The output is HIGH (1) only when ALL inputs are HIGH (1).

Think of it like a series circuit with two switches — both must be closed for the light to turn on.

Symbol ANSI Symbol IEC Symbol
AND Distinctive shape with flat input side, curved output Rectangle with "&" qualifier

Truth Table (2-input AND):

A B Z = A·B
0 0 0
0 1 0
1 0 0
1 1 1

Boolean Expression: $Z = A \cdot B$ or simply $Z = AB$

The dot (·) represents the AND operation. In Boolean algebra, we often omit it: $AB$ means "A AND B."


The OR Gate

Definition: The output is HIGH (1) when ANY input is HIGH (1).

Think of it like a parallel circuit with two switches — either switch alone will turn on the light.

Symbol ANSI Symbol IEC Symbol
OR Distinctive shape with curved input side, pointed output Rectangle with "≥1" qualifier (meaning "at least one")

Truth Table (2-input OR):

A B Z = A + B
0 0 0
0 1 1
1 0 1
1 1 1

Boolean Expression: $Z = A + B$

The plus sign (+) represents the OR operation. Note: in Boolean algebra, "1 + 1 = 1" (not 2) because we are dealing with logic, not arithmetic.


The NOT Gate (Inverter)

Definition: The output is the opposite of the input. If input is 1, output is 0, and vice versa.

Symbol ANSI Symbol IEC Symbol
NOT Triangle with a small circle at the output (bubble) Rectangle with "1" qualifier and output bubble

Truth Table (NOT):

A Z = A'
0 1
1 0

Boolean Expression: $Z = A'$ or $Z = \overline{A}$

The prime ('), overline ($\overline{}$), or bar indicates inversion/complement. $A'$ is read as "A prime" or "not A."

Key insight: The small circle (bubble) at a gate input or output indicates inversion. You will see this bubble on NOT gates, NAND gates, NOR gates, and other inverted logic.


Part 3: Gate Symbols — ANSI vs IEC Standards

There are two major standards for drawing logic gate symbols:

ANSI Standard (Distinctive Shape)

  • Uses unique shapes for each gate type
  • AND gate: flat input, curved output
  • OR gate: curved input, pointed output
  • Easy to recognize at a glance
  • Most common in American textbooks and industry

IEC Standard (Rectangular)

  • Uses rectangular shapes for all gates
  • Function indicated by specific symbols inside: "&" for AND, "≥1" for OR, "1" for inverter
  • More consistent and scalable for complex drawings
  • More common in European documentation and some modern CAD software

You should recognize both standards since you will encounter both in the field.


Part 4: Combining Gates — AOI Logic

Real-world digital circuits rarely use just single gates. They combine multiple gates to implement complex logic functions. The most fundamental combination is called AOI (AND-OR-Invert) logic.

What is AOI Logic?

AOI logic implements functions in Sum of Products (SOP) form: 1. AND gates create product terms (minterms) 2. OR gate sums (ORs) the product terms together 3. Inverters provide complements as needed

This is called a "canonical form" because it directly derives from truth tables.

Simple AOI Circuit Example

Consider a circuit with 2-input AND followed by OR:

        _____
A ----|     \
      | AND  )---+--- Z
B ----|_____/   |
               |   _____
               +--|     \
                  | OR   )--- Z_out
               +--|_____/
               |
C -------------+
D -------------+

In this circuit: - The AND gate processes inputs A and B - The OR gate combines the AND output with inputs C and D - The output Z depends on the current state of all inputs

Truth Table for this AOI circuit:

A B C D Z
0 0 0 0 0
0 0 0 1 1
0 0 1 0 1
0 0 1 1 1
0 1 0 0 0
0 1 0 1 1
0 1 1 0 1
0 1 1 1 1
1 0 0 0 0
1 0 0 1 1
1 0 1 0 1
1 0 1 1 1
1 1 0 0 1
1 1 0 1 1
1 1 1 0 1
1 1 1 1 1

Key insight: AOI logic is the foundation for implementing any Boolean function. By understanding AND, OR, and NOT gates, you can build any digital system, from a simple doorbell to a sophisticated computer processor.


Part 5: Why Do We Need Logic Design?

You might wonder: why do we need to learn all these gates and truth tables? The answer is that real-world problems can be expressed as input/output relationships.

Real-World Examples

Traffic Light Controller: - Inputs: North/South car sensor, East/West car sensor, pedestrian button, emergency vehicle sensor - Outputs: Green light for N/S, Green light for E/W, Walk signal, etc. - Logic determines when to change lights based on traffic conditions

Security System: - Inputs: Door sensor, window sensor, motion detector, keypad code, alarm status - Outputs: Alarm on/off, siren, notification to police, lights - Logic decides when to trigger the alarm

Calculator: - Inputs: Keypad buttons (numbers, operations) - Outputs: Display digits - Logic performs arithmetic operations

Home Thermostat: - Inputs: Current temperature, desired temperature, time of day, occupancy sensor - Outputs: Furnace on/off, AC on/off, fan speed - Logic maintains comfortable temperature

In every case, the engineer must: 1. Identify the inputs and outputs 2. Determine when each output should be HIGH or LOW 3. Express this relationship using Boolean logic 4. Implement the logic using gates

This process is called logic design, and it is what you will learn to do in this unit.


Practice Problem — Identifying Gate Outputs

Problem 1: For each gate below, determine the output Z for the given inputs.

a) 2-input AND gate with A = 1, B = 0

b) 2-input OR gate with A = 0, B = 0

c) NOT gate with A = 1

d) 2-input AND gate with A = 1, B = 1

e) 2-input OR gate with A = 0, B = 1

Show Solution
Problem Inputs Gate Type Output Z
a A=1, B=0 AND 0 (both must be 1)
b A=0, B=0 OR 0 (neither is 1)
c A=1 NOT 0 (inverts the input)
d A=1, B=1 AND 1 (both are 1)
e A=0, B=1 OR 1 (at least one is 1)

Practice Problem — Drawing Truth Tables

Problem 2: Draw the complete truth table for a 3-input AND gate.

Show Solution
A B C Z = ABC
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 1

Notice: The output is only 1 when ALL three inputs are 1. This is why we call it AND logic — all conditions must be true.


Practice Problem — Real-World Logic

Problem 3: You are designing a security system for a bank vault. The vault opens when: - The manager is present AND the correct code is entered, OR - The backup manager is present AND the alarm is not currently sounding

Define the inputs and write the logic in plain English.

Show Solution

Inputs: - M = Manager present (0 = no, 1 = yes) - C = Correct code entered (0 = no, 1 = yes) - B = Backup manager present (0 = no, 1 = yes) - A = Alarm sounding (0 = no, 1 = yes)

Logic in plain English: "The vault opens when (the manager is present AND the correct code is entered) OR (the backup manager is present AND the alarm is not sounding)."

Boolean Expression: $$Z = (M \cdot C) + (B \cdot A')$$

This shows how real-world conditions translate directly into Boolean expressions!


Summary

The Three Basic Gates

Gate Symbol Output is 1 when... Boolean Expression
AND $\cdot$ or omitted All inputs are 1 $Z = AB$
OR $+$ At least one input is 1 $Z = A + B$
NOT ' or overline Input is 0 $Z = A'$

Gate Symbol Standards

Feature ANSI IEC
Shape Distinctive per gate type Rectangular
AND symbol Curved/output flat Rectangle with "&"
OR symbol Curved input/pointed Rectangle with "≥1"
Inverter Triangle with bubble Rectangle with "1" and bubble

Key Concepts

  • Combinational logic: Outputs depend only on current inputs
  • Boolean algebra: Mathematical system for binary (0/1) variables
  • AOI logic: AND-OR-Invert implementation of logic functions
  • Truth tables: Show all input/output combinations (2^n rows for n inputs)

Key Reminders

  • Remember: AND requires ALL inputs HIGH; OR requires ANY input HIGH
  • The bubble on a gate symbol means inversion (NOT)
  • Boolean algebra is different from regular algebra — for example, 1 + 1 = 1 in Boolean math
  • A prime ($A'$) or overline ($\overline{A}$) means "NOT" or complement
  • Combinational circuits have no memory — same inputs always give same outputs
  • Always count rows in a truth table: 2 inputs = 4 rows, 3 inputs = 8 rows, 4 inputs = 16 rows

Custom activity — adapted from PLTW Digital Electronics