Digital Logic Lecture 5 Boolean Algebra and Logic Gates Part I

Similar documents
INTERMEDIATE LOGIC Glossary of key terms

Logic Appendix: More detailed instruction in deductive logic

(Refer Slide Time 03:00)

Houghton Mifflin MATHEMATICS

A. Problem set #3 it has been posted and is due Tuesday, 15 November

Grade 7 Math Connects Suggested Course Outline for Schooling at Home 132 lessons

Georgia Quality Core Curriculum

Grade 6 Math Connects Suggested Course Outline for Schooling at Home

1 Clarion Logic Notes Chapter 4

Grade 6 correlated to Illinois Learning Standards for Mathematics

Artificial Intelligence: Valid Arguments and Proof Systems. Prof. Deepak Khemani. Department of Computer Science and Engineering

INTRODUCTION TO LOGIC 1 Sets, Relations, and Arguments

Johns Hopkins Math Tournament 2018 Proof Round: Fuzzy Knights and Knaves

MISSOURI S FRAMEWORK FOR CURRICULAR DEVELOPMENT IN MATH TOPIC I: PROBLEM SOLVING

Study Guides. Chapter 1 - Basic Training

2.1 Review. 2.2 Inference and justifications

Part II: How to Evaluate Deductive Arguments

Macmillan/McGraw-Hill SCIENCE: A CLOSER LOOK 2011, Grade 4 Correlated with Common Core State Standards, Grade 4

Logic: A Brief Introduction

PART III - Symbolic Logic Chapter 7 - Sentential Propositions

Artificial Intelligence Prof. P. Dasgupta Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur

Rosen, Discrete Mathematics and Its Applications, 6th edition Extra Examples

McDougal Littell High School Math Program. correlated to. Oregon Mathematics Grade-Level Standards

KRISHNA KANTA HANDIQUI STATE OPEN UNIVERSITY Patgaon, Ranigate, Guwahati SEMESTER: 1 PHILOSOPHY PAPER : 1 LOGIC: 1 BLOCK: 2

What are Truth-Tables and What Are They For?

Potten End Church of England Primary School Curriculum Map. Year 6

NPTEL NPTEL ONINE CERTIFICATION COURSE. Introduction to Machine Learning. Lecture-59 Ensemble Methods- Bagging,Committee Machines and Stacking

Steady and Transient State Analysis of Gate Leakage Current in Nanoscale CMOS Logic Gates

Logic & Proofs. Chapter 3 Content. Sentential Logic Semantics. Contents: Studying this chapter will enable you to:

Macmillan/McGraw-Hill SCIENCE: A CLOSER LOOK 2011, Grade 3 Correlated with Common Core State Standards, Grade 3

Artificial Intelligence Prof. P. Dasgupta Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur

LOGIC ANTHONY KAPOLKA FYF 101-9/3/2010

SHORT ANSWER. Write the word or phrase that best completes each statement or answers the question.

cc01p, 10/23/94 CHAPTER 1

CRITICAL THINKING (CT) MODEL PART 1 GENERAL CONCEPTS

Natural Deduction for Sentence Logic

Saint Bartholomew School Third Grade Curriculum Guide. Language Arts. Writing

Module 02 Lecture - 10 Inferential Statistics Single Sample Tests

Lazy Functional Programming for a survey

Chapter 3: Basic Propositional Logic. Based on Harry Gensler s book For CS2209A/B By Dr. Charles Ling;

Logic for Computer Science - Week 1 Introduction to Informal Logic

THE RELATION BETWEEN THE GENERAL MAXIM OF CAUSALITY AND THE PRINCIPLE OF UNIFORMITY IN HUME S THEORY OF KNOWLEDGE

A BRIEF INTRODUCTION TO LOGIC FOR METAPHYSICIANS

Basic Algorithms Overview

Carolina Bachenheimer-Schaefer, Thorsten Reibel, Jürgen Schilder & Ilija Zivadinovic Global Application and Solution Team

Homework: read in the book pgs and do "You Try It" (to use Submit); Read for lecture. C. Anthony Anderson

correlated to the Massachussetts Learning Standards for Geometry C14

10.3 Universal and Existential Quantifiers

MLLunsford, Spring Activity: Conditional Probability and The Law of Total Probability

MITOCW ocw f99-lec18_300k

Truth Tables for Negation, Conjunction, and Disjunction

APRIL 2017 KNX DALI-Gateways DG/S x BU EPBP GPG Building Automation. Thorsten Reibel, Training & Qualification

