Chapter 2. Boolean Algebra and Logic Gates

Similar documents
Boolean Algebra and Logic Gates

Chapter 2: Boolean Algebra and Logic Gates

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

Chapter 2 Boolean Algebra and Logic Gates

MC9211 Computer Organization

Chapter 2 Boolean Algebra and Logic Gates

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

Chapter 2 Boolean Algebra and Logic Gates

Chapter 2 : Boolean Algebra and Logic Gates

Logic Design. Chapter 2: Introduction to Logic Circuits

Boolean Algebra & Logic Gates. By : Ali Mustafa

EC-121 Digital Logic Design

Digital Circuit And Logic Design I. Lecture 3

Chapter 2: Switching Algebra and Logic Circuits

2. Associative Law: A binary operator * on a set S is said to be associated whenever (A*B)*C = A*(B*C) for all A,B,C S.

Combinational Logic Design Principles

Digital Logic Design. Malik Najmus Siraj

Chapter 2: Princess Sumaya Univ. Computer Engineering Dept.

CHAPTER III BOOLEAN ALGEBRA

CHAPTER III BOOLEAN ALGEBRA

Chap 2. Combinational Logic Circuits

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

WEEK 2.1 BOOLEAN ALGEBRA

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

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

Week-I. Combinational Logic & Circuits

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

Boolean Algebra and Logic Gates Chapter 2. Topics. Boolean Algebra 9/21/10. EECE 256 Dr. Sidney Fels Steven Oldridge

Chapter-2 BOOLEAN ALGEBRA

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

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

Chapter 2 Combinational Logic Circuits

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA

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

Midterm1 Review. Jan 24 Armita

This form sometimes used in logic circuit, example:

Total Time = 90 Minutes, Total Marks = 50. Total /50 /10 /18

II. COMBINATIONAL LOGIC DESIGN. - algebra defined on a set of 2 elements, {0, 1}, with binary operators multiply (AND), add (OR), and invert (NOT):

Binary logic consists of binary variables and logical operations. The variables are

Unit 2 Boolean Algebra

ENG2410 Digital Design Combinational Logic Circuits

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

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

Chapter 2 Combinational Logic Circuits

Contents. Chapter 2 Digital Circuits Page 1 of 30

BOOLEAN ALGEBRA TRUTH TABLE

CHAPTER 2 BOOLEAN ALGEBRA

Standard Expression Forms

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

EEE130 Digital Electronics I Lecture #4

Digital Design. Digital Design

Binary Logic and Gates

BOOLEAN LOGIC. By- Neha Tyagi PGT CS KV 5 Jaipur II Shift, Jaipur Region. Based on CBSE curriculum Class 11. Neha Tyagi, KV 5 Jaipur II Shift

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

Number System conversions

CHAPTER1: Digital Logic Circuits Combination Circuits

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

Gate-Level Minimization

Chapter 2 Boolean Algebra and Logic Gates

Boolean Algebra CHAPTER 15

Computer Organization I

Fundamentals of Computer Systems

Lecture 6: Manipulation of Algebraic Functions, Boolean Algebra, Karnaugh Maps

Digital Logic Design. Combinational Logic


CS 226: Digital Logic Design

Combinational Logic. Review of Combinational Logic 1

Chapter 2 Combinational Logic Circuits

Lecture 2 Review on Digital Logic (Part 1)

Combinatorial Logic Design Principles

1. Name the person who developed Boolean algebra

211: Computer Architecture Summer 2016

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

BOOLEAN ALGEBRA. Introduction. 1854: Logical algebra was published by George Boole known today as Boolean Algebra

Part 5: Digital Circuits

Learning Objectives. Boolean Algebra. In this chapter you will learn about:

Chapter 2 Combinational Logic Circuits

Unit 2 Boolean Algebra

Logic Gate Level. Part 2

Digital Systems and Information Part II

CHAPTER 3 BOOLEAN ALGEBRA

Combinational Logic Fundamentals

UNIVERSITI TENAGA NASIONAL. College of Information Technology

Systems I: Computer Organization and Architecture

ELCT201: DIGITAL LOGIC DESIGN

L2: Combinational Logic Design (Construction and Boolean Algebra)

CHAPTER 12 Boolean Algebra

Boolean Algebra and Logic Simplification

Boolean Algebra. The Building Blocks of Digital Logic Design. Section. Section Overview. Binary Operations and Their Representation.

COE 202: Digital Logic Design Combinational Logic Part 2. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:

Gray Code. ASCII Character Code. To convert the number from binary to Gray code the relations must be known. 1 1 = = = = 0

Review: Additional Boolean operations

Review for Test 1 : Ch1 5

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

