boolean logic presentation

35
Mr Chesterman Manchester Met University Test Lesson for new computing subject

Upload: michael-chesterman

Post on 07-Jul-2015

119 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Boolean logic presentation

Mr ChestermanManchester Met University

Test Lessonfor new computing subject

Page 2: Boolean logic presentation

Logic

Page 3: Boolean logic presentation

Using logic to make decisionsfrom conditions

Page 4: Boolean logic presentation

Lesson aim explore true / false logic to make decisions

Page 5: Boolean logic presentation

End goalshow understaning by using logic in computer programming techniques

Page 6: Boolean logic presentation

Example:Weather conditions

Page 7: Boolean logic presentation

if _____________

then _____________

Page 8: Boolean logic presentation

if _____________

then _____________Can you think of an example?

Page 9: Boolean logic presentation

if raining

then takeUmbrella

Page 10: Boolean logic presentation

if raining

then takeUmbrella

Page 11: Boolean logic presentation

if raining

then takeUmbrella

Page 12: Boolean logic presentation

if raining

then takeUmbrella

Page 13: Boolean logic presentation

if raining

then takeUmbrella

Page 14: Boolean logic presentation

if raining

then

else

Page 15: Boolean logic presentation

Boolean values are

TRUE or FALSE

Page 16: Boolean logic presentation

raining

Page 17: Boolean logic presentation

TRUE or FALSE?

Boolean Logic is named after George Boole born in 1815.

Page 18: Boolean logic presentation

TRUE or FALSE?George Boole looked like this.

Page 19: Boolean logic presentation

TRUE or FALSE?Boole has a crater on the Moon named after him

Page 20: Boolean logic presentation

BooleanLogic

Is Black and

White

Page 21: Boolean logic presentation

ComputersWhat does Boole have to do with computers?

Page 22: Boolean logic presentation

Computer circuits

Page 23: Boolean logic presentation

Computer Programming

Page 24: Boolean logic presentation

Pac Man

if _______

then ______

Page 25: Boolean logic presentation

if

OReatPellet eatsFruit

then scorePoints

Page 26: Boolean logic presentation

if

ANDeatsPowerPellet

then killsGhost

touchingGhost

Page 27: Boolean logic presentation

if NOT touchingGhost

then continueGame

else loseLife

Page 28: Boolean logic presentation

We can useAND & OR & NOT

with TRUE or FALSE conditions

to make complex decisions

Page 29: Boolean logic presentation

Class activity:

What's it like outside?

Page 30: Boolean logic presentation

Ingredients:

Green – conditionsBlue – actionsOrange – decision control

Page 31: Boolean logic presentation

Goal:Create instructions for a computer to choose what to take outside based on the weather

Page 32: Boolean logic presentation

Recap

Page 33: Boolean logic presentation

Use Bolean logic to

make decisions in programs

Page 34: Boolean logic presentation

Boolean valuesare TRUE or FALSE

Page 35: Boolean logic presentation

You can combine them with AND & OR Use NOT to reverse

them