Boolean Logic

2026 Syllabus Objectives

By the end of this topic, you should be able to:

  1. Identify and use the standard symbols for logic gates
  2. Define and understand the functions of logic gates (NOT, AND, OR, NAND, NOR, XOR)
  3. Use logic gates to create logic circuits from problem statements, logic expressions, and truth tables
  4. Complete truth tables from problem statements, logic expressions, and logic circuits
  5. Write logic expressions from problem statements, logic circuits, and truth tables

What is Boolean Logic?

Boolean logic is a way of making decisions using TRUE or FALSE values. In computer science, we use 1 to represent TRUE and 0 to represent FALSE.

Computers use Boolean logic all the time to make decisions. For example:

  • "If the password is correct AND the username is correct, then let the user log in"
  • "If the temperature is too high OR the smoke detector goes off, then sound the alarm"

Boolean logic uses inputs (the information going in) and outputs (the result that comes out). We give letters to represent them, like A, B, C for inputs and P, Q, X for outputs.


Logic Gates

Logic gates are simple circuits that take one or two inputs and produce one output based on a rule. Think of them as tiny decision-makers inside a computer.

There are six main logic gates you need to know: NOT, AND, OR, XOR, NAND, and NOR.

Each logic gate has:

  • A special symbol (a shape used to draw it)
  • A specific function (what it does)
  • A truth table (a table showing all possible inputs and outputs)

1. NOT Gate

Symbol: A triangle with a small circle at the tip

Function: The NOT gate reverses the input. It has only one input (unlike the others which have two).

Rule:

  • If the input is 1 (TRUE), the output is 0 (FALSE)
  • If the input is 0 (FALSE), the output is 1 (TRUE)

Truth Table:

ANOT A
01
10

Example: Think of it like a switch that does the opposite. If you say "the door is open" (input = 1), NOT gate says "the door is NOT open" (output = 0).


2. AND Gate

Symbol: A flat back with a rounded front (D-shape)

Function: The AND gate outputs TRUE (1) only if BOTH inputs are TRUE. If either input is FALSE, the output is FALSE.

Rule:

  • 1 AND 1 = 1
  • 1 AND 0 = 0
  • 0 AND 1 = 0
  • 0 AND 0 = 0

Truth Table:

ABA AND B
000
010
100
111

Example: "The alarm sounds if the door is open AND it's nighttime." Both conditions must be true.

Sign in to view full notes