10/22/2004EE 42 fall 2004 lecture 221 Lecture #22 Truth tables and gates This week: Circuits for digital devices.

Slides:



Advertisements
Similar presentations
Logic Gates.
Advertisements

CT455: Computer Organization Logic gate
Computer Science 210 Computer Organization Introduction to Logic Circuits.
Programmable Logic Controllers.
Cosc 2150: Computer Organization Chapter 3: Boolean Algebra and Digital Logic.
Boolean Algebra and Logic Gate
Lecture 2 Dr Richard Reilly Dept. of Electronic & Electrical Engineering Room 153, Engineering Building To insert your company logo on this slide From.
Logic Gate Level Combinational Circuits, Part 1. Circuits Circuit: collection of devices physically connected by wires to form a network Net can be: –
10/19/2004EE 42 fall 2004 lecture 211 Lecture #21 Intro to Digital Electronics This week: Circuits for digital devices.
10/25/2004EE 42 fall 2004 lecture 231 Lecture #23 Synthesis Next week: Converting gates into circuits.
Lecture 3. Boolean Algebra, Logic Gates
3. DIGITAL ELECTRONICS..
Lecture 3. Boolean Algebra, Logic Gates Prof. Sin-Min Lee Department of Computer Science 2x.
Lecture 17: Digital Design Today’s topic –Intro to Boolean functions Reminders –HW 4 due Wednesday 10/8/2014 (extended) –HW 5 due Wednesday 10/15/2014.
The Digital Logic Level
Fall 2012: FCM 708 Foundation I Lecture 2 Prof. Shamik Sengupta
1 Boolean Algebra & Logic Gates. 2 Objectives Understand the relationship between Boolean logic and digital computer circuits. Learn how to design simple.
CPS3340 COMPUTER ARCHITECTURE Fall Semester, /05/2013 Lecture 4: Basics of Logic Design Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER.
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.
4. Electrons and electronics 4.5 Digital electronics.
Lecture 22: 11/19/2002CS170 Fall CS170 Computer Organization and Architecture I Ayman Abdel-Hamid Department of Computer Science Old Dominion University.
Week 6: Gates and Circuits: PART I READING: Chapter 4.
Sneha.  Gates Gates  Characteristics of gates Characteristics of gates  Basic Gates Basic Gates  AND Gate AND Gate  OR gate OR gate  NOT gate NOT.
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.
CEC 220 Digital Circuit Design Boolean Algebra I Wed, Sept 2 CEC 220 Digital Circuit Design Slide 1 of 13.
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,
Boolean Algebra Computer Architecture. Digital Representation Digital is an abstraction of analog voltage –Voltage is a continuous, physical unit Typically.
BOOLEAN ALGEBRA LOGIC GATES. Introduction British mathematician George Boole( ) was successful in finding the link between logic and mathematics.
1 Ethics of Computing MONT 113G, Spring 2012 Session 4 Binary Addition.
Logic Simplification-Using Boolean Laws Logic Design Laboratory EE 2121 Lectures By Manesh T EE2121-In Charge
The inverter performs the Boolean NOT operation. When the input is LOW, the output is HIGH; when the input is HIGH, the output is LOW. The Inverter AX.
WORKING PRINCIPLE OF DIGITAL LOGIC
Logic Gates and Boolean Algebra Introduction to Logic II.
Boolean Algebra and Computer Logic Mathematical Structures for Computer Science Chapter 7 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Boolean Logic.
4–1. BSCS 5 th Semester Introduction Logic diagram: a graphical representation of a circuit –Each type of gate is represented by a specific graphical.
Mu.com.lec 9. Overview Gates, latches, memories and other logic components are used to design computer systems and their subsystems Good understanding.
Dr. ClincyLecture Slide 1 CS6020- Chapter 3 (3A and ) Dr. Clincy Professor of CS First Exam - Tuesday, September 6th Coverage: All subjects up to.
Logic gates.
Boolean Algebra & Logic Gates
Basics of Logic gates - Part 1
Digital Logic.
Morgan Kaufmann Publishers
Logic Gates and Boolean Algebra
Logic Gates and Boolean Algebra
Logic Gates.
Logic Gates Benchmark Companies Inc PO Box Aurora CO
EI205 Lecture 5 Dianguang Ma Fall 2008.
Digital Logic.
Basic Logical Operations (Fascinating)
Digital Signals Digital Signals have two basic states:
Fundamentals & Ethics of Information Systems IS 201
University of Gujrat Department of Computer Science
Computer Science 210 Computer Organization
Agenda – 2/12/18 Questions? Readings: CSI 4, P
Schematics 201 Lecture Topic: Electrical Symbols
CS Chapter 3 (3A and ) Part 3 of 8
Logic Gates.
Boolean Algebra.
Logic Gates.
CS Chapter 3 (3A and ) – Part 2 of 5
Gates Type AND denoted by X.Y OR denoted by X + Y NOR denoted by X + Y
GCSE Computer Science – Logic Gates & Boolean Expressions
Chapter 4 Gates and Circuits.
Truth tables Mrs. Palmer.
Digital Logic Design Basics Combinational Circuits Sequential Circuits.
Chapter 3 – Describing Logic Circuits
DIGITAL ELECTRONICS AND LOGIC GATES. ANALOG SIGNAL:- Analog signal is continuous time varying current or voltage signal.
Agenda Lecture Content: Combinatorial Circuits Boolean Algebras
Presentation transcript:

