Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

1 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 less than Z and not the letter T or his name entered is greater than 4 characters and not “Steve” then say “Excellent” else say “Bogus!” What would be the results for 1)11, Q, “Roger” 2)100,T,”Bob” 3)20,A,”Steve”

2 © GCSE Computing Candidates should be able to:  explain why data is represented in computer systems in binary form  understand and produce simple logic diagrams using the operations NOT, AND and OR  produce a truth table from a given logic diagram. Slide 2

3 © GCSE Computing  The denary (decimal) system that we use has 10 digits (0-9).  For a computer systems to use denary it would need to be able to store and transmit 10 different ‘states’.  It is therefore much simpler for computer systems to use the binary number system because it has just 2 digits (0-1) which can easily be represented and stored as 2 different states.  Examples of different ‘states’ used to store/transmit binary data:  ON / OFF (a semi-conductor switch, used in computer memory)  TRANSMIT / DON’T TRANSMIT (an electrical signal, used to transfer binary data)  NORTH / SOUTH (areas with different magnetic polarity, used to store binary data on magnetic media)  REFLECT / NON-REFLECT (reflective and non-reflective areas, used to store binary data on optical media) Slide 3

4 © GCSE Computing  In computer science, the Boolean or logical data type is a data type that has two values (usually denoted true and false).  Logic gates are physical devices that can carry out Boolean logic functions.  The three basic logic gates are the AND, OR and NOT gates. Slide 4

5 © GCSE Computing  The symbol for an AND gate is shown below.  OUTPUT O is only true if INPUT A AND INPUT B are both TRUE.  This can be represented by this truth table.  It can also be represented by this logic statement: O = A AND B  An AND gate carries out Boolean multiplication (i.e. TRUE * FALSE = TRUE) Slide 5 INPUTOUTPUT 000 010 100 111

6 © GCSE Computing  The symbol for an OR gate is shown below.  OUTPUT O is true if INPUT A OR INPUT B are TRUE.  This can be represented by this truth table.  It can also be represented by this logic statement: O = A OR B  An OR gate carries out Boolean addition (i.e. TRUE + TRUE = TRUE) Slide 6 INPUTOUTPUT 000 011 101 111

7 © GCSE Computing  The symbol for a NOT gate is shown below.  OUTPUT O is true if INPUT A is NOT TRUE.  This can be represented by this truth table.  It can also be represented by this logic statement: O = NOT A  A NOT gate carries out Boolean inversion (i.e. TRUE = FALSE) Slide 7 INPUTOUTPUT 01 10

8 © GCSE Computing Slide 8  A logic diagram is a diagram that represents one or more of logic gates linked together to form a logic circuit.  In logic diagrams;  Symbols are used to represent logic gates  Letters are used to label the input(s) and output(s)  Lines are used to show how logic gates are connected.

9 © GCSE Computing Slide 9 In this logic diagram, the output will be FALSE only when inputs A and B are both TRUE. This logic diagram can be written as a logic statement: O = NOT (A AND B) In this logic diagram, the output will be TRUE only when inputs A and B are both FALSE. This logic diagram can be written as a logic statement: O = NOT (A OR B) In this logic diagram, the output will be TRUE only when input A is FALSE and input B is TRUE. This logic diagram can be written as a logic statement: O = (NOT A) AND B

10 © GCSE Computing INPUTOUTPUT ABO 001 011 101 110 Slide 10 INPUTOUTPUT ABO 001 010 100 110 INPUTOUTPUT ABO 001 010 100 110

11 © GCSE Computing Slide 11  For each logic diagram, complete a truth table and create a logic statement.

12 © GCSE Computing Slide 12  For each logic statement, complete a truth table and create a logic diagram.  O = (NOT A) AND (NOT B)  O = NOT (A OR (NOT B))

13 © GCSE Computing Slide 13  For each truth table, create a logic diagram and create a logic statement. INPUTOUTPUT ABO 000 011 101 110 INPUTOUTPUT ABO 000 010 101 110


Download ppt "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."

Similar presentations


Ads by Google