Boolean Algebra. Boolean Variables, Functions. NOT operation. AND operation. AND operation (cont). OR operation

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

Goals for Lecture. Binary Logic and Gates (MK 2.1) Binary Variables. Notation Examples. Logical Operations

Theorem/Law/Axioms Over (.) Over (+)

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA (CONT.)

Lecture 3. Title goes here 1. level Networks. Boolean Algebra and Multi-level. level. level. level. level

12/31/2010. Overview. 05-Boolean Algebra Part 3 Text: Unit 3, 7. DeMorgan s Law. Example. Example. DeMorgan s Law

Combinational Logic (mostly review!)

Chapter 2 Combinational Logic Circuits

Chapter 2: Switching Algebra and Logic Circuits

CHAPTER 2 BOOLEAN ALGEBRA

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA

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

Chapter 2 Boolean Algebra and Logic Gates

Logic Gates and Boolean Algebra

Circuits & Boolean algebra.

Chapter 2 Boolean Algebra and Logic Gates

Unit 2 Boolean Algebra

CHAPTER 3 BOOLEAN ALGEBRA

Logic Design. Chapter 2: Introduction to Logic Circuits

Chapter 2 Combinational Logic Circuits

UNIT 3 BOOLEAN ALGEBRA (CONT D)

MC9211 Computer Organization

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

Signals and Systems Digital Logic System

Chapter 2: Princess Sumaya Univ. Computer Engineering Dept.

Lecture 1. Notes. Notes. Notes. Introduction. Introduction digital logic February Bern University of Applied Sciences

CHAPTER1: Digital Logic Circuits Combination Circuits

Prove that if not fat and not triangle necessarily means not green then green must be fat or triangle (or both).

Digital Circuit And Logic Design I. Lecture 3

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

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

Unit 2 Boolean Algebra

ECE/Comp Sci 352 Digital System Fundamentals Quiz # 1 Solutions

Chapter 3. Boolean Algebra. (continued)

Logic Gate Level. Part 2

CS61c: Representations of Combinational Logic Circuits

Binary Logic and Gates

Lecture 2. Notes. Notes. Notes. Boolean algebra and optimizing logic functions. BTF Electronics Fundamentals August 2014

CHAPTER 3 LOGIC GATES & BOOLEAN ALGEBRA

EEE130 Digital Electronics I Lecture #4

Part 5: Digital Circuits

Boolean Algebra & Logic Gates. By : Ali Mustafa

Algebraic Methods for the Analysis and Synthesis

Number System conversions

Boole Algebra and Logic Series

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

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

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

Multiply Out Using DeMorgan and K-Maps

Chapter 2 Boolean Algebra and Logic Gates

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

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

UC Berkeley College of Engineering, EECS Department CS61C: Representations of Combinational Logic Circuits

CHAPTER 12 Boolean Algebra

ELCT201: DIGITAL LOGIC DESIGN

CS 226: Digital Logic Design

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

ECE 238L Boolean Algebra - Part I

CHAPTER III BOOLEAN ALGEBRA

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

Lecture 21: Boolean Logic. To Wrap up AVR

Contents. Chapter 2 Digital Circuits Page 1 of 30

Chapter 2 Combinational Logic Circuits

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

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

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

Why digital? Overview. Number Systems. Binary to Decimal conversion

Digital Logic Design. Combinational Logic

EC-121 Digital Logic Design

Discrete Mathematics. CS204: Spring, Jong C. Park Computer Science Department KAIST

ENG2410 Digital Design Combinational Logic Circuits

BOOLEAN ALGEBRA TRUTH TABLE

UNIVERSITI TENAGA NASIONAL. College of Information Technology

EE 209 Spiral 1 Exam Solutions Name:

COMP2611: Computer Organization. Introduction to Digital Logic

211: Computer Architecture Summer 2016

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

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

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

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA

CHAPTER III BOOLEAN ALGEBRA

Possible logic functions of two variables

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

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

Chapter 2 : Boolean Algebra and Logic Gates

Week-I. Combinational Logic & Circuits

