Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 GCSE Computing Binary Logic. GCSE Computing 2 Candidates should be able to understand and produce simple logic diagrams using the operations NOT, AND,

Similar presentations


Presentation on theme: "1 GCSE Computing Binary Logic. GCSE Computing 2 Candidates should be able to understand and produce simple logic diagrams using the operations NOT, AND,"— Presentation transcript:

1 1 GCSE Computing Binary Logic

2 GCSE Computing 2 Candidates should be able to understand and produce simple logic diagrams using the operations NOT, AND, OR GCSE Computing Learning Objectives :

3 GCSE Computing 3 The simplified AND gate shown above has two inputs, switch A and switch B. The bulb Q will only light if both switch A AND B are closed. This will allow current to flow through the bulb, illuminating the filament.

4 GCSE Computing 4 The simplified OR gate shown above has two inputs, switch A and switch B. The bulb Q will light if either switch A OR B are closed. This will allow current to flow through the bulb, illuminating the filament.

5 GCSE Computing The logic in used in computer systems is called Boolean logic because there are only 2 possible values, TRUE or FALSE (represented in binary as 1 or 0).

6 GCSE Computing Students taking Computing are in set A Students taking Media are in set B Computing Media

7 GCSE Computing Students taking Computing AND Media are in the intersection of set A AND set B

8 GCSE Computing Students taking Computing OR Media are in the combination of set A OR set B

9 GCSE Computing Students NOT taking Computing Computing

10 GCSE Computing A AND B – True if and only if both A and B are true. This gate has 2 inputs and 1 output. A OR B – True if A is true, or B is true, or both. This gate has 2 inputs and 1 output. NOT A - True if A is false. This gate has 1 input and 1 output.. AND OR NOT B B B B A A A A A A

11 GCSE Computing Use http://logic.ly/demo/ to demonstrate switching of inputs and outputs for AND/OR/NOT gates.http://logic.ly/demo/

12 GCSE Computing Worksheet 1: Truth Tables - To produce a truth table you need to work out the outputs for every possible combination. AQ 0 1 A A Q Q ABQ 00 01 10 11 A A B B Q Q ABQ 00 01 10 11 NOT OR A A B B Q Q AND

13 GCSE Computing Logic circuits can be combined. Start with some simple examples. For each example work through the circuit one gate at a time from input to output working out the truth table and the Boolean algebra for each intermediate stage. ABCQ 000 010 100 111 A AND B = C NOT C = Q NOT(A AND B) = Q A AND B = C NOT C = Q NOT(A AND B) = Q ABCQ 001 010 101 110 NOT A = C C AND B = Q (NOT A) AND B = Q NOT A = C C AND B = Q (NOT A) AND B = Q

14 GCSE Computing If a logic diagram has only 2 inputs then there will only be 4 combinations of inputs (00, 01, 10 and 11) but 3 inputs would give 8 possible combinations and 4 inputs would give 16 combinations. For example, for the following logic diagram, there are 3 inputs, so there are 2^3 (8) combinations. D = NOT(A OR B) E = B AND C Q = E OR D Q = (B AND C) OR (NOT(A OR B)) D = NOT(A OR B) E = B AND C Q = E OR D Q = (B AND C) OR (NOT(A OR B)) ABCDEQ 000101 001101 010000 011011 100000 101000 110000 111011

15 GCSE Computing This circuit adds two bits. It has 2 outputs: the sum and the carry bit. It is called a half adder. This is a very important point as it explains the purpose of learning about logic gates. They are used to build circuits that perform arithmetic in a processor. Carry = A AND B E = NOT(A AND B) D = AOR B Sum = ( AOR B) AND ( NOT(A AND B)) Carry = A AND B E = NOT(A AND B) D = AOR B Sum = ( AOR B) AND ( NOT(A AND B)) ABDESC 000100 011110 101110 111001

16 GCSE Computing Useful Links Royal Institution – All very logical http://www.rigb.org/christmaslectures08/html/activities/all-very- logical.pdf#page=1 Youtube - Logic gates using toys http://www.youtube.com/watch?gl=GB&hl=en-GB&v=H-53TVR9EOw How are logic gates made? http://www.technologystudent.com/elec1/dig2.htm 16 GCSE Computing

17 A combination of NAND gates can be used to simulate any other gate. This is an OR gate. Many logic circuits are built entirely out of NAND gates because they are cheap to produce. This also demonstrates De Morgan’s Law. C = NOT A D = NOT B NOT (C AND D) = Q NOT(NOT A AND NOT B) = Q ABCDQ 00110 01101 10011 11001


Download ppt "1 GCSE Computing Binary Logic. GCSE Computing 2 Candidates should be able to understand and produce simple logic diagrams using the operations NOT, AND,"

Similar presentations


Ads by Google