Objectives Construct truth tables for the following logic gates:

Slides:



Advertisements
Similar presentations
Truth Tables and Logic Gates. What are Logic Gates? Logic gates are components used in making logic circuits. Each gate has one or more inputs and produces.
Advertisements

Computer Science 210 Computer Organization Introduction to Logic Circuits.
Programmable Logic Controllers.
Logic Gates.
Computer Logic & Logic Gates Justin Champion. IITCT Contents Introduction to Logic Look at the different Logic Gates Summary.
Sahar Mosleh PageCalifornia State University San Marcos 1 Introductory Concepts This section of the course introduces the concept of digital circuits and.
Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates Invitation to Computer Science, C++ Version, Fourth Edition.
Boolean Algebra and Truth Table The mathematics associated with binary number system (or logic) is call Boolean: –“0” and “1”, or “False” and “True” –Calculation.
In this module you will learn: What the various logic gates do. How to represent logic gates on a circuit diagram. The truth tables for the logic gates.
Think about the following expression If the number entered is greater than 15 but less than 25 or the number is 100 and the letter chosen is after p but.
OCR GCSE Computing © Hodder Education 2013 Slide 1 OCR GCSE Computing Chapter 2: Binary Logic.
Activity 1 Revise / remember what the term ‘binary logic’ means. What do each of the following look like: NOT gate? AND gate? OR gate? 5 minutes.
LOGIC GATES A logic gate is an elementary building block of a digital circuit.digital circuit Most logic gates have two inputs and one output terminals.
Beath High School - Int 1 Physics1 Intermediate 1 Physics Electronics Input, Process and Output Digital Logic Gates.
LOGIC GATES.
Combinational Circuit Design A combinational circuit consists of logic gates. It processes the input signals (coming from an external source) to produce.
A-Level Computing#BristolMet Session Objectives#6 MUST understand and produce simple logic diagrams using the operations NOT, AND and OR SHOULD explain.
Combination of logic gates  Logic gates can be combined to produce more complex functions.  They can also be combined to substitute one type of gate.
Beath High School - Int 1 Physics1 Intermediate 1 Physics Electronics Glossary AND gate to device digital signals to inverter LDR to logic circuit logic.
1 GCSE Computing Binary Logic. GCSE Computing 2 Candidates should be able to understand and produce simple logic diagrams using the operations NOT, AND,
4) Design the logic to control the motor on a simple remote control car. There are two buttons on the remote control for the motor. If neither button is.
US Demonstrate knowledge of the practical applications of logic circuits.
Binary Logic Derrington KCL CPD/SKE Binary We’ve seen how data of all different sorts and kinds can be represented as binary bits… 0s and 1s 1 is.
 A transistor is the basic building block of electronic components.  The average computer may have millions of them within its circuits.  Essentially,
