GCSE COMPUTER SCIENCE Computers Logic Gates Logic Gates

  • Slides: 17
Download presentation
GCSE COMPUTER SCIENCE Computers Logic Gates

GCSE COMPUTER SCIENCE Computers Logic Gates

Logic Gates Logic gates are the fundamental building blocks of digital circuits. There are

Logic Gates Logic gates are the fundamental building blocks of digital circuits. There are three main logic gates. NOT AND OR

NOT Gate The NOT gate reverses the input, so if a 1 is inputted

NOT Gate The NOT gate reverses the input, so if a 1 is inputted into a NOT gate it will output a 0. NOT 0 1

AND Gate The AND gate will only output a 1 if both inputs are

AND Gate The AND gate will only output a 1 if both inputs are 1, otherwise the output will be 0. AND 1 1 1

OR Gate The OR gate will output 1 if either or both of the

OR Gate The OR gate will output 1 if either or both of the inputs are set to 1. OR 1 0 1

Truth Tables Learn about truth tables by watching this video.

Truth Tables Learn about truth tables by watching this video.

Example Truth tables are used to show all the possible outcomes for a logic

Example Truth tables are used to show all the possible outcomes for a logic problem. Here is the truth table for an AND gate:

Activity 1 Go to the Logic Lab and recreate this simple logic diagram. Use

Activity 1 Go to the Logic Lab and recreate this simple logic diagram. Use your completed diagram to help you complete this truth table for a NOT gate: A Q

Activity 2 Now recreate this logic diagram: Use your completed diagram to help you

Activity 2 Now recreate this logic diagram: Use your completed diagram to help you complete this truth table for an OR gate: A B Q=(A OR B)

Logic Statements (1) Logic statements can be used to represent logic diagrams using text.

Logic Statements (1) Logic statements can be used to represent logic diagrams using text. Example Brunel University use a system to monitor their athletes when they are training. They monitor heat rate and oxygen levels. These are Boolean variables that are set to 0 when the values are within safe limits and 1 when they are outside safe limits. The microcontroller monitors the readings and sounds an alarm if both of the readings are outside safe limits. Logic Statement Alarm = Heart Rate AND Oxygen

Logic Statements (2) Logic Statement Alarm = Heart Rate AND Oxygen INPUTS OUTPUT Heart

Logic Statements (2) Logic Statement Alarm = Heart Rate AND Oxygen INPUTS OUTPUT Heart Rate Oxygen Alarm 0 0 1 1 1

Activity 3 a A greenhouse climate control system monitors the temperature and humidity. These

Activity 3 a A greenhouse climate control system monitors the temperature and humidity. These are Boolean variables that are set to 0 when the values are within the set limits and 1 when they are outside these limits. The microcontroller monitors the readings and opens a vent if any of the readings are outside the set limits. Give the logic statement the microcontroller uses to determine if the vent should be open. Logic Statement

Activity 3 b Complete the truth table for the logic statement you wrote in

Activity 3 b Complete the truth table for the logic statement you wrote in Task 3 a. INPUTS Temperature OUTPUT Humidity Vent

Activity 4 a A baby alarm system monitors heart rate, temperature and movement. These

Activity 4 a A baby alarm system monitors heart rate, temperature and movement. These are Boolean variables that are set to 0 when the values are within safe limits and 1 when they are outside safe limits. The microcontroller monitors the readings and sounds an alarm if any two of the readings are outside safe limits. Give the logic statement the microcontroller uses to determine if the alarm should be sounded. Logic Statement

Activity 4 b Complete the truth table for the logic statement you wrote in

Activity 4 b Complete the truth table for the logic statement you wrote in Task 4 a. INPUTS Heart Rate Temperature OUTPUT Movement Alarm

Activity 5 a A car alarm is set off if a window is broken

Activity 5 a A car alarm is set off if a window is broken or if it senses something moving inside car, and if the engine is not on. Give the logic statement the microcontroller uses to determine if the car alarm should be sounded. Logic Statement

Activity 5 b Complete the truth table for the logic statement you wrote in

Activity 5 b Complete the truth table for the logic statement you wrote in Task 5 a. INPUTS Engine Window OUTPUT Movement Alarm