PHI 1500: Major Issues in Philosophy

Chapter 9- Sentential Proofs

prohibition, moral commitment and other normative matters. Although often described as a branch

An Introduction to. Formal Logic. Second edition. Peter Smith, February 27, 2019

Unit 5: Inverse Functions

Pearson Education Limited Edinburgh Gate Harlow Essex CM20 2JE England and Associated Companies throughout the world

Intel x86 Jump Instructions. Part 5. JMP address. Operations: Program Flow Control. Operations: Program Flow Control.

Today s Lecture 1/28/10

Is the Concept of God Fundamental or Figment of the Mind?

Module 6: Inverse Functions

Intel x86 Jump Instructions. Part 6. JMP address. Operations: Program Flow Control. Operations: Program Flow Control.

Doctor Faustus and the Universal Machine

C. Problem set #1 due today, now, on the desk. B. More of an art than a science the key things are: 4.

Chapter 8 - Sentential Truth Tables and Argument Forms

Instructor s Manual 1

Truth-Functional Propositional Logic

MATH1061/MATH7861 Discrete Mathematics Semester 2, Lecture 5 Valid and Invalid Arguments. Learning Goals

9 Methods of Deduction

DOWNLOAD OR READ : THE LOGIC BOOK PDF EBOOK EPUB MOBI

Predictive Coding. CSE 390 Introduction to Data Compression Fall Entropy. Bad and Good Prediction. Which Context to Use? PPM

1)Asher: create a handout for the week summing up LOGIC

356 THE MONIST all Cretans were liars. It can be put more simply in the form: if a man makes the statement I am lying, is he lying or not? If he is, t

UC Berkeley, Philosophy 142, Spring 2016

Summary of Research about Denominational Structure in the North American Division of the Seventh-day Adventist Church

Why Study Syntax? Chapter 23 Lecture Roadmap. Clause vs. Sentence. Chapter 23 Lecture Roadmap. Why study syntax?

A Short Course in Logic Example 3

Review of Philosophical Logic: An Introduction to Advanced Topics *

Prompt: Explain van Inwagen s consequence argument. Describe what you think is the best response

This test accounts for 20% of the Final mark

Complications for Categorical Syllogisms. PHIL 121: Methods of Reasoning February 27, 2013 Instructor:Karin Howe Binghamton University

Am I free? Freedom vs. Fate

A Judgmental Formulation of Modal Logic

Workbook Unit 3: Symbolizations

ELA CCSS Grade Three. Third Grade Reading Standards for Literature (RL)

Jensen, Irving L., Jensen s Survey of The Old Testament Survey, Moody Bible Insitute, 1978.

Functionalism and the Chinese Room. Minds as Programs

Verification and Validation

The way we convince people is generally to refer to sufficiently many things that they already know are correct.

Two restrictions on possible connectives

Macmillan/McGraw-Hill SCIENCE: A CLOSER LOOK 2011, Grade 1 Correlated with Common Core State Standards, Grade 1

ANGELS SPECIALIST SCHOOL INTERNATIONAL SCHEME OF WORK FOR MATHEMATICS (TERM 2) GRADE 3

6. Truth and Possible Worlds

What would count as Ibn Sīnā (11th century Persia) having first order logic?

Number, Part I of II

David Hume, A Treatise of Human Nature ( ), Book I, Part III.

ELA CCSS Grade Five. Fifth Grade Reading Standards for Literature (RL)

6.080 / Great Ideas in Theoretical Computer Science Spring 2008

Logicola Truth Evaluation Exercises

Transcription:

Digital Logic Lecture 5 Boolean Algebra and Logic Gates Part I By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department

Outline Introduction. Boolean variables and truth tables. Fundamental logic gates (AND, OR, and NOT gates). Logic circuits, functions, and Boolean algebra. Universal logic gates (NAND and NOR). XOR and XNOR gates. Extension to multiple inputs. The Hashemite University 2

Introduction Till now we have understood the concept of binary numbers. Next, we will study ways of describing how systems using binary logic levels make decisions. After that the definition of logic circuit will be complete. Boolean algebra is an important tool in describing, analyzing, designing, and implementing digital circuits. Logic gates are the basic hardware units used to implement logic function or circuits described by Boolean algebra. The Hashemite University 3

