10 Boolean Logic
Logic gate symbols
Six different logic gates will be considered in this chapter:
Truth tables
Truth tables are used to trace the output from a logic gate or logic circuit. The NOT gate is the only
logic gate with one input; the other five gates have two inputs.
Although each logic gate can only have one or two inputs, the number of inputs to a logic circuit can
be more than 2; for example, three inputs give a possible 23 (=8) binary combinations. And for four
inputs, the number of possible binary combinations is 24 (=16). It is clear that the number of possible
binary combinations is a multiple of the number 2 in every case. The possible inputs in a truth table can
be summarised as shown:
10.2 The function of the six logic gates
NOT gate
AND gate
OR gate
NAND gate (NOT AND)
NOR gate (NOT OR)
XOR gate
Activity 10.1
Show why X = (A AND NOT B) OR (NOT A AND B) and
Y = (A OR B) AND (NOT (A AND B)) both represent the same logic gate.
You will notice in the Boolean algebra, three new symbols; these have the following meaning:
» . represents the AND operation
» + represents the OR operation
» a bar (above the letter) represents the NOT operation.
10.3 Logic circuits, logic expressions, truth tables and problem statements
When logic gates are combined together to carry out a particular function, such as controlling a robot,
they form a logic circuit. The following eight examples show how to carry out the following tasks:
» Create a logic circuit from a:
– problem statement
– logic or Boolean expression
– truth table
» Complete a truth table from a:
– problem statement
– logic or Boolean expression
– logic circuit
» Write a logic or Boolean expression from a:
– problem statement
– logic circuit
– truth table