Presentation is loading. Please wait.

Presentation is loading. Please wait.

Digital Logic. December 0s and 1s As we have already considered, a computer operates on 0’s and 1’s Why? Because the power on a line.

Similar presentations


Presentation on theme: "Digital Logic. December 0s and 1s As we have already considered, a computer operates on 0’s and 1’s Why? Because the power on a line."— Presentation transcript:

1 Digital Logic

2 December 2011ais@aber.ac.uk2 0s and 1s As we have already considered, a computer operates on 0’s and 1’s Why? Because the power on a line can be either off (0) or on (1). We do not consider in-between values! How does a computer carry out calculations on these 0’s and 1’s? It uses logic

3 December 2011ais@aber.ac.uk3 Logic By logic, we mean the process of testing the input on one or more input lines, to produce output on one or more output lines We use the terms AND, OR, NOT, NAND, NOR, and XOR

4 December 2011ais@aber.ac.uk4 AND I will go to the beach, if it is sunny AND it is warm I will not go to the beach if it is sunny, but not warm I will not go to the beach if it is warm, but not sunny I will not go to the beach if it is neither sunny or warm

5 December 2011ais@aber.ac.uk5 AND True False True FalseTrueFalse Go to beachWarmSunny

6 December 2011ais@aber.ac.uk6 AND (Digital logic) 111 001 010 000 Go to beachWarmSunny

7 December 2011ais@aber.ac.uk7 The Truth Table We call this a truth table. It is more usually drawn as follows: 111 001 010 000 ABBA Truth table for AND Note signifies AND

8 December 2011ais@aber.ac.uk8 OR I will go to the beach, if it is sunny OR it is warm I will go to the beach if it is sunny, but not warm I will go to the beach if it is warm, but not sunny (even if it’s raining!) I will not go to the beach if it is neither sunny or warm

9 December 2011ais@aber.ac.uk9 OR True FalseTrue False Go to beachWarmSunny

10 December 2011ais@aber.ac.uk10 OR (Digital logic) 111 101 110 000 Go to beachWarmSunny

11 December 2011ais@aber.ac.uk11 The Truth Table The truth table for OR is as follows: 111 101 110 000 A+BBA Note + signifies OR

12 December 2011ais@aber.ac.uk12 Just like in English! Except, beware: I would like a cup of tea, OR a cup of coffee (but I don’t want both!) This is called the Exclusive OR (XOR) English uses the word OR to signify both the logical OR and the logical XOR 011 101 110 000 ABAB BA

13 December 2011ais@aber.ac.uk13 NOT The simplest of all. It just inverts the input 01 10 AA We signify NOT by a line over the corresponding letter(s)

14 December 2011ais@aber.ac.uk14 NAND This is simply the opposite of AND 111 001 010 000 ABBA 011 101 110 100 BA

15 December 2011ais@aber.ac.uk15 NOR Similarly, this is the opposite of OR 111 101 110 000 A+BBA 011 001 010 100 BA

16 December 2011ais@aber.ac.uk16 Formal logic  (…)(negation) (…) (not)  (disjunction) + (or)  (conjunction) (and) T (true)1 (true) F (false)0 (false) Formal logicDigital logic

17 December 2011ais@aber.ac.uk17 Logic Gates A logic gate is a device (e.g. on a chip) which takes one or more inputs, performs a logical operation on them (such as AND, OR, etc) and produces an output On a circuit diagram, we have special symbols for these

18 December 2011ais@aber.ac.uk18 Logic Gates ANDNANDNOT ORNORXOR

19 December 2011ais@aber.ac.uk19 Multiple Input Logic Gates All the logic gates on the previous slide, except the NOT gate, may have multiple inputs. What do you think the truth table would be for a three-input AND gate?

20 December 2011ais@aber.ac.uk20 Revision Make sure you know what each gate symbol stands for Know the truth tables for each logic gate Learn the digital logic expressions for each gate


Download ppt "Digital Logic. December 0s and 1s As we have already considered, a computer operates on 0’s and 1’s Why? Because the power on a line."

Similar presentations


Ads by Google