control in out in out Figure 1. Binary switch: (a) opened or off; (b) closed or on.

Fundamentals of Computer Systems

Digital electronics form a class of circuitry where the ability of the electronics to process data is the primary focus.

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

ELCT201: DIGITAL LOGIC DESIGN

Department of Electrical & Electronics EE-333 DIGITAL SYSTEMS

Transcription:

Chapter 2 Boolean Algebra and Logic Gates

Basic Definitions A binary operator defined on a set S of elements is a rule that assigns, to each pair of elements from S, a unique element from S. The most common postulates used to formulate various algebraic structures are as follows: 1. Closure. A set S is closed with respect to a binary operator if, for every pair of elements of S, the binary operator specifies a rule for obtaining a unique element of S. 2. Associative law. A binary operator * on a set S is said to be associative whenever (x * y) * z = x * (y * z) for all x, y, z, S Boolean Algebra and Logic Gates 2-2

3. Commutative law. A binary operator * on a set S is said to be commutative whenever x * y = y * x for all x, y S 4. Identity element. A set S is said to have an identity element with respect to a binary operation * on S if there exists an element e S with the property that e * x = x * e = x for every x S Example: The element 0 is an identity element with respect to the binary operator + on the set of integers I = {c, -3, -2, -1, 0, 1, 2, 3,c}, since x + 0 = 0 + x = x for any x I The set of natural numbers, N, has no identity element, since 0 is excluded from the set. Boolean Algebra and Logic Gates 2-3

5. Inverse. A set S having the identity element e with respect to a binary operator * is said to have an inverse whenever, for every x S, there exists an element y S such that x * y = e Example: In the set of integers, I, and the operator +, with e = 0, the inverse of an element a is (-a), since a + (-a) = 0. 6. Distributive law. If * and are two binary operators on a set S, * is said to be distributive over whenever x * (y z) = (x * y) (x * z) A field is an example of an algebraic structure. Boolean Algebra and Logic Gates 2-4

The field of real numbers is the basis for arithmetic and ordinary algebra. The binary operator + defines addition. The additive identity is 0. The additive inverse defines subtraction. The binary operator defines multiplication. The multiplicative identity is 1. For a 0, the multiplicative inverse of a = 1/a defines division (i.e., a 1/a = 1). The only distributive law applicable is that of over +: a (b + c) = (a b) + (a c) Boolean Algebra and Logic Gates 2-5

Axiomatic Definition of Boolean Algebra In 1854, George Boole developed an algebraic system now called Boolean algebra. two binary operators, + and, (Huntington) postulates: 1. (a) The structure is closed with respect to the operator +. (b) The structure is closed with respect to the operator. 2. (a) The element 0 is an identity element with respect to +; that is, x + 0 = 0 + x = x. (b) The element 1 is an identity element with respect to ; that is, x 1 = 1 x = x. Boolean Algebra and Logic Gates 2-6

3. (a) The structure is commutative with respect to +; that is, x + y = y + x. (b) The structure is commutative with respect to ; that is, x y = y x. 4. (a) The operator is distributive over +; that is, x (y + z) = (x y) + (x z). (b) The operator + is distributive over ; that is, x + (y z) = (x + y) (x + z). 5. For every element x B, there exists an element x B (called the complement of x) such that (a) x + x = 1 and (b) x x = 0. 6. There exist at least two elements x, y B such that x y. Boolean Algebra and Logic Gates 2-7

Comparing Boolean algebra with arithmetic and ordinary algebra 1. Huntington postulates do not include the associative law. However, this law holds for Boolean algebra and can be derived (for both operators) from the other postulates. 2. The distributive law of + over (i.e., x + (y z) = (x + y) (x + z) ) is valid for Boolean algebra, but not for ordinary algebra. 3. Boolean algebra does not have additive or multiplicative inverses; therefore, there are no subtraction or division operations. Boolean Algebra and Logic Gates 2-8

4. Postulate 5 defines an operator called the complement that is not available in ordinary algebra. 5. Ordinary algebra deals with the real numbers, which constitute an infinite set of elements. Boolean algebra deals with the as yet undefined set of elements, B, but in the two valued Boolean algebra defined next (and of interest in our subsequent use of that algebra), B is defined as a set with only two elements, 0 and 1. Boolean Algebra and Logic Gates 2-9

Two-valued Boolean Algebra B = {0,1} The rules of operations x y x y x y x+y x x 0 0 0 0 0 0 0 1 0 1 0 0 1 1 1 0 1 0 0 1 0 1 1 1 1 1 1 1 Closure The identity elements (1) +: 0 (2) : 1 Boolean Algebra and Logic Gates 2-10

