You are on page 1of 13

Boolean Logic

• The main Boolean gates were are interested in are the


• NOT
• AND
• OR
AND Gate
The output of the AND gate is true
If both inputs are true

Truth Table
A

AND C Input
0
Input
0
Output

B 1 0
0 1
1 1

A AND B = C
This table shows all the possible combinations that
Can occur with all of the different possible outputs
Which can occur for all the possible inputs
The NOT gate
The output is the opposite of the input

Truth Table

Input Output

A NOT B
0

1
OR Gate
The output of an OR gate is true if either
input (or both) is true

Truth Table
Input 1 Input 2 Output
A
A B C
OR C
0 0
B
0 1
1 0
1 1
Real Life Example
Burglar alarm

• The system must first be ARMED by typing in Truth Table


the code into the Keypad. Input Input Output
• This Burglar alarm will then sound if the
burglar sets off the motion detector. Motion Keypad Alarm
• If the alarm has not been armed it will not sensor
sound an alarm 0 0
• This is the truth table for the alarm
0 1
1 0
1 1
Example 2 Automatic lighting system
– a sensor is used to turn a light on or off

 The sensor detects daylight during the Truth Table


day when there is lots of daylight the
light is off Input Output
Light sensor Lamp
 When the light fades the sensor does
not detect daylight and so the light 1
comes on
0
 What is the relationship between the
state of sensor and the lamp?
How does a smoke detector work?

• The Smoke detector detects smoke – smoke will set the alarm off
• The Smoke detector will also detect the presence of flames even if
there is no smoke – so flames will set the alarm off
Complete the Truth Table for the Truth Table
Smoke Alarm Input 1 Input 2 Output
Smoke Heat Alarm
What type of Gate is this? 0 0
0 1
Answer:
0
1 1
Put your answers in the squares using a text box

0 1
0 0 1 1
1 0

All Correct

1 0
1 1 0 0
1 0

0 1
0
0 1 1
0 1 1
Complete these truth tables
All Correct

OR Gate Truth Table AND Gate Truth Table


Input 1 Input 2 Output Input 1 Input 2 Output
0 0 0 0 0 0
0 1 1 1 0 0
1 0 1 0 1 0
1 1 1 1 1 1

NOT Gate Truth Table


Input Output
1 0
0 1
Given the inputs A,B,C work out the output D

All Correct

A B C D
A
0 0 0 0
B 1 0 0 0
1 1 0 0
D 1 1 1 1
0 1 0 0
C
0 1 1 1
0 0 1 0
1 1 1 1
D = (A OR B) AND C
Extension Work
Further and complex Boolean gates
Logic Gates Worksheet

Using the model of a decision board and the gates provided to solve the situations.
Once you have set up your logic gates and connected them with lines drawn on the board
from the pens provided, you will now be able use them to create a truth table of the inputs
and outputs.

Draw your logic diagram and truth table in your jotters, make sure you use a ruler. More Taxing Logic Gate Diagrams
When drawing your logic diagrams and truth tables in your jotters set them out like the
example below. Using the same method that you did for the previous set of situations, create logic
diagrams and truth tables for the following situations.

Some of these situations may involve more than two inputs, remember to count up
1/ to 7 in binary to work out all the combinations for the inputs of these truth tables.
Input Device 0
LOGIC 1/ Output
0
GATE Device 1.Create a logic diagram for a shop owner who wants a buzzer to sound when either
1/ the temperature inside the shop gets to high or if someone turns on a light whilst
Input Device 0 pressing down a pressure switch under the door mat to ‘on’.

2.Create a logic diagram and truth table for a display window which will have a light
INPUTS OUTPUTS going on when it is switched on or if it is both dark and cold.

3.Create a logic diagram and truth table for a heater to be turned on when it is cold
and when it is either dark or switched on.

1.Create a logic diagram and truth table for a warning light to go on when a car engine gets
too hot. The lamp should only work when the ignition of the car is switched on.

2.Create a logic diagram and truth table which will switch on the motor for the pump of a
central heating system when the house is cold and the central heating is switched on.

3.Create a logic diagram and truth table which will turn on the motor for a heater in a
greenhouse when it gets cold at night. The heater should be switched off during the day.

4.A rare diamond is locked in a safe. The diamond is sitting on a pressure sensor which acts
like a switch. If the diamond was lifted up the switch would turn off. Create a logic diagram
and truth table which will turn on a buzzer in the safe when it is light inside or if the switch
is turned on.

You might also like