Grade 11 Computer Studies Notes: Logic Gates (AND, OR, NOT, NAND, NOR, XOR and Truth Tables)

Grade 11 Computer Studies Notes: Logic Gates (AND, OR, NOT, NAND, NOR, XOR and Truth Tables)

Grade 11 Computer Studies · Strand 1.0 Foundation of Computer Studies · Sub-strand 1.3 Logic Gates

These are free study notes for Grade 11 learners. They follow the official KICD curriculum design for Grade 11 Computer Studies (the same topics, in the same order, that your teacher uses) and are taken from our full Grade 11 Computer Studies notes. Build every truth table the same way: list all input combinations in binary order first (00, 01, 10, 11), then work out one column at a time.

A security light comes on only when it is dark and someone moves. A washing machine starts only when the door is shut and water is in. Devices make these decisions with logic gates, tiny circuits that are the building blocks of every processor. In this topic we learn the six logic gates, their symbols and truth tables, how to predict outputs, how to derive boolean expressions from truth tables, and how gates are used in real life.

Logic gates

Logic gate

An electronic circuit that takes one or more binary inputs and gives one binary output according to a fixed rule.

Truth table

A table that shows the output of a gate or circuit for every possible combination of inputs.

Boolean expression

A way of writing a logic rule using letters and operators, such as Y = A.B.

In logic, 1 stands for true (on, high voltage) and 0 for false (off, low voltage). Gates are made from transistors, and a modern processor holds billions of them.

The six gates

Each gate with its symbol, boolean expression and truth table
Each gate with its symbol, boolean expression and truth table
Rules of the gates
GateRuleReal-life example
ANDOutput is 1 only when ALL inputs are 1A bank safe needs two keys turned; two switches in series
OROutput is 1 when AT LEAST ONE input is 1A bell at the front or back door; two switches in parallel
NOTOutput is the opposite of the inputA fridge light is on when the door is not closed
NANDNOT AND: output is 0 only when all inputs are 1Basis of much computer memory
NORNOT OR: output is 1 only when all inputs are 0An alarm-free state: no sensor is on
XOROutput is 1 when the inputs are differentA staircase light with two switches

Memory aids

A bubble on a symbol always means "invert". In boolean work, the plus sign means OR and not adding: 1 OR 1 gives 1. NAND and NOR are called universal gates, as any other gate can be built from them alone.

Venn diagrams of AND, OR, NOT and XOR
Venn diagrams of AND, OR, NOT and XOR

Truth tables for combinations of gates

The number of rows is 2 for one input, 4 for two inputs and 8 for three inputs. Count in binary from 000 to 111 so that no combination is missed. Add a column for each middle step.

Truth table for Y = A.B + C'
ABCA.BC'Y = A.B + C'
000011
001000
010011
011000
100011
101000
110111
111101

Predicting outputs

Work from the inputs towards the output, one gate at a time. To name an unknown gate, compare its outputs for inputs 00, 01, 10, 11: AND 0001; OR 0111; NAND 1110; NOR 1000; XOR 0110.

Deriving boolean expressions from truth tables

Sum of products method

  1. Find the rows where the output is 1.
  2. For each of those rows, write an AND term: use the letter if the input is 1, and NOT the letter if it is 0.
  3. Join the terms with OR.
  4. Check the expression against the table.

A table with outputs 0, 1, 1, 0

Y is 1 in rows A is 0, B is 1 (term A'.B) and A is 1, B is 0 (term A.B').

So Y = A'.B + A.B', which is the XOR gate.

Logic gates in real life

  • Washing machines: start only if the door is closed AND water is in.
  • Cars: a seat-belt warning sounds if the engine is on AND the belt is NOT fastened.
  • Calculators and processors: XOR and AND gates add binary digits.
  • Traffic lights, lifts, phones and school bells follow logic rules.

Modelling gates with a circuit

  1. Use dry cells only, never mains electricity.
  2. For AND, connect two switches in series with a bulb; for OR, connect them in parallel.
  3. Test all four rows and record the truth table.
  4. Open the switches afterwards so that the wires do not heat up.

Key points to remember

  • A logic gate gives a binary output from binary inputs by a fixed rule.
  • AND needs all inputs 1; OR needs at least one; NOT inverts; NAND and NOR are inverted AND and OR; XOR needs different inputs.
  • A truth table has 2, 4 or 8 rows for 1, 2 or 3 inputs.
  • To derive an expression, take the rows with output 1, write AND terms, and join them with OR.
  • Logic gates are in washing machines, cars, calculators and all digital devices.

Practice questions

  1. Define a logic gate. (1 mark)

    Show the answer

    An electronic circuit that gives one binary output from binary inputs according to a fixed rule.

  2. Draw the truth table of a NOR gate, in the form "inputs give output". (2 marks)

    Show the answer

    0, 0 gives 1; 0, 1 gives 0; 1, 0 gives 0; 1, 1 gives 0.

  3. State the difference between OR and XOR. (2 marks)

    Show the answer

    For inputs 1 and 1, OR gives 1 while XOR gives 0; XOR is 1 only when the inputs differ.

  4. For Y = (A + B).C, find Y when A is 0, B is 1 and C is 1. (2 marks)

    Show the answer

    A + B is 1, and 1 AND 1 gives 1.

  5. How many rows does the truth table of a four-input circuit have? (1 mark)

    Show the answer

    2 × 2 × 2 × 2 = 16.

  6. A gate has outputs 1, 1, 1, 0 for inputs 00, 01, 10, 11. Name it and write its expression. (2 marks)

    Show the answer

    NAND; Y = (A.B)'

  7. Y is 1 only in rows 0, 0 and 1, 1. Derive the boolean expression. (2 marks)

    Show the answer

    Y = A'.B' + A.B

  8. Give two real-life applications of logic gates. (2 marks)

    Show the answer

    For example: a seat-belt warning (AND with NOT) and a staircase light (XOR).

This is one topic. Get the whole year. The full Grade 11 Computer Studies notes cover every sub-strand of Terms 1, 2 and 3 like this one, with pictures, key points and practice questions with answers, as a printable PDF for KSh 150. Pay with M-Pesa and download at once.

Get the full Grade 11 Computer Studies notes · All Grade 11 Computer Studies resources · Notes for every grade

WhatsApp us