Mastering Logic Gates and Truth Tables

Slides:



Advertisements
Similar presentations
Logic Gates A logic gate is an elementary building block of a digital circuit Most logic gates have two inputs and one output At any given moment, every.
Advertisements

Digital logic gates.
CT455: Computer Organization Logic gate
Computer Science 210 Computer Organization Introduction to Logic Circuits.
Programmable Logic Controllers.
Boolean Algebra and Logic Gate
Section 10.3 Logic Gates.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
Boolean Algebra and Truth Table The mathematics associated with binary number system (or logic) is call Boolean: –“0” and “1”, or “False” and “True” –Calculation.
DIGITAL CIRCUITS Dr. L M Head Sophomore Clinic Fall 2004.
In this module you will learn: What the various logic gates do. How to represent logic gates on a circuit diagram. The truth tables for the logic gates.
Logic Gates Circuits to manipulate 0’s and 1’s. 0’s and 1’s used for numbers Also to make decisions within the computer. In that context, 1 corresponds.
Lecture 8 Topics –Switch –Transistor –CMOS transistor –Logic gates AND, OR, NOT Universal gates: NAND, NOR XOR.
Logic Gate A logic gate is an electronic circuit which makes logic decisions. It has one output and one or more inputs. The output signal appears only.
3. DIGITAL ELECTRONICS..
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
UNIT-8 LOGIC GATES.
Logical Circuit Design Week 5: Combinational Logic Circuits Mentor Hamiti, MSc Office ,
Boolean Logic By: Arthur Brooks February 25, 2003 Think, Speak, and Write Computer Science.
MR. KERINS Logic Gates- Electrical Engineering. LOGIC GATES Logic gates are primarily implemented using diodes or transistors acting as electronic switches,
OCR GCSE Computing © Hodder Education 2013 Slide 1 OCR GCSE Computing Chapter 2: Binary Logic.
1 Fundamentals of Computer Science Propositional Logic (Boolean Algebra)
CS 352 : Computer Organization and Design University of Wisconsin-Eau Claire Dan Ernst Elementary Digital Logic Apps O/S Arch  Arch Logic Digital Analog.
Introduction Each logical element or condition must always have a logic value of either "0" or "1", we also need to have ways to combine different logical.
1 The Chinese University of Hong Kong Faculty of Education Diploma in Education (Part-Time) Winter 1997 Educational Communications and Technology Assignment.
Digital Logic Design Week 3
LOGIC GATES.
Logic Gates Shashidhara H S Dept. of ISE MSRIT. Basic Logic Design and Boolean Algebra GATES = basic digital building blocks which correspond to and perform.
Chapter 33 Basic Logic Gates. 2 Objectives –After completing this chapter, the student should be able to: Identify and explain the function of the basic.
Sneha.  Gates Gates  Characteristics of gates Characteristics of gates  Basic Gates Basic Gates  AND Gate AND Gate  OR gate OR gate  NOT gate NOT.
LOGIC GATES AND CIRCUITS Digital systems are said to be constructed by using logic gates. These gates are the AND, OR, NOT, NAND, NOR, EXOR and EXNOR gates.
CSCI-100 Introduction to Computing Hardware Design Part I.
Linear Algebra. Circuits The circuits in computers and other input devices have inputs, each of which is either a 0 or 1, the output is also 0s and 1s.
Logic Gates. The Inverter The inverter (NOT circuit) performs the operation called inversion or complementation. Standard logic symbols: 1 1 input output.
Digital Fundamentals Floyd Chapter 3 Tenth Edition
COMPUTER ARCHITECTURE TRUTH TABLES AND LOGIC GATES.
Logic Gates. A logic gate is an elementary building block of a digital circuit. Most logic gates have two inputs and one output. At any given moment,
Primitive Logic Functions Kuliah Sistem Digital, Teknik Elektro UMY (Rahmat Adiprasetya)
ECE DIGITAL LOGIC LECTURE 5: BINARY LOGIC AND DIGITAL LOGIC GATES Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 01/28/2016.
Combinational Logic Logic gates. and, or, not Derived gates. nand, nor, xor John F. Wakerly – Digital Design. 4 th edition. Chapter 4.
Chapter 33 Basic Logic Gates. Objectives After completing this chapter, you will be able to: –Identify and explain the function of the basic logic gates.
Minute Paper 4/4/04 Z=50+j86.7=100
LOGIC CIRCUITLOGIC CIRCUIT. Goal To understand how digital a computer can work, at the lowest level. To understand what is possible and the limitations.
 A transistor is the basic building block of electronic components.  The average computer may have millions of them within its circuits.  Essentially,