The commutative laws The distributive laws Boolean Algebra and Logic Gates 2-11

Complement x+x'=1: 0+0'=0+1=1; 1+1'=1+0=1 x x'=0: 0 0'=0 1=0; 1 1'=1 0=0 Has two distinct elements 1 and 0, with 0 1 Note a set of two elements + : OR operation; : AND operation a complement operator: NOT operation Binary logic is a two-valued Boolean algebra Boolean Algebra and Logic Gates 2-12

Basic Theorems and Properties of Boolean Algebra Duality the binary operators are interchanged; AND OR the identity elements are interchanged; 1 0 Boolean Algebra and Logic Gates 2-13

Theorem 1(a): x+x = x x+x = (x+x) 1 by postulate: 2(b) = (x+x) (x+x') 5(a) = x+xx' 4(b) = x+0 5(b) = x 2(a) Theorem 1(b): x x = x x x = x x + 0 = xx + xx' = x (x + x') = x 1 = x Boolean Algebra and Logic Gates 2-14

Theorem 2 x + 1 = 1 (x + 1) = (x + x')(x + 1) = x + x' 1 = x + x' = 1 x 0 = 0 by duality Theorem 3: (x')' = x Postulate 5 defines the complement of x, x + x' = 1 and x x' = 0 The complement of x' is x is also (x')' Boolean Algebra and Logic Gates 2-15

Theorem 6 x + xy = x 1 + xy = x (1 +y) = x 1 = x x (x + y) = x by duality By means of truth table x y xy x + xy 0 0 0 0 0 1 0 0 1 0 0 1 1 1 1 1 Boolean Algebra and Logic Gates 2-16

DeMorgan's Theorems (x+y)' = x' y' (x y)' = x' + y' x y x+y (x+y) x y x y 0 0 0 1 1 1 1 0 1 1 0 1 0 0 1 0 1 0 0 1 0 1 1 1 0 0 0 0 Boolean Algebra and Logic Gates 2-17

Operator Precedence parentheses NOT AND OR examples x y' + z (x y + z)' Boolean Algebra and Logic Gates 2-18

Boolean Functions A Boolean function binary variables binary operators OR and AND unary operator NOT parentheses Examples F 1 = x + y z F 2 = x' y' z + x' y z + x y Boolean Algebra and Logic Gates 2-19

The truth table for F 1 and F 2 Boolean Algebra and Logic Gates 2-20

Implementation with logic gates Boolean Algebra and Logic Gates 2-21

Boolean Algebra and Logic Gates 2-22

Algebraic Manipulation To minimize Boolean expressions literal: a primed or unprimed variable (an input to a gate) term: an implementation with a gate The minimization of the number of literals and the number of terms => a circuit with less equipment Boolean Algebra and Logic Gates 2-23

Boolean Algebra and Logic Gates 2-24

Complement of a Function an interchange of 0's for 1's and 1's for 0's in the value of F by DeMorgan's theorem (A+B+C)' = (A+X)' let B+C = X = A'X' by DeMorgan's = A'(B+C)' = A'(B'C') by DeMorgan's = A'B'C' associative generalizations (A+B+C+... +F)' = A'B'C'... F' (ABC... F)' = A'+ B'+C'+... +F' Boolean Algebra and Logic Gates 2-25

Boolean Algebra and Logic Gates 2-26

Boolean Algebra and Logic Gates 2-27

Canonical and Standard Forms Minterms and Maxterms A minterm: an AND term consists of all literals in their normal form or in their complement form For example, two binary variables x and y, xy, xy', x'y, x'y' It is also called a standard product n variables con be combined to form 2 n minterms A maxterm: an OR term It is also call a standard sum 2 n maxterms Boolean Algebra and Logic Gates 2-28

each maxterm is the complement of its corresponding minterm, and vice versa Boolean Algebra and Logic Gates 2-29

An Boolean function can be expressed by a truth table sum of minterms f 1 = x'y'z + xy'z' + xyz = m 1 + m 4 +m 7 f 2 = x'yz+ xy'z + xyz'+xyz = m 3 + m 5 +m 6 + m 7 Boolean Algebra and Logic Gates 2-30

The complement of a Boolean function the minterms that produce a 0 f 1 ' = m 0 + m 2 +m 3 + m 5 + m 6 = x'y'z'+x'yz'+x'yz+xy'z+xyz' f 1 = (f 1 ')' = (x+y+z)(x+y'+z) (x+y'+z') (x'+y+z')(x'+y'+z) = M 0 M 2 M 3 M 5 M 6 f 2 = (x+y+z)(x+y+z)(x+y+z)(x+y+z) = M 0 M 1 M 2 M 4 Any Boolean function can be expressed as a sum of minterms a product of maxterms canonical form Boolean Algebra and Logic Gates 2-31

