Skip to content
Skip to main content

Fundamental Logic Gates: The AND Gate and OR Gate

JSS3 Term 1 • Week 3
About 40 minutes
Learning goals: Define a Logic Gate as an electronic building block that accepts binary inputs and produces a single binary output. • Draw the standard ANSI circuit symbols for the AND gate and the OR gate. • Construct and verify complete Truth Tables for two-input AND and OR gates. • Write the Boolean algebraic expressions for AND ($A \cdot B$) and OR ($A + B$).

In Week 2, we learned that digital computing is built upon binary states (1 and 0) and we saw how physical switches in series and parallel can control an electrical current.

In modern microchips, we do not use physical mechanical switches operated by human fingers. Instead, microscopic transistors are etched onto silicon wafers to form miniature decision-making circuits called Logic Gates.

A logic gate is the elementary building block of all digital electronics. Every computer processor, calculator, and smartphone contains millions or billions of these gates! In this lesson, we will explore the two most fundamental gates: the AND Gate and the OR Gate.


Learning Outcomes

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

  1. Define what a logic gate is and explain its operational role.
  2. Draw the standard ANSI symbols for the AND gate and OR gate.
  3. Construct and calculate complete Truth Tables for two-input gates.
  4. Write Boolean algebraic equations for AND ($Y = A \cdot B$) and OR ($Y = A + B$).

Key Vocabulary

Term Technical Meaning
Logic Gate An electronic circuit with one or more binary inputs and exactly one binary output based on a boolean function.
Truth Table A mathematical table displaying all possible input combinations and their resulting logical output.
Boolean Algebra The branch of mathematics developed by George Boole dealing with logical variables that can only be True (1) or False (0).
AND Gate A gate that outputs 1 ONLY when all its inputs are 1.
OR Gate A gate that outputs 1 if AT LEAST ONE input is 1.

The AND Gate: Logical Conjunction ($Y = A \cdot B$)

The AND Gate operates on the rule of agreement: its output becomes High (1) if and only if Input A is 1 AND Input B is 1.

1. ANSI Circuit Symbol

The AND gate symbol has a straight back on the input side and a rounded, curved front on the output side (shaped like a capital letter D):

    A -------\
              \
               )------ Y (Output: Y = A . B)
              /
    B -------/
   (Flat back, rounded front: 'D' shape)

2. The AND Gate Truth Table

Since there are 2 inputs ($A$ and $B$), and each input can be either 0 or 1, there are $2^2 = 4$ possible input combinations:

Input A Input B Boolean Math ($A \times B$) Output Y
0 0 $0 \times 0$ 0
0 1 $0 \times 1$ 0
1 0 $1 \times 0$ 0
1 1 $1 \times 1$ 1

Notice: The output is 0 for three combinations, and only turns 1 when both inputs are 1!


The OR Gate: Logical Disjunction ($Y = A + B$)

The OR Gate operates on the rule of alternatives: its output becomes High (1) if Input A is 1 OR Input B is 1 (or both!).

1. ANSI Circuit Symbol

The OR gate symbol has a curved, concave back and curves forward into a sharp, pointed tip:

    A -------\
              \
               )------ Y (Output: Y = A + B)
              /
    B -------/
   (Curved back, pointed front tip)

2. The OR Gate Truth Table

Input A Input B Boolean Math ($A + B$) Output Y
0 0 $0 + 0$ 0
0 1 $0 + 1$ 1
1 0 $1 + 0$ 1
1 1 $1 + 1$ 1

(Note in Boolean logic: $1 + 1 = 1$, because you cannot have a logic state higher than True!).


Worked Example: Automated Bank Vault Security

Problem: A commercial bank in Lagos has an automated cash vault. The heavy steel door must unlock ($Y = 1$) only when two conditions are met: 1. Input A: The Bank Manager turns their physical security key ($A = 1$). 2. Input B: The Chief Security Officer enters the correct electronic PIN code ($B = 1$).

Analysis: - Should the security engineers use an AND gate or an OR gate? - If they used an OR gate, anyone who found the manager's key alone could open the vault without the security officer! That would be insecure. - The engineers must use an AND gate:

$$Y = A \cdot B$$

The vault will open only when both authorized officers are present simultaneously!


Practical Class Activity: Verifying Truth Tables

In your notebook, complete the output columns for these two mini-scenarios:

  1. Scenario 1 (AND Gate):
  2. $A = 1, B = 0 \implies Y =$ 0
  3. $A = 1, B = 1 \implies Y =$ 1
  4. Scenario 2 (OR Gate):
  5. $A = 0, B = 0 \implies Y =$ 0
  6. $A = 0, B = 1 \implies Y =$ 1
  7. $A = 1, B = 1 \implies Y =$ 1

Common Mistakes & Corrections

Common Mistake Why It Is Incorrect Proper Correction
"In Boolean algebra, 1 + 1 = 2." Digital logic only has two states: 0 and 1; numbers like 2 do not exist in binary logic. In Boolean addition (OR), $\text{True} + \text{True} = \text{True}$ ($1 + 1 = 1$).
"Confusing the shapes of AND and OR symbols." An AND gate has a flat straight back ('D' shape); an OR gate has a curved back and pointed nose. Remember: AND has a flat back like a capital letter D.

Notebook Summary

Copy Into Your Computing Notebook

  • A Logic Gate is an electronic circuit that processes binary inputs to produce a single logical output.
  • AND Gate ($Y = A \cdot B$): Output is 1 only when ALL inputs are 1. (Symbol: Flat back, 'D' shape).
  • OR Gate ($Y = A + B$): Output is 1 when ANY input is 1. (Symbol: Curved back, pointed tip).
  • Truth Tables list all possible input combinations ($00, 01, 10, 11$) and their resulting outputs.

Check your understanding

What is a Logic Gate in digital electronics?
What is the output of an AND gate when Input A is 1 and Input B is 0?
What is the output of an OR gate when Input A is 0 and Input B is 1?
What mathematical symbol is standardly used in Boolean algebra to represent the AND logical operation?
Feedback appears after you check your answer.