Logic Gates The processor is made up of millions of logic gates. These are used to make decisions. Each gate takes an electric input and outputs a result.
GCSE Computing – Topic 2 Lesson 5a – Binary Logic CHALLENGE TO: identify the different types of logic diagrams. ASPIRE TO: Construct a truth table for.
© 2016 AQA. Created by Teachit for AQA Boolean logic Lesson 3.
LOGIC GATES. INTRODUCTION TO LOGIC GATES Boolean functions may be practically implemented by using electronic gates. The following points are important.
Author : Khairi LOGIC GATES Logic gate Input Output  Logic gates are electronic switches with one or more input but only one output ogic gates are commonly.
Unit 1 Logical operators.
GCSE OCR Computing A451 Binary logic Computing hardware 6.
Activity 1 5 minutes Grab a whiteboard and pen, come to the front and work out the Truth Table for the following circuit: R A B C Q.
Creating logic gates with Minecraft
Basics of Logic gates - Part 1
Truth Tables & Logic Expressions
Component 1 Logical operators.
Sensors Control Systems with Flowol.
Logic Gates and Logic Circuits
Logic Gates.
Logic Gates Practical Objective: to develop an understanding of logic circuits and truth tables.
You have 5 minutes to look over your table of sensor and outputs ready for a spot check on the different symbols Start Timer 5 mins
You have 5 minutes to look over your homework and with a green pen answer the question in your book or make a correction Start Timer 5 mins
Logic Gates.
CSCI-100 Introduction to Computing
Chapter 2.3 Binary Logic.
Digital electronics and logic gates
Chapter 5 Decisions. Chapter 5 Decisions ssential uestion: How are Boolean expressions or operators used in everyday life?
Computers Logic Gates.
Computer Architecture CST 250
Teaching Computing to GCSE
Thursday, 22 November 2018 Logic Gates
Logic Gates Practical Objective: to develop an understanding of logic circuits and truth tables.
3.4 Computer systems Boolean logic Lesson 2.
All very logical I think!
Logic Gates.
A-level Computer Science
GCSE Computer Science – Logic Gates & Boolean Expressions
Input > Process > Output
Binary Logic.
Boolean Expressions to Make Comparisons
Lecture 5 Binary Operation Boolean Logic. Binary Operations Addition Subtraction Multiplication Division.
Section 3.7 Switching Circuits
Chapter 4: Boolean Expressions, Making Decisions, and Disk Input and Output Prof. Salim Arfaoui.
Truth tables Mrs. Palmer.
Introductory Concepts
Truth Tables & Logic Expressions
Logically, the output will be 1
Further binary, Logic diagrams and truth tables
What are Logic Gates?.
Presentation transcript:

Objectives Construct truth tables for the following logic gates: NOT AND OR Construct truth tables for simple logic circuits Interpret the results of truth tables Create, modify and interpret simple logic circuit diagrams

Binary situations Binary situations are common in daily life and can refer to things that can be in only one of two states: Stop or Go Pass or Fail On or Off In computing terms A binary 1 can represent TRUE A binary 0 can represent FALSE

Output true or false? Is the fridge door open? IF open then light = TRUE IF not open then light = FALSE

Combining two conditions Consider a safe with two keys If both keys are used, the safe will open IF Key1 AND Key2 THEN Open = TRUE Otherwise, Open = FALSE

True or false? Unlocking a smartphone: using a known fingerprint or using a correct PIN code? IF fingerprint OR correct PIN THEN unlock = TRUE Otherwise, unlock = FALSE

If it’s not true, it’s false Did you pass the test? IF NOT pass test = TRUE THEN pass test = FALSE Or conversely, IF pass test = TRUE THEN NOT pass test = FALSE

Binary logic in programming while NOT (attempt = 3) AND NOT (passwordCorrect) print "Please enter password: " password = input() attempts = attempts + 1 … endwhile The while statement above equates to a Boolean expression to execute the loop only if both statements are false (or NOT True): (NOT (x)) AND (NOT (y))

Boolean functions AND, OR and NOT are Boolean functions A computer can calculate the results of A AND B, A OR B, or NOT A depending on whether A and B are TRUE or FALSE What do these two circuit diagrams represent? How could you represent a Boolean NOT function? Output A B Input Output A B Input

Truth tables A truth table shows the output from all possible combinations of inputs from a Boolean function If there are two inputs A and B, there are four possible combinations of TRUE and FALSE The truth table representing the AND function is shown below Input A Input B Output P FALSE TRUE

Number of inputs How many possible outputs are there if there is just one input? What if there are three inputs? Draw the truth tables representing OR and NOT Input A Output P FALSE TRUE Input A Input B Output P FALSE TRUE

Boolean function – AND IF both inputs are TRUE then the output is TRUE IF a lift is on the correct floor AND the Call button has been pressed THEN open the lift door Lift on correct floor Button Pressed Open Lift Door FALSE ? TRUE Lift on correct floor Button Pressed Open Lift Door ? 1

Truth table – AND IF both inputs are TRUE then the output is TRUE Lift on correct floor Button Pressed Open Lift Door ? 1 A B P 1

Boolean function – OR IF either input are TRUE then the output is TRUE IF either the cold tap OR the hot tap is turned on THEN water will start to flow What is P? Cold tap on Hot tap on Water flows FALSE ? TRUE A B P ? 1