LOGIC GATES. INTRODUCTION TO LOGIC GATES Boolean functions may be practically implemented by using electronic gates. The following points are important.
DATA REPRESENTATION IN COMPUTER MEMORY.  Describe the coding system:  Sign and magnitude  1’s Complement and 2’s Complement  Binary Coded Decimal.
11/20/2016SKD1 Logic gates. 11/20/2016SKD2 Logic gates Prepared By: Rashidul Islam Instructor (Civil Construction) Deptt. Of S S C Vocational Alamdanga.
Logic Gates Learning Objectives Learn that there is a one-to-one relationship between logic gates and Boolean expressions Learn how logic gates are combined.
Logic gates.
Boolean Algebra & Logic Gates
Basics of Logic gates - Part 1
Morgan Kaufmann Publishers
Combinational Logic Logic gates. and, or, not Derived gates.
Logic Gates.
Logic Gates and Boolean Algebra
ECE 331 – Digital System Design
KS4 Electricity – Electronic systems
KS4 Electricity – Electronic systems
Digital Signals Digital Signals have two basic states:
Basic Digital Logic Basic Gates
Computer Science 210 Computer Organization
Schematics 201 Lecture Topic: Electrical Symbols
Digital Electronics Lab 2 Instructor:
Boolean Logic Boolean Logic is considered to be the basic of digital electronics. We know that a computer’s most basic operation is based on digital electronics.
KS4 Electricity – Electronic systems
GCSE Computer Science – Logic Gates & Boolean Expressions
Binary Logic.
Further binary, Logic diagrams and truth tables
What are Logic Gates?.
Presentation transcript:

