Skip to main content
SingaporeElectronicsSyllabus dot point

What do the AND, OR and NOT gates do, and how is each one described by its truth table and Boolean expression?

State the function, symbol, truth table and Boolean expression of the AND, OR and NOT logic gates

A focused answer to the O-Level Electronics outcome on the basic logic gates. The AND, OR and NOT gates with their symbols, truth tables and Boolean expressions.

Generated by Claude Opus 4.88 min answer

Reviewed by: AI editorial process; not yet individually human-reviewed

Have a quick question? Jump to the Q&A page

Jump to a section
  1. What this dot point is asking
  2. The answer
  3. Examples in context
  4. Try this

What this dot point is asking

SEAB wants you to state the function, symbol, truth table and Boolean expression of the three basic logic gates: AND, OR and NOT. The central insight is that each gate is a simple rule connecting one or two binary inputs to a binary output, and that the truth table lists the output for every possible combination of inputs. These three gates are the alphabet of all digital logic.

The answer

The AND gate

An AND gate has two (or more) inputs and one output. Its output is logic 1 only when all of its inputs are logic 1; otherwise the output is 0. Think of two switches in series: the lamp lights only when both are closed. The Boolean expression is:

Q=Aβ‹…BQ = A \cdot B

Truth table: 00β†’000 \to 0, 01β†’001 \to 0, 10β†’010 \to 0, 11β†’111 \to 1.

The OR gate

An OR gate has two (or more) inputs and one output. Its output is logic 1 when at least one input is logic 1; the output is 0 only when all inputs are 0. Think of two switches in parallel: the lamp lights if either is closed. The Boolean expression is:

Q=A+BQ = A + B

Truth table: 00β†’000 \to 0, 01β†’101 \to 1, 10β†’110 \to 1, 11β†’111 \to 1.

The NOT gate

A NOT gate, also called an inverter, has a single input and one output. It simply reverses the input: an input of 0 gives an output of 1, and an input of 1 gives an output of 0. The Boolean expression uses a bar over the input:

Q=AˉQ = \bar{A}

Truth table: 0β†’10 \to 1, 1β†’01 \to 0.

Reading the symbols and tables

Each gate has a standard symbol: the AND gate has a flat back and a round front (a D shape), the OR gate has a curved back and a pointed front, and the NOT gate is a triangle with a small circle (the "bubble") on its output that means invert. A truth table must list every input combination: two inputs give four rows, and one input gives two rows. Always work through the rows in the standard binary order so none is missed.

Examples in context

Example 1. A safety interlock with AND. A machine should only run when the guard is closed AND the start button is pressed. Feeding both conditions into an AND gate means the machine starts only when both are true, exactly matching the AND truth table. This is a common safety use of a single gate.

Example 2. An alarm with OR. A burglar alarm should sound if the door sensor OR the window sensor is triggered. An OR gate gives an output of 1 whenever either input is 1, so the siren sounds if either entry point is disturbed. One gate captures the "either one" logic cleanly.

Try this

  • Cue. State the output of an AND gate when its inputs are 1 and 1. AND gives 1 only when both inputs are 1, so the output is 1.

  • Cue. Write the Boolean expression for an OR gate with inputs XX and YY. Q=X+YQ = X + Y, where the plus means OR.

  • Cue. A NOT gate has an input of 0. State its output. The NOT gate inverts its input, so an input of 0 gives an output of 1.

Exam-style practice questions

Practice questions written in the style of SEAB exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.

Original4 marksDraw the truth table for a two-input AND gate and for a two-input OR gate, using inputs A and B.
Show worked answer β†’

AND gate (output is 1 only when both inputs are 1):

A=0 B=0 gives 0; A=0 B=1 gives 0; A=1 B=0 gives 0; A=1 B=1 gives 1.

OR gate (output is 1 when at least one input is 1):

A=0 B=0 gives 0; A=0 B=1 gives 1; A=1 B=0 gives 1; A=1 B=1 gives 1.

What markers reward: all four input combinations listed for each gate, AND giving 1 only for 1111, and OR giving 1 for every row except 0000. A complete, correctly ordered table earns full marks.

Original3 marksState the Boolean expression for each of the AND, OR and NOT gates, and describe in words what the NOT gate does.
Show worked answer β†’

AND: Q=A⋅BQ = A \cdot B. OR: Q=A+BQ = A + B. NOT: Q=AˉQ = \bar{A}.

The NOT gate (an inverter) has a single input and gives the opposite output: an input of 0 gives an output of 1, and an input of 1 gives an output of 0.

What markers reward: the dot for AND, the plus for OR, the bar for NOT, and describing the NOT gate as inverting its single input. Mixing up the dot and plus symbols loses a mark.

Related dot points