Date post: | 28-Dec-2015 |
Category: |
Documents |
Upload: | percival-banks |
View: | 219 times |
Download: | 0 times |
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”
© 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
© 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
© 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
© GCSE Computing
The symbol for an AND gate is shown below. OUTPUT O is only true
if INPUT A AND INPUT Bare both TRUE.
This can be representedby this truth table.
It can also be representedby this logic statement:O = A AND B
An AND gate carries outBoolean multiplication (i.e. TRUE * FALSE = TRUE)
Slide 5
INPUTOUTP
UT
0 0 0
0 1 0
1 0 0
1 1 1
© GCSE Computing
The symbol for an OR gate is shown below. OUTPUT O is true
if INPUT A OR INPUT Bare TRUE.
This can be representedby this truth table.
It can also be representedby this logic statement:O = A OR B
An OR gate carries outBoolean addition (i.e. TRUE + TRUE = TRUE)
Slide 6
INPUTOUTP
UT
0 0 0
0 1 1
1 0 1
1 1 1
© 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 outBoolean inversion (i.e. TRUE = FALSE)
Slide 7
INPUTOUTP
UT
0 1
1 0
© 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.
© 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
© GCSE Computing
INPUTOUTP
UT
A B O
0 0 1
0 1 1
1 0 1
1 1 0
Slide 10
INPUTOUTP
UT
A B O
0 0 1
0 1 0
1 0 0
1 1 0
INPUTOUTP
UT
A B O
0 0 1
0 1 0
1 0 0
1 1 0
© GCSE Computing Slide 11
For each logic diagram, complete a truth table and create a logic statement.
© 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))