University of Technology

Similar documents
Lecture 4: More Boolean Algebra

Logic Design. Chapter 2: Introduction to Logic Circuits

Lecture 3: Boolean Algebra

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 2 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

Every time has a value associated with it, not just some times. A variable can take on any value within a range

Chapter 2: Princess Sumaya Univ. Computer Engineering Dept.

ECE 20B, Winter 2003 Introduction to Electrical Engineering, II LECTURE NOTES #2

Learning Objectives 10/7/2010. CE 411 Digital System Design. Fundamental of Logic Design. Review the basic concepts of logic circuits. Dr.

WEEK 2.1 BOOLEAN ALGEBRA

EEE130 Digital Electronics I Lecture #4

Boolean Algebra & Logic Gates. By : Ali Mustafa

Chapter 2 Boolean Algebra and Logic Gates

Ex: Boolean expression for majority function F = A'BC + AB'C + ABC ' + ABC.

CS 121 Digital Logic Design. Chapter 2. Teacher Assistant. Hanin Abdulrahman

Logic Gate Level. Part 2

CS 226: Digital Logic Design

CHAPTER1: Digital Logic Circuits Combination Circuits

Chapter 2 Combinational

Logic and Computer Design Fundamentals. Chapter 2 Combinational Logic Circuits. Part 1 Gate Circuits and Boolean Equations

Boolean Algebra and Logic Gates

Boolean algebra. Examples of these individual laws of Boolean, rules and theorems for Boolean algebra are given in the following table.

Chapter 2 Combinational Logic Circuits

Chapter 2 Combinational Logic Circuits

BOOLEAN ALGEBRA TRUTH TABLE

ECE/CS 250: Computer Architecture. Basics of Logic Design: Boolean Algebra, Logic Gates. Benjamin Lee

Week-I. Combinational Logic & Circuits

EECS150 - Digital Design Lecture 19 - Combinational Logic Circuits : A Deep Dive

ECE 250 / CPS 250 Computer Architecture. Basics of Logic Design Boolean Algebra, Logic Gates

Digital Circuit And Logic Design I. Lecture 3

MC9211 Computer Organization

E&CE 223 Digital Circuits & Systems. Lecture Transparencies (Boolean Algebra & Logic Gates) M. Sachdev

ECE/CS 250 Computer Architecture

Chapter 2: Switching Algebra and Logic Circuits

Chapter 2. Boolean Algebra and Logic Gates

Chapter 2: Boolean Algebra and Logic Gates

Combinational Logic Fundamentals

Ch 2. Combinational Logic. II - Combinational Logic Contemporary Logic Design 1

Digital Design. Digital Design

CHAPTER 2 BOOLEAN ALGEBRA

ENG2410 Digital Design Combinational Logic Circuits

LOGIC GATES. Basic Experiment and Design of Electronics. Ho Kyung Kim, Ph.D.

Lecture 2 Review on Digital Logic (Part 1)

EEA051 - Digital Logic 數位邏輯 吳俊興高雄大學資訊工程學系. September 2004

Chapter 2 : Boolean Algebra and Logic Gates

COS 140: Foundations of Computer Science

KP/Worksheets: Propositional Logic, Boolean Algebra and Computer Hardware Page 1 of 8

Combinational Logic Design Principles

ELCT201: DIGITAL LOGIC DESIGN

Number System conversions

Combinational Logic. Review of Combinational Logic 1

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA

Chapter 2 Boolean Algebra and Logic Gates

Chapter 2 (Lect 2) Canonical and Standard Forms. Standard Form. Other Logic Operators Logic Gates. Sum of Minterms Product of Maxterms

EC-121 Digital Logic Design

Chapter 2 Combinational Logic Circuits

2009 Spring CS211 Digital Systems & Lab CHAPTER 2: INTRODUCTION TO LOGIC CIRCUITS

Digital Logic Design. Malik Najmus Siraj

In Module 3, we have learned about Exclusive OR (XOR) gate. Boolean Expression AB + A B = Y also A B = Y. Logic Gate. Truth table

EECS Variable Logic Functions

Digital Logic Design ABC. Representing Logic Operations. Dr. Kenneth Wong. Determining output level from a diagram. Laws of Boolean Algebra

XOR - XNOR Gates. The graphic symbol and truth table of XOR gate is shown in the figure.

1 Boolean Algebra Simplification

Gate-Level Minimization