10/22/2004EE 42 fall 2004 lecture 221 Lecture #22 Truth tables and gates This week: Circuits for digital devices

10/22/2004EE 42 fall 2004 lecture 222 Topics Today: Combinatorial logic Truth tables And, Or, and Not gates

10/22/2004EE 42 fall 2004 lecture 223 Combinatorial logic Combinatorial logic describes a digital circuit where there are a set of digital inputs, say N wires each one (1) or zero (0) ( example:1=true, 2 volts or 0=false, zero volts) And M digital outputs, M wires each carrying 1 or 0, which are an instantaneous function of the inputs So in combinatorial logic, there is no sequence of events, internal memory or flags, just a straight input  output

10/22/2004EE 42 fall 2004 lecture 224 Truth Table A truth table is a general way of describing combinatorial logic, by just listing all of the possible states of the input, and the value of each output which is the result. Lets look at a truth table for “exclusive or” (XOR) ABoutput Every possible combination of inputs

10/22/2004EE 42 fall 2004 lecture 225 In principle, every problem which could be described with discrete inputs (integers, fractions, flags programs!) could be solved with a single combinatorial logic machine. This is very fast once built. But it practice, the combinatorial logic would get too complex, for example the truth table would have 2 n rows, where N is the number of Boolean variables needed to take into account all possible inputs. So for complex problems, we use combinatorial logic circuits as steps from state to state of a machine (a “finite state machine”, for example a computer)

10/22/2004EE 42 fall 2004 lecture 226 Translating mathematics to machines So once again, we are in the position of translating mathematics into a machine which can execute the formulas, but this time as digital, Boolean expressions rather than as continuous functions of time and voltage.

10/22/2004EE 42 fall 2004 lecture 227 Logical expressions Fortunately, as Boole pointed out, the language of facts which are true or false are natural to us as a species, and so we can deal with much of Boolean logic intuitively. However, more complex logic expressions are easier if we have a notation, symbols and rules for manipulation.

10/22/2004EE 42 fall 2004 lecture 228 Truth tables with 2 inputs With just two Boolean inputs, there are four possible combinations, so a truth table for two inputs would have four rows. 00, 01, 10, 11 Each of the rows of a possible truth table can have a different Boolean output, so there are 16 different possible truth tables for an expression with two inputs, and they are shown on the next slide

9 ABout AB AB AB AB AB AB AB AB AB AB AB AB AB AB AB NOR AND XOR OR NAND

