Professional Documents
Culture Documents
Logic Gates
Pre IGCSE
1
The CPU and Logic
What is logic?
• A logic statement can be used to say if something is true or false.
Proposition Conclusion
Player had no lives THEN Game is over
2. Complete the conclusion column. Fill in the correct value for each possible response to
the proposition.
4
Activity 5
► Write a logical statement. Draw the truth table for your statement.
example
6
► The football club want to sign a new star player. The manager has asked the
team owner to sign a player who scored 30 goals last season. The manager
also wants the player to be left-footed. So the key points:
► Club sign player
► Player is left-footed
► Player scored 30 goals.
Using AND to link logical statements
Player is left-footed AND Player scored 30 goals THEN Club signs player.
7
Activity 1 8
1. Sonia wants to buy her mother a presenter. She wants to buy a blue vase.
She has $5 saved for the present. She sees a vase in a shop window. Write a
logical argument and truth table to determine if she can buy the vase.
9
2. Mr. John is trying to figure out if he can have buttered toast for breakfast.
Write the logical argument and a truth table for butter toast.
There is bread in the cupboard AND there is butter in the fridge THEN Toast for
breakfast.
10,000 points reached OR five stars collected THEN extra life awarded.
14
Objectives
❖ How to describe the AND, OR and NOT logic
gates used in a computer
❖ How to draw truth tables for AND, OR and NOT
gates
❖ How computer logic gates compare to logic in the
real world
15
Computer can carry out complicated tasks such as creating realistic game
worlds. It can navigate spacecraft through space. How is this possible when
computer is only made up of switches that can be turned on or off?
Those switches can be combined into larger units The larger units can perform
more complicated tasks Those units are called gates.
Logical statements using AND and OR can be used to describe situations in
everyday life and in computer games. To control programs such as games,
computer’s ALU uses logic gates.
16
Gates
An AND gate will give high output if both of the inputs is high. 18
OR gate
The OR gate has two inputs. They are called A
and B. The value of each input can be either 0 or
1. The output of an OR gate is 1 if either input A A B C
and B are 1. Otherwise it is 0.
0 0 0
0 1 1
1 0 1
1 1 1
An OR gate will give high output if either of the inputs is high. 19
https://circuitverse.org/simulator
20
21
The NOT gate
A NOT gate has only one input and one output.
A NOT gate reverses the input. If the input is 1
the output is 0. If the input is 0 the output is 1.
A B
0 1
1 0
A NOT gate has only one input. It will give a high output if theinput is low.
22
Draw the truth table for the circuits.
A B C D (NOT A) E ( B AND C) X
0 0 0 1 0 1
0 0 1 1 0 1
0 1 0 1 0 1
0 1 1 1 1 1
1 0 0 0 0 0
1 0 1 0 0 0
1 1 0 0 0 0
1 1 1 0 1 1
23
Draw the truth table for the circuits.
A B C D (A OR B) E (NOT C) X
0 0 0 0 1 0
0 0 1 0 0 0
0 1 0 1 1 1
0 1 1 1 0 0
1 0 0 1 1 1
1 0 1 1 0 0
1 1 0 1 1 1
1 1 1 1 0 0
24
The NAND gate (NOT AND)
A NAND gate will give a low output if all the inputs is high.
25
The NOR gate (NOT OR)
A B C
The output of an XOR gate is 1 if neither
0 0 1
input A and B are 1.
0 1 0
1 0 0
1 1 0
A B C
The output of an XOR gate is 1 if neither
0 0 0
input A and B are 1.
0 1 1
1 0 1
1 1 0
The output of a XOR gate is high if the inputs are not the same.
27
The XNOR gate
0 1 0
1 0 0
1 1 1
The output of a XOR gate is high if the inputs are the same.
28
Circuits
Gates become more powerful and
more useful when they are joined
A B C Z
together When gates are joined
0 0 0 1
together, they form a circuit.
0 1 0 1
1 0 0 1
1 1 1 0
29
Draw the truth table for the circuits.
30
Draw the truth table for the circuits.
31
Draw the truth table for the circuits.
32