XI STANDARD [ COMPUTER SCIENCE ] 5 MARKS STUDY MATERIAL.

Textbook: Digital Design, 3 rd. Edition M. Morris Mano

Chapter 2 Boolean Algebra and Logic Gates

. T SHREE MAHAPRABHU PUBLIC SCHOOL & COLLEGE NOTES FOR BOARD EXAMINATION SUBJECT COMPUTER SCIENCE (Code: 083) Boolean Algebra

Binary Logic and Gates

Functions. Computers take inputs and produce outputs, just like functions in math! Mathematical functions can be expressed in two ways:

Chapter 2 Combinational logic

This form sometimes used in logic circuit, example:

EECS150 - Digital Design Lecture 4 - Boolean Algebra I (Representations of Combinational Logic Circuits)

Slide Set 3. for ENEL 353 Fall Steve Norman, PhD, PEng. Electrical & Computer Engineering Schulich School of Engineering University of Calgary

Outline. EECS150 - Digital Design Lecture 4 - Boolean Algebra I (Representations of Combinational Logic Circuits) Combinational Logic (CL) Defined

Boolean Algebra and Digital Logic

Possible logic functions of two variables

Boolean Algebra and Logic Simplification

Lecture 5: NAND, NOR and XOR Gates, Simplification of Algebraic Expressions

Unit 8A Computer Organization. Boolean Logic and Gates

E&CE 223 Digital Circuits & Systems. Lecture Transparencies (Boolean Algebra & Logic Gates) M. Sachdev. Section 2: Boolean Algebra & Logic Gates

Boolean Algebra CHAPTER 15

Binary Logic and Gates. Our objective is to learn how to design digital circuits.

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA (CONT.)

Unit 2 Boolean Algebra

DIGITAL LOGIC CIRCUITS

Combinatorial Logic Design Principles

Chap 2. Combinational Logic Circuits

211: Computer Architecture Summer 2016

Switches: basic element of physical implementations

CSC9R6 Computer Design. Practical Digital Logic

Chapter 2 Boolean Algebra and Logic Gates

Standard Expression Forms

Combinational logic. Possible logic functions of two variables. Minimal set of functions. Cost of different logic functions.

Number System. Decimal to binary Binary to Decimal Binary to octal Binary to hexadecimal Hexadecimal to binary Octal to binary

Computer Organization: Boolean Logic

CHAPTER III BOOLEAN ALGEBRA

ECE 238L Boolean Algebra - Part I

CpE358/CS381. Switching Theory and Logical Design. Class 2

4 Switching Algebra 4.1 Axioms; Signals and Switching Algebra

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA

Transcription:

University of Technology Lecturer: Dr. Sinan Majid Course Title: microprocessors 4 th year

معالجات دقيقة المرحلة الرابعة ھندسة الليزر والبصريات االلكترونية Lecture 3 & 4 Boolean Algebra and Logic Gates

Digital Systems Analysis problem: Inputs.. Logic Circuit.. Outputs Determine binary outputs for each combination of inputs Design problem: given a task, develop a circuit that accomplishes the task Many possible implementation Try to develop best circuit based on some criterion (size, power, performance, etc.)

Describing Circuit Functionality: Inverter Truth Table A Y A Y Symbol Basic logic functions have symbols. Input Output The same functionality can be represented with truth tables. Truth table completely specifies outputs for all input combinations. The above circuit is an inverter. An input of is inverted to a. An input of is inverted to a.

The AND Gate A B This is an AND gate. So, if the two inputs signals are asserted (high) the output will also be asserted. Otherwise, the output will be deasserted (low). Y Truth Table A B Y

The OR Gate A B Y This is an OR gate. So, if either of the two input signals are asserted, or both of them are, the output will be asserted. A B Y

Describing Circuit Functionality: Waveforms AND Gate A B Y Waveforms provide another approach for representing functionality. Values are either high (logic ) or low (logic ). Can you create a truth table from the waveforms?

Consider three-input gates 3 Input OR Gate

Boolean Algebra A Boolean algebra is defined as a closed algebraic system containing a set K or two or more elements and the two operators,. and +. Useful for identifying and minimizing circuit functionality Identity elements a + = a a. = a is the identity element for the + operation. is the identity element for the. operation.

Commutativity and Associativity of the Operators The Commutative Property: For every a and b in K, a + b = b + a a. b = b. a The Associative Property: For every a, b, and c in K, a + (b + c) = (a + b) + c a. (b. c) = (a. b). c