10/22/2004EE 42 fall 2004 lecture 2210 And, Or, and Not are sufficient As you see from the next slide, with only the functions AND OR and NOT, all of the possible expressions for two inputs can be formed. Any expression of any number of inputs can be formed using just AND OR, and NOT. NOR by itself is also complete, but is not as intuitive to use

11 ABout AB AB AB AB AB AB AB AB AB AB AB AB AB AB AB Not (A or B) AND (A or B) and (not (A and B)) OR Not (A and B) FalseB and (not A)Not A A and (not B)Not B Not (A OR B)B(not A) or (A and B) AA OR (Not B)True

10/22/2004EE 42 fall 2004 lecture 2212 NOR is sufficient by itself NOT A = A NOR A A AND B = (Not A) NOR (Not B) A OR B= Not (A NOR B) So if you can build a NOR circuit, these can be combined to form any Boolean logic expression

10/22/2004EE 42 fall 2004 lecture 2213 Logical Expressions Example: Z = A Examples: X = A · B ; Y = A · B · C Examples: W = A+B ; Z = A+B+C Standard logic notation : AND:“dot” OR :“+ sign” NOT:“bar over symbol for complement” With these basic operations we can construct any logical expression. Order of operation: NOT, AND, OR (note that negation of an expression is performed after the expression is evaluated, so there is an implied parenthesis, e.g. means.

10/22/2004EE 42 fall 2004 lecture 2214 Logic Function Example Boolean Expression:H = (A · B · C) + T This can be read H=1 if (A and B and C are 1) or T is 1, or H is true if all of A,B,and C are true, or T is true, or The voltage at node H will be high if the input voltages at nodes A, B and C are high or the input voltage at node T is high

10/22/2004EE 42 fall 2004 lecture 2215 Logic Function Example 2 Boolean Expression:B = A + S(D + T ) This can be read B=1 if A = 1 or S=1 AND (D OR T =1), i.e. B=1 if {A = 1} or {S=1 AND (D OR T =1)} or B is true IF {A is true} OR {S is true AND D OR T is true} or The voltage at node H will be high if {the input voltage at node A is high} OR {the input voltage at S is high and the voltages at D and T are high} You wish to express under which conditions your burglar alarm goes off (B=1): If the “Alarm Test” button is pressed (A=1) OR if the Alarm is Set (S=1) AND { the door is opened (D=1) OR the trunk is opened (T=1)}

10/22/2004EE 42 fall 2004 lecture 2216 Example “Truth Table” Truth Table for Logic Expression H = (A · B · C) + T

10/22/2004EE 42 fall 2004 lecture 2217 Evaluation of Logical Expressions with “Truth Tables” The Truth Table completely describes a logic expression The Truth Table is the fundamental meaning of a logic expression. Two logic expressions are equal if their truth tables are the same

10/22/2004EE 42 fall 2004 lecture 2218 Some Important Logical Functions “AND” “OR” “INVERT” or “NOT” “not AND” = NAND “not OR” = NOR exclusive OR = XOR (or ) AnotA

10/22/2004EE 42 fall 2004 lecture 2219 These are circuits that accomplish a given logic function such as “OR”. We will shortly see how such circuits are constructed. Each of the basic logic gates has a unique symbol, and there are several additional logic gates that are regarded as important enough to have their own symbol. The set is: AND, OR, NOT, NAND, NOR, and EXCLUSIVE OR. Logic Gates A B C=A·B AND C = A B NAND C = NOR A B NOT A OR A B C=A+B EXCLUSIVE OR A B

10/22/2004EE 42 fall 2004 lecture 2220 With a combination of logic gates we can construct any logic function. In these two examples we will find the truth table for the circuit. Logic Circuits B A C It is helpful to list the intermediate logic values (at the input to the OR gate). Let’s call them X and Y. X Y Now we complete the truth tables for X and Y, and from that for C. (Note that X and Y and finally C = X + Y) ABXYC Interestingly, this is the same truth table as the EXCLUSIVE OR