L2: Combinational Logic Design (Construction and Boolean Algebra)

L2: Combinational Logic Design (Construction and Boolean Algebra)

Lecture 2 Review on Digital Logic (Part 1)

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

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

New Students Day Activity

School of Computer Science and Electrical Engineering 28/05/01. Digital Circuits. Lecture 14. ENG1030 Electrical Physics and Electronics

Lecture 9: Digital Electronics

UNIT 5 KARNAUGH MAPS Spring 2011

Electronics. Overview. Introducction to Synthetic Biology

Chapter 1: Logic systems

Chapter 2 Combinational

Chap 2. Combinational Logic Circuits

CprE 281: Digital Logic

Transcription:

oolean lgebra asic mathematics for the study of logic design is oolean lgebra asic laws of oolean lgebra will be implemented as switching devices called logic gates. Networks of Logic gates allow us to manipulate digital signals an perform numerical operations on digital signals such as addition, multiplication an perform translations from one binary code to another. R 8/99 1 oolean Variables, Functions boolean variable can take on two values Will use the values 0 and 1 ould just as easily use T, F or H,L or ON,OFF oolean operations transform oolean Variables. asic operations are NOT, N, OR We can make more complicated oolean Functions from the basic boolean operations R 8/99 2 Truth Table Y 0 1 1 0 NOT operation The NOT operation (or inverse, or complement operation) replaces a boolean value with its complement: 0 = 1, 1 = 0 is read as NOT or omplement F() = Inverter symbol boolean representation R 8/99 3 N operation The N operation is a function of two variables (, ) F(,) = boolean function representation When both and are 1, then F is 1. 0 0 = 0, 0 1 = 0, 1 0 = 0, 1 1 = 1 Truth Table Y 0 0 0 0 1 0 1 0 0 1 1 1 N F R 8/99 4 N operation (cont). Will usually drop the in the equation and just write the equation as: F(,) = boolean function representation an also view N operation as two switches in series: Switch Open (0) Switch losed (1) When Switch closed (1) and Switch closed (1), circuit is closed (1) R 8/99 5 OR operation The OR operation is a function of two variables (, ) F(,) = + boolean function representation When either or are 1, then F is 1. 0 + 0 = 0, 0 + 1 = 1, 1 + 0 = 1, 1 + 1 = 1 Truth Table Y 0 0 0 0 1 1 1 0 1 1 1 1 OR R 8/99 6

OR operation (cont). an view OR operation as two switches in parallel: Neither switch or switch is closed, so circuit is open (0) Switch closed (1), so circuit is closed (1) oolean Functions More complex boolean functions can be created by combining basic operations F(,) = + OR Switch closed (1), so circuit is closed (1) Switch or Switch is closed, circuit is closed (1) R 8/99 7 F = + 0 0 1 1 0 1 1 1 1 0 0 0 1 1 0 1 R 8/99 8 asic Theorems uality X + 0 = X X + 1 = 1 X + X = X (X ) = X uals X * 1 = X X * 0 = 0 X * X = X (X ) = X X + X = 1 X * X = 0 dual of a boolean expression is formed by replacing Ns with ORs, ORs with Ns, 1 s with 0 s, and 0 s with 1 s. Variables and their complements are left alone. If two boolean expressions are equal, then their duals are equal! Helpful in remembering boolean laws. Only need to remember one set, can generate the 2nd set by taking the dual! R 8/99 9 R 8/99 10 Proving a Theorem How do we prove X + 0 = X is correct? One way is to replace all boolean variables with values of 0, 1 and use basic operations: For X = 0, 0 + 0 = 0 For X = 1, 1 + 0 = 1 0 = 0 1 = 1 So, X + 0 = X is valid. Prove X + X = 1 For X = 0, 0 + (0) = 1 For X = 1, 1 + (1) = 1 0 + 1 = 1 1 + 0 = 1 1 = 1 1 = 1 So, X + X = 1 is valid. R 8/99 11 ommutative, ssociative Laws ommutative X + Y = Y + X ssociative (X + Y) + Z = X + (Y + Z) ual Laws X * Y = Y * X ssociative (XY) Z = X(YZ) If + is viewed as addition, and * as multiplication, then the ommutative, ssociative laws in normal algebra are the same as in boolean algebra. R 8/99 12