Distributivity of the Operators and Complements The Distributive Property: For every a, b, and c in K, a + ( b. c ) = ( a + b ). ( a + c ) a. ( b + c ) = ( a. b ) + ( a. c ) The Eistence of the Complement: For every a in K there eists a unique element called a (complement of a) such that, a + a = a. a = To simplify notation, the. operator is frequently omitted. When two elements are written net to each other, the AND (.) operator is implied a + b. c = ( a + b ). ( a + c ) a + bc = ( a + b )( a + c )

Duality The principle of duality is an important concept. This says that if an epression is valid in Boolean algebra, the dual of that epression is also valid. To form the dual of an epression, replace all + operators with. operators, all. operators with + operators, all ones with zeros, and all zeros with ones. Form the dual of the epression a + (bc) = (a + b)(a + c) Following the replacement rules a(b + c) = ab + ac Take care not to alter the location of the parentheses if they are present.

Involution This theorem states: a = a Remember that aa = and a+a =. Therefore, a is the complement of a and a is also the complement of a. As the complement of a is unique, it follows that a =a. Taking the double inverse of a value will give the initial value.

Absorption This theorem states: a + ab = a a(a+b) = a To prove the first half of this theorem: a + ab = a. + ab = a ( + b) = a (b + ) = a () a + ab = a

DeMorgan s Theorem A key theorem in simplifying Boolean algebra epression is DeMorgan s Theorem. It states: (a + b) = a b (ab) = a + b Complement the epression a(b + z( + a )) and simplify. (a(b+z( + a ))) = a + (b + z( + a )) = a + b (z( + a )) = a + b (z + ( + a ) ) = a + b (z + a ) = a + b (z + a)

Basic logic functions can be made from AND, OR, and NOT (invert) functions The behavior of digital circuits can be represented with waveforms, truth tables, or symbols Primitive gates can be combined to form larger circuits Boolean algebra defines how binary variables can be combined Rules for associativity, commutativity, and distribution are similar to algebra DeMorgan s rules are important. Will allow us to reduce circuit sizes.

Boolean Functions Boolean algebra deals with binary variables and logic operations. Function results in binary or y z F F = (y+z ) y z z y+z F = (y+z )

Boolean Functions Boolean algebra deals with binary variables and logic operations. Function results in binary or y z y y z G = y +yz yz y We will learn how to transition between equation, symbols, and truth table. yz G

Truth Table to Epression Converting a truth table to an epression Each row with output of becomes a product term Sum product terms together. y z G yz + yz + yz Any Boolean Epression can be represented in sum of products form!

Equivalent Representations of Circuits All three formats are equivalent Number of s in truth table output column equals AND terms for Sum-of-Products (SOP) y z y z G G = yz + yz + yz G

Reducing Boolean Epressions Is this the smallest possible implementation of this epression? No! G = yz + yz + yz Use Boolean Algebra rules to reduce compleity while preserving functionality. Step : Use Theorum (a + a = a) So yz + yz + yz = yz + yz + yz + yz Step 2: Use distributive rule a(b + c) = ab + ac So yz + yz + yz + yz = y(z + z ) + yz( + ) Step 3: Use Postulate 3 (a + a = ) So y(z + z ) + yz( + ) = y. + yz. Step 4: Use Postulate 2 (a. = a) So y. + yz. = y + yz = yz + yz + yz

Reduced Hardware Implementation Reduced equation requires less hardware! Same function implemented! y z y z G G = yz + yz + yz = y + yz G

Minterms and Materms Each variable in a Boolean epression is a literal Boolean variables can appear in normal () or complement form ( ) Each AND combination of terms is a minterm Each OR combination of terms is a materm For eample: Minterms y z Minterm y z m y z m y z m 4 yz m 7 For eample: Materms y z Materm +y+z M +y+z M +y+z M 4 +y +z M 7

Representing Functions with Minterms Minterm number same as row position in truth table (starting from top from ) Shorthand way to represent functions y z G G = yz + yz + yz G = m 7 + m 6 + m 3 = Σ(3, 6, 7)

Complementing Functions Minterm number same as row position in truth table (starting from top from ) Shorthand way to represent functions y z G G = yz + yz + yz G = (yz + yz + yz) = G Can we find a simpler representation?

