1 GCSE Computing Binary Logic
GCSE Computing 2 Candidates should be able to understand and produce simple logic diagrams using the operations NOT, AND, OR GCSE Computing Learning Objectives :
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.
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.
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).
GCSE Computing Students taking Computing are in set A Students taking Media are in set B Computing Media
GCSE Computing Students taking Computing AND Media are in the intersection of set A AND set B
GCSE Computing Students taking Computing OR Media are in the combination of set A OR set B
GCSE Computing Students NOT taking Computing Computing
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
GCSE Computing Use to demonstrate switching of inputs and outputs for AND/OR/NOT gates.
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 A A B B Q Q ABQ NOT OR A A B B Q Q AND
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 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 NOT A = C C AND B = Q (NOT A) AND B = Q NOT A = C C AND B = Q (NOT A) AND B = Q
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
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
GCSE Computing Useful Links Royal Institution – All very logical logical.pdf#page=1 Youtube - Logic gates using toys How are logic gates made? 16 GCSE Computing
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