Three Input N Function F = = () = () F = 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 1 0 0 1 0 0 0 0 1 0 1 0 0 1 1 0 1 0 1 1 1 1 1 ( + ) = + istributive Law (valid in normal algebra) ual: + = ( + ) ( + ) (only valid in oolean algebra!) Note that the 2nd form is NOT valid in normal algebra! This tends to make one forget about it. Remember the first form, then take the UL of it to get the second form. R 8/99 13 R 8/99 14 Prove + = ( + ) ( + ) Use Truth Table method for both sides + + + (+)(+) 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 1 0 0 0 1 1 1 1 1 1 1 1 0 0 0 1 1 1 1 1 0 1 0 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 Other Simplification Theorems uals XY + XY = X (X +Y)(X+Y ) = X X + XY = X X(X + Y) = X (X + Y )Y = XY XY + Y = X + Y Prove XY + XY = X via algebraic manipulation XY + XY = X (Y + Y ) = X (1) = X!!!!! Results are same R 8/99 15 R 8/99 16 Simplification Simplification tries to reduce the number of terms in a boolean equation via use of basic theorems simpler equation will mean: less gates will be needed to implement the equation could possibly mean a faster gate-level implementation Will use algebraic techniques at first for simplification Later, will use a graphical method called K-maps omputer methods for simplification are widely used in industry. Sum Of Products (SOP) Form boolean expression is in Sum Of Products form when all products are the products of single variables only. F = + E + E (SOP Form) G = + EFG + H (SOP Form) Y = + + + (SOP Form) Z = (+) + EF Not SOP Form = + + EF SOP Form R 8/99 17 R 8/99 18

Use istributive Law for Multiplying Problem: Put into SOP form the following equation and simplify: ( + ) ( + + E) Try just straightforward multiplication of terms: + + E + + + E Simplify ( = ): + + E + + + E Look for simplification via factoring: (1 + + E + ) + + E (1) + + E + + E!!!!!!!!! (Final SOP form) R 8/99 19 Use 2nd istributive Law Recall 2nd istributive Law: (X + Y)(X + Z) = X + YZ Lets try and use this law, may make things easier: ( + ) ( + + E) ( + ()) ( + ( + E) ) pply 2nd istributive Law: + ( + E) Multiply Out: + + E (Final SOP form) Finished!! R 8/99 20 E + + E as logic gates N-OR form SOP can be implemented in two levels of logic assuming that both a variable () and its complement ( ) are available (ual Rail Inputs). SOP is a TWO-LEVEL form (N-OR) R 8/99 21 Product of Sums (POS) Form boolean expression is in Product Of Sums form when all sums are the sums of single variables. F = ( + )( + + E)( + + E ) G = ( + E)( + ) (POS Form) Y = + Not POS Form = ( + ) POS Form (POS Form) R 8/99 22 Factoring Use factoring to get to Product of Sums form. Use basic theorem: X + YZ = (X + Y) (X + Z) (just reverse of distributive law) Problem: Put + into POS Form: + = ( + ) ( + ) = ( + ) ( + ) ( + ) ( + ) ( + ) ( + ) is final POS form!!!! R 8/99 23 (+ )(+)(+) as Logic Gates OR-N form POS can be implemented in two levels of logic assuming that both a variable () and its complement ( ) are available (ual Rail Inputs). POS is a TWO-LEVEL form (OR-N form) R 8/99 24

