Logic Gates: IGCSE ® Computer Science © Hodder & Stoughton 2015

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 26

Chapter 3

Logic Gates

IGCSE ® Computer Science © Hodder & Stoughton 2015


A NOT gate

IGCSE ® Computer Science © Hodder & Stoughton 2015


An AND gate

IGCSE ® Computer Science © Hodder & Stoughton 2015


An OR gate

IGCSE ® Computer Science © Hodder & Stoughton 2015


A NAND gate

IGCSE ® Computer Science © Hodder & Stoughton 2015


A NOR gate

IGCSE ® Computer Science © Hodder & Stoughton 2015


An XOR gate

IGCSE ® Computer Science © Hodder & Stoughton 2015


Solving a logic circuit

IGCSE ® Computer Science © Hodder & Stoughton 2015


Solving a logic circuit: Part 1

0 0 0
0 0 0
0 1 0
0 1 0
1 0 0
1 0 0
1 1 1
1 1 1

IGCSE ® Computer Science © Hodder & Stoughton 2015


Solving a logic circuit: Part 1

0 0 0 0 1
0 0 1 0 0
0 1 0 0 0
0 1 1 0 0
1 0 0 0 1
1 0 1 0 0
1 1 0 1 0
1 1 1 1 0

IGCSE ® Computer Science © Hodder & Stoughton 2015


Solving a logic circuit: Part 2

0 1 1
0 0 0
0 0 0
0 0 0
0 1 1
0 0 0
1 0 1
1 0 1

IGCSE ® Computer Science © Hodder & Stoughton 2015


Solving a logic circuit: Part 3

1 0 1
0 1 1
0 0 0
0 1 1
1 0 1
0 1 1
1 0 1
1 1 0

IGCSE ® Computer Science © Hodder & Stoughton 2015


Solving a logic circuit: Final solution

IGCSE ® Computer Science © Hodder & Stoughton 2015


A wind turbine safety system monitors:
Designing a logic circuit
▪ the speed of the turbine
▪ the temperature of the bearing
▪ the velocity of the wind.
Description Parameter Value Condition
Turbine
S
speed
Bearing
T
temperature
Wind
W
velocity

IGCSE ® Computer Science © Hodder & Stoughton 2015


A wind turbine safety system monitors:
Designing a logic circuit
▪ the speed of the turbine
▪ the temperature of the bearing
▪ the velocity of the wind.
Description Parameter Value Condition
Turbine
S
speed
Bearing
T
temperature
Wind
W
velocity

Shutdown conditions:
▪ S <= 1000 rpm and T > 80°C
▪ S > 1000 rpm and W > 120 kph
IGCSE ® Computer Science © Hodder & Stoughton 2015 ▪ T <= 80°C and W > 120 kph
A wind turbine safety system monitors:
Designing a logic circuit
▪ the speed of the turbine
▪ the temperature of the bearing
▪ the velocity of the wind.
Description Parameter Value Condition
Turbine 0 <= 1000 rpm
S
speed 1 > 1000 rpm
Bearing 0 <= 80°C
T
temperature 1 > 80°C
Wind 0 <= 120 kph
W
velocity 1 > 120 kph

Shutdown conditions:
▪ S <= 1000 rpm and T > 80°C
▪ S > 1000 rpm and W > 120 kph
IGCSE ® Computer Science © Hodder & Stoughton 2015 ▪ T <= 80°C and W > 120 kph
Designing a logic circuit: Stages

1 Define logic statements from the problem


2 Generate a simple logic circuit for each logic
statement
3 Combine the simple circuits into a system circuit
4 Create a truth table for the system circuit

IGCSE ® Computer Science © Hodder & Stoughton 2015


Designing a logic circuit: Stage 1
Description Parameter Value Condition
Turbine 0 <= 1000 rpm
S
speed 1 > 1000 rpm
Bearing 0 <= 80°C
T
temperature 1 > 80°C
Wind 0 <= 120 kph
W
velocity 1 > 120 kph

Shutdown conditions:
▪ S <= 1000 rpm and T > 80°C S=0 AND T=1
▪ S > 1000 rpm and W > 120 kph
▪ T <= 80°C and W > 120 kph

IGCSE ® Computer Science © Hodder & Stoughton 2015


Designing a logic circuit: Stage 1
Description Parameter Value Condition
Turbine 0 <= 1000 rpm
S
speed 1 > 1000 rpm
Bearing 0 <= 80°C
T
temperature 1 > 80°C
Wind 0 <= 120 kph
W
velocity 1 > 120 kph

Shutdown conditions:
▪ S <= 1000 rpm and T > 80°C S=0 AND T=1
▪ S > 1000 rpm and W > 120 kph S=1 AND W=1
▪ T <= 80°C and W > 120 kph T=0 AND W=1

IGCSE ® Computer Science © Hodder & Stoughton 2015


Designing a logic circuit: Stage 2

Logic statements:

▪ S=0 AND T=1

▪ S=1 AND W=1

▪ T=0 AND W=1

IGCSE ® Computer Science © Hodder & Stoughton 2015


Designing a logic circuit: Stage 2

Logic statements:

▪ S=0 AND T=1

▪ S=1 AND W=1

▪ T=0 AND W=1

IGCSE ® Computer Science © Hodder & Stoughton 2015


Designing a logic circuit: Stage 3

IGCSE ® Computer Science © Hodder & Stoughton 2015


Designing a logic circuit: Stage 4

Logic statements:
INPUTS OUTPUT
▪ S=0 AND T=1 S NOT S T A
▪ S=1 AND W=1 0 1 0 0
0 1 1 1
▪ T=0 AND W=1 1 0 0 0
1 0 1 0

IGCSE ® Computer Science © Hodder & Stoughton 2015


Designing a logic circuit: Stage 4

Logic statements:
INPUTS OUTPUTS
▪ S=0 AND T=1 S T W A B
▪ S=1 AND W=1 0 0 0 0 0
0 1 0 1 0
▪ T=0 AND W=1 1 0 0 0 0
1 1 0 0 0
0 0 1 0 0
0 1 1 1 0
1 0 1 0 1
1 1 1 0 1

IGCSE ® Computer Science © Hodder & Stoughton 2015


Designing a logic circuit: Stage 4

Logic statements:
INPUTS OUTPUTS
▪ S=0 AND T=1 S T NOT T W A B C
▪ S=1 AND W=1 0 0 1 0 0 0 0
0 1 0 0 1 0 0
▪ T=0 AND W=1 1 0 1 0 0 0 0
1 1 0 0 0 0 0
0 0 1 1 0 0 1
0 1 0 1 1 0 0
1 0 1 1 0 1 1
1 1 0 1 0 1 0

IGCSE ® Computer Science © Hodder & Stoughton 2015


Designing a logic circuit: Stage 4

Logic statements:
INPUTS OUTPUTS
▪ S=0 AND T=1 S T W A B C D X
▪ S=1 AND W=1 0 0 0 0 0 0 0 0
0 1 0 1 0 0 1 1
▪ T=0 AND W=1 1 0 0 0 0 0 0 0
1 1 0 0 0 0 0 0
0 0 1 0 0 1 0 1
0 1 1 1 0 0 1 1
1 0 1 0 1 1 1 1
1 1 1 0 1 0 1 1

IGCSE ® Computer Science © Hodder & Stoughton 2015

You might also like