Complementing Functions Step : assign temporary names b + c -> z (a+ z) = G Step 2: Use DeMorgans Law (a + z) = a. z G = a + b + c G = (a + b + c) Step 3: Resubstitute (b+c) for z a. z = a. (b + c) Step 4: Use DeMorgans Law a. (b + c) = a. (b. c ) Step 5: Associative rule a. (b. c ) = a. b. c G = a + b + c G = a. b. c = a b c

Complementation Eample Find complement of F = z + yz F = ( z + yz) DeMorgan s F = ( z) (yz) DeMorgan s F = ( +z )(y +z ) Reduction -> eliminate double negation on F = (+z )(y +z ) This format is called product of sums

Conversion Between Canonical Forms Easy to convert between minterm and materm representations For materm representation, select rows with s y z G G = yz + yz + yz G = m 7 + m 6 + m 3 = Σ(3, 6, 7) G = M M M 2 M 4 M 5 = Π(,,2,4,5) G = (+y+z)(+y+z )(+y +z)( +y+z)( +y+z )

Representation of Circuits All logic epressions can be represented in 2- level format Circuits can be reduced to minimal 2-level representation Sum of products representation most common in industry.

Logic functions of N variables Each truth table represents one possible function (e.g. AND, OR) If there are N inputs, there are 2 2 N For eample, is N is 2 then there are 6 possible truth tables. y G

The NAND Gate A B Y This is a NAND gate. It is a combination of an AND gate followed by an inverter. Its truth table shows this NAND gates have several interesting properties NAND(a,a)=(aa) = a = NOT(a) NAND (a,b)=(ab) = ab = AND(a,b) NAND(a,b )=(a b ) = a+b = OR(a,b) A B Y

The NAND Gate These three properties show that a NAND gate with both of its inputs driven by the same signal is equivalent to a NOT gate A NAND gate whose output is complemented is equivalent to an AND gate, and a NAND gate with complemented inputs acts as an OR gate. Therefore, we can use a NAND gate to implement all three of the elementary operators (AND,OR,NOT). Therefore, ANY switching function can be constructed using only NAND gates. Such a gate is said to be primitive or functionally complete.

NAND Gates into Other Gates A (what are these circuits?) Y NOT Gate A B Y A B AND Gate Y OR Gate

The NOR Gate A B Y This is a NOR gate. It is a combination of an OR gate followed by an inverter. It s truth table shows this NOR gates also have several interesting properties NOR(a,a)=(a+a) = a = NOT(a) NOR (a,b)=(a+b) = a+b = OR(a,b) NOR(a,b )=(a +b ) = ab = AND(a,b) A B Y

Functionally Complete Gates Just like the NAND gate, the NOR gate is functionally complete any logic function can be implemented using just NOR gates. Both NAND and NOR gates are very valuable as any design can be realized using either one. It is easier to build an IC chip using all NAND or NOR gates than to combine AND,OR, and NOT gates. NAND/NOR gates are typically faster at switching and cheaper to produce.

NOR Gates into Other Gates A (what are these circuits?) Y NOT Gate A B Y A B OR Gate Y AND Gate

The XOR Gate (Eclusive-OR) A B Y This is a XOR gate. XOR gates assert their output when eactly one of the inputs is asserted, hence the name. The switching algebra symbol for this operation is, i.e. = and =. A B Y

The XNOR Gate A B Y This is a XNOR gate. This functions as an eclusive-nor gate, or simply the complement of the XOR gate. The switching algebra symbol for this operation is, i.e. = and =. A B Y

NOR Gate Equivalence NOR Symbol, Equivalent Circuit, Truth Table

DeMorgan s Theorem A key theorem in simplifying Boolean algebra epression is DeMorgan s Theorem. It states: (a + b) = a b (ab) = a + b Complement the epression a(b + z( + a )) and simplify. (a(b+z( + a ))) = a + (b + z( + a )) = a + b (z( + a )) = a + b (z + ( + a ) ) = a + b (z + a ) = a + b (z + a)

Eample Determine the output epression for the below circuit and simplify it using DeMorgan s Theorem

Universality of NAND and NOR gates

Universality of NOR gate Equivalent representations of the AND, OR, and NOT gates

Eample

Interpretation of the two NAND gate symbols Determine the output epression for circuit via DeMorgan s Theorem

Interpretation of the two OR gate symbols Determine the output epression for circuit via DeMorgan s Theorem