Boolean function – NOT IF the input is TRUE then the output is FALSE IF the input is FALSE then the output is TRUE IF security beam is broken (FALSE) then the alarm is sounded (TRUE) Beam broken Alarm sounds FALSE ? TRUE Beam broken Alarm sounds ? 1 A P ? 1

More logic Which of the following statements are TRUE? (4 > 3) AND (5 > 7) (2 < 8) OR (8 > 10) NOT (5 * 7 > 30) ((7 div 3) >= 2) OR ((7 div 3) < 2) ((12 mod 5) < 2) AND ((12 mod 5) = 2) mod gives the remainder after a division

More logic Which of the following statements are TRUE? (4 > 3) AND (5 > 7) FALSE (2 < 8) OR (8 > 10) TRUE NOT (5 * 7 > 30) FALSE ((7 div 3) >= 2) OR ((7 div 3) < 2) TRUE ((12 mod 5) < 2) AND ((12 mod 5) = 2) FALSE

Worksheet 1 Complete Task 1

From truth tables to logic gates Physical computer circuits are built using logic gates The first three fundamental gates used to build circuits are: AND gate OR gate NOT gate

Logic statement: P = A AND B Binary logic – AND gate If both inputs are 1 (TRUE) then the output is 1 (TRUE) Otherwise the output is 0 (FALSE) A B P ? 1 INPUT A B OUTPUT P Logic statement: P = A AND B Logic Diagram Truth Table

Logic statement: P = A AND B Binary logic – AND gate If both inputs are 1 (TRUE) then the output is 1 (TRUE) Otherwise the output is 0 (FALSE) A B P 1 INPUT A B OUTPUT P Logic statement: P = A AND B Logic Diagram Truth Table

Logic statement: P = A OR B Binary logic – OR gate If either input is 1 (TRUE) then the output is 1 (TRUE) Otherwise the output is 0 (FALSE) A B P ? 1 INPUT A B OUTPUT P Logic statement: P = A OR B Logic Diagram Truth Table

Logic statement: P = A OR B Binary logic – OR gate If either input is 1 (TRUE) then the output is 1 (TRUE) Otherwise the output is 0 (FALSE) A B P 1 INPUT A B OUTPUT P Logic statement: P = A OR B Logic Diagram Truth Table

Logic statement: P = NOT A Binary logic – NOT gate If 0 is input it outputs 1 (TRUE) If 1 is input it outputs 0 (FALSE) INPUT A OUTPUT P Logic statement: P = NOT A A P ? 1 Logic Diagram Truth Table

Logic statement: P = NOT A Binary logic – NOT gate If 0 is input it outputs 1 (TRUE) If 1 is input it outputs 0 (FALSE) INPUT A OUTPUT P Logic statement: P = NOT A A P 1 Logic Diagram Truth Table

Worksheet 1 Complete Task 2, Questions 11-13

Combining logic gates We can string logic gates together to make more complex circuits OUTPUT R INPUT A OUTPUT P INPUT B A B R = A AND B P = NOT R 1 Logic statement: P = NOT (A AND B)

Combining logic gates We can string logic gates together to make more complex circuits OUTPUT R INPUT A OUTPUT P INPUT B A B R = A AND B P = NOT R 1 Logic statement: P = NOT (A AND B)

Combining logic gates We can string logic gates together to make more complex circuits OUTPUT R INPUT A OUTPUT P INPUT B A B R = A AND B P = NOT R 1 Logic statement: P = NOT (A AND B)

Modelling real life – security light What would the circuit diagram for this situation look like? The security light must come on if it senses movement AND it is night time, OR if someone presses a manual override switch

Modelling real life = AND OR Sensor detects movement = TRUE Night time Manual override Button = TRUE = Security Light On Security Light On TRUE (1) Sensor detects Movement = TRUE Night time = TRUE Manual override Button = TRUE

Worksheet 1 Complete Task 3, Questions 14-16

Plenary You have learned how to represent the Boolean logic operators AND, OR and NOT using logic diagrams and truth tables Try building your own circuits using the circuit builder on the website www.logic.ly