onsensus Theorem onsensus theorem states: XY + X Z + YZ = XY + X Z The YZ term is called the consensus term and is redundant. The consensus term is formed from a PIR OF TERMS in which a variable (X) and its complement (X ) are present; the consensus term is formed by multiplying the two terms and leaving out the selected variable and its complement. Prove the onsensus Theorem onsensus Theorem Proof: XY + X Z + YZ = XY + X Z + (X + X )YZ = XY + X Z + XYZ + X YZ = (XY + XYZ) + (X Z + X YZ) = XY (1 + Z) + X Z (1 + Y) = XY + X Z You could also use a truth table to prove this. The consensus of XY, X Z is YZ. R 8/99 25 R 8/99 26 ual of the onsensus Theorem (X+Y) (X + Z) (Y + Z) = (X + Y) (X + Z) Short uts for Multiplying short cut theorem for istribution (Multiplication) (X + Y) (X + Z) = XZ + X Y The consensus of (X+Y)(X +Z) is (Y + Z). How do you use the consensus theorem? Simply be suspicious anytime you have two terms that have a variable and its complement. Form the consensus term and see if it is present; if consensus term is present, just get rid of it. R 8/99 27 Only works when you have a variable (X) and its complement (X ). To PROVE this, lets do the distribution the long way. (X + Y)(X + Z) = X X + XZ + X Y + YZ 0 Redundant by consensus theorem = 0 + XZ + X Y = XZ + X Y R 8/99 28 emorgan s Laws emorgan s Laws provide an easy way to find the inverse of a boolean expression: (X + Y) = X Y (XY) = X + Y n easy way to remember this is that each TERM is complemented, and that ORs become Ns; Ns become ORs. Easy to prove this via a truth table, see textbook. pplying emorgan s Law pply emorgan s Law to a more complex expression: ( + ) = () ( ) = ( + )( + ) Note that emorgan s law was applied twice. nother example: [( + ) ] = ( + ) + ( ) = ( ) () + = + R 8/99 29 R 8/99 30

NN, NOR Gates Why do we care about emorgan s Law? There are two other gate types that produce the complement of a boolean function! Y 0 0 1 0 1 1 1 0 1 1 1 0 () NN Y 0 0 1 0 1 0 1 0 0 1 1 0 NOR (+) R 8/99 31 NN, NOR (cont.) NN (NOT N) - can be thought of as an N gate followed by an inverter. () NN () NOR (NOT OR) - can be thought as an OR gate followed by an inverter. (+) NOR + (+) R 8/99 32 ctually. In the real world, an N gate is made from an NN gate followed by an inverter!!! n OR gate is made from a NOR gate followed by an inverter!!! What is this logic function in SOP form? () F = (( ) () ) () NN N () Hmmmmmmmm. Lets use emorgan s Law (+) NOR + + OR F = (() () ) = (() ) + (() ) = +!!!! n interesting result... SOP Form!! R 8/99 33 R 8/99 34 NN-NN form = N-OR form What is this logic function in POS form? () F = (( ) () ) (+) F= ((+) + (+) ) () () Same logic function F = + (+) Hmmmmmmmm. Lets use emorgan s Law F = ((+) + (+) ) = ((+) ) ((+) ) = (+) (+)!!!!! () R 8/99 35 n interesting result... POS Form!!! R 8/99 36

NOR-NOR form = OR-N form (+) F= ((+) + (+) ) (+) Same logic function (+) F= (+)(+) Two Level Form Summary ny logic function in SOP form (Sum of Products) can be implemented in the two level gate forms of N-OR, NN-NN. ny logic function in POS form (Product of Sums) can be implemented in the two level gate forms of OR-N, NOR- NOR. (+) There are actually FOUR more two level gate forms but we will not talk about these. R 8/99 37 R 8/99 38 XOR Function One last gate type is the XOR Gate (Exclusive OR gate). XOR Y 0 0 0 0 1 1 1 0 1 1 1 0 F = XOR gate is usual in logic circuits that do binary addition/subtraction. Note that: F = = + R 8/99 39 What do you need to know? asic oolean Theorems Proving boolean theorems (algebraically, truth table) uality oolean equation to gate network and vice-versa lgebraic Simplification onsensus Theorem, e Morgans Laws SOP form, POS form Two level forms N-OR, NN-NN, OR- N, NOR-NOR XOR Gate R 8/99 40