Boolean Constants and Variables Boolean algebra allows only two values; 0 and 1. Logic 0 can be: false, off, low, no, open switch. Logic 1 can be: true, on, high, yes, closed switch. Three basic logic operations: OR, AND, and NOT. The operation of these logic operations is best described by truth tables. The Hashemite University 4

Truth Tables I A truth table describes the relationship between the input and the output of a logic circuit. The number of entries corresponds to the number of inputs. For example a 2 input table would have 2 2 = 4 entries. A 3 input table would have 2 3 = 8 entries, and so on. The Hashemite University 5

Truth Tables II Examples of truth tables with 2, 3, and 4 inputs. The Hashemite University 6

Fundamental Logic Gates OR : gives an output of 1 when at least one of its input is 1 (Disjunction or logical addition). AND: gives an output of 1 when all of its inputs are 1 (Conjunction or logical multiplication). NOT: invert its input, if the input is 1 the output is 0 and vice versa (Negation). The Hashemite University 7

OR Logic Gate I The Boolean expression for the OR operation is X = A + B This is read as x equals A or B. X = 1 when A = 1 or B = 1 or both equal 1. Truth table and circuit symbol for a two input OR gate: The Hashemite University 8

OR Logic Gate II The OR operation is similar to addition but when A = 1 and B = 1, the OR operation produces 1 + 1 = 1 (not 10 as in arithmetic addition). In the Boolean expression x=1+1+1=1 We could say in English that x is true (1) when A is true (1) OR B is true (1) OR C is true (1). The Hashemite University 9

Timing Diagram of OR Gate The Hashemite University 10

AND Logic Gate I The Boolean expression for the AND operation is X = A B or X = AB This is read as x equals A and B. x = 1 when A = 1 and B = 1. Truth table and circuit symbol for a two input AND gate are shown. Notice the difference between OR and AND gates. The Hashemite University 11

AND Logic Gate II The AND operation is similar to multiplication. In the Boolean expression X = A B C X = 1 only when A = 1, B = 1, and C = 1. The Hashemite University 12

Timing Diagram of AND Gate The Hashemite University 13

NOT Logic Gate I The Boolean expression for the NOT operation is X A This is read as: x equals NOT A, or x equals the inverse of A, or x equals the complement of A The Hashemite University 14

NOT Logic Gate II Truth table, symbol, and sample waveform for the NOT circuit. The Hashemite University 15

Buffer Logic Gate The function performed by Buffer gate is called transfer since this gate just transfer the value of its input to its output without any change (does not perform any logical operation). Equivalent to two inverters (NOT gates) connected in cascade (the output of the first one is the input of the second one). Needed for power amplification of the signal (or inputs). A x = A 0 0 1 1 A x The Hashemite University 16

Describing Logic Circuits Algebraically I The three basic Boolean operations (OR, AND, NOT) can describe any logic circuit. Operators Precedence: If an expression contains AND, OR, and NOT gates combined with each other then follow these rules: First: implement NOT operators starting from left to right. Second: implement AND operations starting from left to right. Third: implement OR operators starting from left to right. Remember that parenthesis force priority (you start implementation of what inside a parenthesis). For nested parenthesis you start from the inner most one. If multiple parenthesis exist start implementation from left to right The Hashemite University 17

Describing Logic Circuits Algebraically II Examples of Boolean expressions for logic circuits: The Hashemite University 18

Describing Logic Circuits Algebraically III The output of an inverter is equivalent to the input with a bar over it. Input A through an inverter equals A. Examples using inverters. The Hashemite University 19

Examples The Hashemite University 20

Evaluating Logic Circuit Outputs Output logic levels can be determined directly from a circuit diagram. The output of each gate is noted until a final output is found. Rules for evaluating a Boolean expression: Perform all inversions of single terms. Perform all operations within parenthesis. Perform AND operation before an OR operation unless parenthesis indicate otherwise. If an expression has a bar over it, perform the operations inside the expression and then invert the result. The Hashemite University 21

Example Evaluate Boolean expressions by substituting values and performing the indicated operations: A 0, B 1, C 1, and x ABC(A D) 0 1 1 (0 1) 1 1 1 (0 1) 1 1 1 (1) 1 1 1 0 0 D 1 The Hashemite University 22