EXAMPLE 2.4 Express the Boolean function F=A+B C as a sum of minterms F = A+B'C = A (B+B') + B'C = AB +AB' + B'C = AB(C+C') + AB'(C+C') + (A+A')B'C =ABC+ABC'+AB'C+AB'C'+A'B'C F = A'B'C +AB'C' +AB'C+ABC'+ ABC = m 1 + m 4 +m 5 + m 6 + m 7 F(A,B,C) = (1, 4, 5, 6, 7) or, built the truth table first Boolean Algebra and Logic Gates 2-32

Product of maxterms Each of the 2 2n functions of n binary variables can be also expressed as a product of maxterms. EXAMPLE 2.5 Express the Boolean function F = xy + x z as a product of maxterms F = xy + x'z = (xy + x') (xy +z) = (x+x')(y+x')(x+z)(y+z) = (x'+y)(x+z)(y+z) x'+y = x' + y + zz' = (x'+y+z)(x'+y+z') F = (x+y+z)(x+y'+z)(x'+y+z)(x'+y+z') = M 0 M 2 M 4 M 5 F(x,y,z) = (0,2,4,5) Boolean Algebra and Logic Gates 2-33

Conversion between Canonical Forms F(A,B,C) = (1,4,5,6,7) F (A,B,C) = (0,2,3) = m 0 +m 1 +m 2 By DeMorgan's theorem F = (m 0 + m 2 + m 3 ) = m 0 m 2 m 3 = M 0 M 2 M 3 = Π(0, 2, 3) m j ' = M j sum of minterms = product of maxterms interchange the symbols and and list those numbers missing from the original form of 1's of 0's Boolean Algebra and Logic Gates 2-34

Example F = xy + x z F(x, y, z) = (1, 3, 6, 7) F(x, y, z) = (0, 2, 4, 6) Boolean Algebra and Logic Gates 2-35

Standard Forms Canonical forms are seldom used sum of products F 1 = y' + zy+ x'yz' product of sums F 2 = x(y'+z)(x'+y+z'+w) F 3 = AB + C(D + E) = AB + C(D + E) = AB + CD + CE Boolean Algebra and Logic Gates 2-36

Boolean Algebra and Logic Gates 2-37

Boolean Algebra and Logic Gates 2-38

Other Logic Operations 2 n rows in the truth table of n binary variables 2 2n functions for n binary variables 16 functions of two binary variables All the new symbols except for the exclusive-or symbol are not in common use by digital designers Boolean Algebra and Logic Gates 2-39

Boolean Algebra and Logic Gates 2-40

Digital Logic Gates Boolean expression: AND, OR and NOT operations Constructing gates of other logic operations the feasibility and economy the possibility of extending gate's inputs the basic properties of the binary operations the ability of the gate to implement Boolean functions Boolean Algebra and Logic Gates 2-41

Consider the 16 functions two are equal to a constant four are repeated twice inhibition and implication are not commutative or associative the other eight: complement, transfer, AND, OR, NAND, NOR, XOR, and equivalence are used as standard gates complement: inverter transfer: buffer (increasing drive strength) equivalence: XNOR Boolean Algebra and Logic Gates 2-42

FIGURE 2.5 Digital logic gates Boolean Algebra and Logic Gates 2-43

FIGURE 2.5 Digital logic gates Boolean Algebra and Logic Gates 2-44

Extension to multiple inputs A gate can be extended to multiple inputs if its binary operation is commutative and associative AND and OR are commutative and associative (x+y)+z = x+(y+z) = x+y+z (x y)z = x(y z) = x y z Boolean Algebra and Logic Gates 2-45

NAND and NOR are commutative but not associative => they are not extendable Boolean Algebra and Logic Gates 2-46

Multiple NOR = a complement of OR gate Multiple NAND = a complement of AND The cascaded NAND operations = sum of products The cascaded NOR operations = product of sums Boolean Algebra and Logic Gates 2-47

The XOR and XNOR gates are commutative and associative Multiple-input XOR gates are uncommon? XOR is an odd function: it is equal to 1 if the inputs variables have an odd number of 1's Boolean Algebra and Logic Gates 2-48

Positive and Negative Logic two signal values <=> two logic values positive logic: H=1; L=0 negative logic: H=0; L=1 Consider a TTL gate a positive logic NAND gate a negative logic OR gate the positive logic is used in this book Boolean Algebra and Logic Gates 2-49

Boolean Algebra and Logic Gates 2-50