Mastering Logic Gates and Truth Tables What is Boolean? Logic Gates – Types Corresponding Truth tables Drawing circuit diagrams VIDEOS included (demos of logic gate) using logic.ly/demo *Also see presentations on boolean logic Purchase the full teaching package (KS3, GCSE and A Level topics from www.teachingcomputing.com

Did you know? Have you ever looked inside your computer? The internal circuitry of computers is a bit of a mystery. Have a look at the mother board on the right. Logic Gates play a big role in understanding the circuitry of computers. Digital systems are basically constructed using logic gates that operate using Boolean logic Source: Wires N Code An Electronics Project Website

What is Boolean?! In computer science, the Boolean data type is a data type, having two values (usually denoted true (1) and false (0), intended to represent the truth values of logic and Boolean algebra. It is named after George Boole, who first defined an algebraic system of logic in the mid 19th century. Example: Data type: Seat booked? Options are True (1) or False (1)

… and what is a logic gate? In electronics, a logic gate is an idealized or physical device implementing a Boolean function; that is, it performs a logical operation on one or more logical inputs, and produces a single logical output. Logic gates are primarily implemented using diodes or transistors acting as electronic switches, but – and this is interesting - can also be constructed using vacuum tubes, electromagnetic relays (relay logic), fluidic logic, pneumatic logic, optics, molecules, or even mechanical elements. *Arithmetic Logic Units **Central Processing Unit (the brain of the computer) Logic circuits include such devices as ALUs*, computer memory, and complete CPU** chips, which may contain more than 100 million gates

Logic Gates and Circuitry Learning about logic gates will give you an insight into the circuitry of computers and how they work. You’ll remember that computers don’t understand English – all they can make sense of is: Binary (0) and (1) as computers are basically comprised of millions of on and off switches. In modern practice, most gates are made from field-effect transistors (FETs), particularly MOSFETs (metal–oxide–semiconductor field-effect transistors).

Hardware Design – how would you illustrate a circuit with its components? If you tried to draw the circuit on the right on paper (as it is) it probably wouldn’t make much sense. You may understand what it means because it’s your circuit, but other people would struggle! Common convention uses a series of symbols to stand for the various types of logic gates. The diagram on the right is a circuit diagram showing 3 inputs and 2 outputs. You can combine logic gates to do clever things with inputs and outputs. But …what do the funny shapes mean?

Types of Gates And Or Not If you are a beginner to all this, you probably would start with knowing the three main gates: the AND gate, the OR gate and the very clever NOT gate. The symbolic representations for each of these gates is shown below. And Or Not Yes, it would be helpful if the AND and OR gates didn’t look quite so similar, but that’s just the way it is now. You would do well to find an interesting way of remembering what the AND and OR gates look like, and test yourself to make sure you don’t get confused.

The And Gate – remembering the shape! Memory by association really works. The wackier and more creative the association the more likely you are to remember what the gates stand for! Here’s one (completely ridiculous way but it worked for me) Try and think of your own! And This gate is ROUNDED and looks a little like the door of a cave (if rotated). A year ago I was in a desert – there was loads of SAND, and there were caves nearby in which the (biblical) dead sea scrolls were found. AND!

The Or Gate– remembering the shape! Memory by association really works. The wackier and more creative the association the more likely you are to remember what the gates stand for! Here’s one (completely ridiculous way but it worked for me) Try and think of your own! Or Thor was a chap that was from space. The gate above looks a little like a space ship. THOR ….from outer space, and so when I see a spaceship shaped gate, I think: THOR……….and remember it’s the OR gate.

Other types of gates NAND NOR XOR XNOR There are other types of gates which make use of the AND or OR symbolic representations within them NAND NOR XOR XNOR

What do these gates do? AND GATE Watch the video below, or create the diagram for yourself in logic.ly/demo and see what happens. Note that the gate below is the AND gate. Input A If InputA AND InputB are on, then the bulb will be on (Boolean value = 1) Connect the toggle switches (on the left) to the AND gate (centre) and then the AND gate to the bulb (output) You’ll notice something quite interesting: The bulb only lights when both Input 1 AND Input 2 are on. Input B The AND logic gate performs this function and produces an output depending on the inputs. If Input B is ON (this represents a 1) If INPUT A = 1 (on) and INPUT B = 1 (on), Only then with the output also be on (1)

What do these gates do? OR GATE Watch the video below, or create the diagram for yourself in logic.ly/demo and see what happens. Note that the gate below is the OR gate. Input A If InputA OR InputB are on, then the bulb will be on (Boolean value = 1) Connect the toggle switches (on the left) to the OR gate (centre) and then the OR gate to the bulb (output) You’ll notice something quite interesting: The bulb lights up when either Input 1 OR Input 2 are on. Input B The OR logic gate performs this function and produces an output depending on the inputs. If Input B is ON (this represents a 1) If INPUT A = 1 (on) OR INPUT B = 1 (on), the output also be on (1)

The NOT gate acts as an inverter Watch the video below, or create the diagram for yourself in logic.ly/demo and see what happens. Note that the gate below is the NOT gate. Input A If InputA OR InputB are on, then the bulb will be on (Boolean value = 1) Connect the single input (toggle switch on the left) to the NOT gate, and then connect the NOT gate to the bulb. Input A NOT GATE You’ll notice a pattern. If the switch is on (1) then the bulb is off (0). And if the switch is off (0), then the bulb goes on (1) Input B The NOT gate tends to invert the signal that is coming through to produce the opposite signal. If Input A = 0 (off) then the bulb is on! If Input B is ON (this represents a 1) If INPUT A = 1 then NOT A = 0 If INPUT A = 0 then NOT A = 1

Use of a truth table – weird examples Each of the gates have a corresponding TRUTH TABLE. The truth table is an effective way of displaying the inputs and outputs of a gate using binary (Boolean values) Suppose the desired outcome was to PUT YOUR FAITH in Person x. You may come up with two factors that are crucial in determining whether or not you should put your faith in this person. Variable A = X must be Good AND Variable B = X must be Divine Variable A Variable B Final Output X is good X is divine Believe! X is not good Don’t believe! X is not divine You’ll note that you have made use of an AND gate - both conditions must be true for the output to be favourable.

Another example – this time for the OR Your computing teacher is planning a trip to Bletchley Park. It is only, unfortunately, for the students that managed to achieve an A OR a B in their A Level Exams. What would the truth table look like? Achieved an A Achieved a B Going on Trip? No Nope Yes Yes!  You’ll note that you have made use of an OR gate - EITHER CONDITION can be true for a favourable response.

Using truth tables And A A*B B Each of the gates have a corresponding TRUTH TABLE. The truth table is an effective way of displaying the inputs and outputs of a gate using binary (Boolean values) And A ? A*B ? B ? Note: The And gate is associated with multiplication ?

Using truth tables Or A A+B B Each of the gates have a corresponding TRUTH TABLE. The truth table is an effective way of displaying the inputs and outputs of a gate using binary (Boolean values) Or A ? A+B ? B ? Note: The OR gate is associated with addition ?

Using truth tables Not A Not A Each of the gates have a corresponding TRUTH TABLE. The truth table is an effective way of displaying the inputs and outputs of a gate using binary (Boolean values) Not A Not A ? ?

Using truth tables NAND A __ AB B This is a NOT-AND gate which is equal to an AND gate followed by a NOT gate.  The outputs of all NAND gates are high if any of the inputs are low. The symbol is an AND gate with a small circle on the output. The small circle represents inversion. NAND A ? __ AB ? B ? ?

Using truth tables NOR A ____ A+B B This is a NOT-OR gate which is equal to an OR gate followed by a NOT gate. The outputs of all NOR gates are low if any of the inputs are high. The symbol is an OR gate with a small circle on the output. The small circle represents inversion NOR A ____ A+B ? B ? ? ?

Using truth tables XOR A B The 'Exclusive-OR' gate is a circuit which will give a high output if either, but not both, of its two inputs are high. An encircled plus sign () is used to show the EOR operation. XOR A ? ? B ? ?

Using truth tables XNOR A B The 'Exclusive-NOR' gate circuit does the opposite to the EOR gate. It will give a low output if either, but not both, of its two inputs are high. The symbol is an EXOR gate with a small circle on the output. The small circle represents inversion. XNOR A ? ? B ? ?

Sample Questions *taken with permission from OCR (Specimen paper)

Sample Questions *taken with permission from OCR (Specimen paper)

Sample Questions *taken with permission from OCR (Specimen paper)

Answers *taken with permission from OCR (Specimen paper)