Implementing Circuits From Boolean Expressions It is important to be able to draw a logic circuit from a Boolean expression. Follow the rules of operators precedence (used when evaluating Boolean expressions) when defining the locations of gate used in the circuit that represent the desired logic function. Examples: Implement the following Boolean expressions: (a) y = AC+BC +A BC ( x=(a+b)(b +C (b) The Hashemite University 23

Example 1 (a) The Hashemite University 24

Example 1 (b) The Hashemite University 25

NAND Logic Gate I Combine basic AND, OR, and NOT operations. The NAND gate is an inverted AND gate. An inversion bubble is placed at the output of the AND gate. The Boolean expression is x AB NAND operator symbol is x A B The Hashemite University 26

NAND Logic Gate II Truth table and gate symbol (compare it with AND gate truth table): A B x A B 0 0 1 0 1 1 1 0 1 A B x 1 1 0 The Hashemite University 27

Timing Diagram of NAND Gate The Hashemite University 28

NOR Logic Gate I Combine basic AND, OR, and NOT operations. The NOR gate is an inverted OR gate. An inversion bubble is placed at the output of the OR gate. The Boolean expression is x A B NOR operator symbol is x A B The Hashemite University 29

NOR Logic Gate II Truth table and gate symbol (Compare it with the OR gate truth table): A B 0 0 x A B 1 0 1 0 1 0 0 1 1 0 A B x The Hashemite University 30

Timing Diagram of NOR Gate The Hashemite University 31

Exclusive OR Gate I Abbreviated as XOR gate. It gives 1 when its two inputs are of different values, otherwise it gives 0 (when they are equal). So, it is also called the binary difference operator. The Boolean expression is XOR operator symbol is x x AB A B AB The Hashemite University 32

Exclusive OR Gate II Truth table and gate symbol: A B 0 0 x A B 0 0 1 1 1 0 1 1 1 0 A B x The Hashemite University 33

Exclusive NOR Gate I Abbreviated as XNOR gate. It gives 1 when its two inputs are equal, otherwise it gives 0 (when they are different). So, it is also called the binary equivalence operator. It is the complement (or the inverter of XOR) The Boolean expression is XNOR operator symbol is x A B \ x AB A ' B ' The Hashemite University 34

Exclusive NOR Gate II Truth table and gate symbol: A B 0 0 x A B \ 1 0 1 0 1 0 0 1 1 1 A B x The Hashemite University 35

Extension to Multiple Inputs I All the logical gates that we have taken (except the unary ones) can be extended to have multiple inputs. The only condition for that is the binary operation represented by the gate must be associative and commutative. E.g. OR and AND gates. NAND and NOR gates are not associative. However, to make them extendable we define them as an inverted AND and as an inverted OR respectively. E.g.: three input NAND gate have the expression of (x.y.z) The Hashemite University 36

Extension to Multiple Inputs II XOR and XNOR are both commutative and associative can be extended to multiple inputs. Uncommon from hardware point of view. Multi-input XOR gate (more than 2 inputs) is called an odd-function since it produces 1 if and only if the number of 1 s (inputs that are 1) is odd. Otherwise, it will gives an output of 0. Multi-input XNOR gate (more than 2 inputs) is called an even-function since it produces 1 if and only if the number of 1 s (inputs that are 1) is even. Otherwise, it will gives an output of 0. The Hashemite University 37

Universality of NAND and NOR Gates I NAND or NOR gates can be used to create the three basic or fundamental logic gates (OR, AND, and INVERT). So, any circuit can be implemented totally using NAND gates alone or NOR gates alone (inverters are always allowed). For this they are called universal gates and they are used in Ics fabrication. This characteristic provides flexibility and is very useful in logic circuit design. The Hashemite University 38

Implement AND, OR using NAND The Hashemite University 39

Implement AND, OR using NOR The Hashemite University 40

Boolean Function Using only NOR or only NAND So, any boolean function can implemented totally using NAND gates or using NOR gates. Example: On board. The Hashemite University 41

Logic Symbol Interpretation When an input or output on a logic circuit symbol has no bubble on it, that line is said to be active-high. Otherwise the line is said to be active-low. When a logic signal is in its active state, it can be said to be asserted (=activated). When a logic signal is not in its active state, it is said to be unasserted (=inactive). The Hashemite University 42

Example I The Hashemite University 43

Example 2 The Hashemite University 44

Which Gate Representation to Use? If the circuit is being used to cause some action when output goes to the 1 state, then use active-high representation. If the circuit is being used to cause some action when output goes to the 0 state, then use active-low representation. The Hashemite University 45

Additional Notes This lecture covers the following material from the textbook: Chapter 1: Section 1.9 Chapter 2: Sections 2.7 and 2.8 Chapter 3: Section 3.6 The Hashemite University 46