IKI10201 03a-Boolean Algebra Bobby Nazief Semester-I 2005 - 2006 The materials on these slides are adopted from those in CS231’s Lecture Notes at UIUC,

Slides:



Advertisements
Similar presentations
Boolean Algebra and Logic Gates
Advertisements

Logical Systems Synthesis.
Chapter 2 Logic Circuits.
Logic Gate Level Part 2. Constructing Boolean expression from truth table First method: write nonparenthesized OR of ANDs Each AND is a 1 in the result.
Computer Logic and Digital Design Chapter 2 Henry Hexmoor AND logic
Chapter 2 – Combinational Logic Circuits Part 1 – Gate Circuits and Boolean Equations Logic and Computer Design Fundamentals.
CS 151 Digital Systems Design Lecture 6 More Boolean Algebra A B.
1 COMP541 Combinational Logic Montek Singh Jan 16, 2007.
EECC341 - Shaaban #1 Lec # 5 Winter Switching Algebra: Principle of Duality Any theorem or identity in switching algebra remains true if.
Standart Forms of Expression
Boolean Algebra and Logic Gates
1 COMP541 Combinational Logic - II Montek Singh Aug 27, 2014.
Chapter 2: Combinatorial Logic Circuits Illustration Pg. 32 Logic Circuit Diagrams - Circuit Optimization -2,3,4 level maps 48 elements Optimized to 25.
IKI a-Simplification of Boolean Functions Bobby Nazief Semester-I The materials on these slides are adopted from those in CS231’s Lecture.
Chapter 2: Boolean Algebra and Logic Functions
CS231 Fundamentals1 Fundamentals What kind of data do computers work with? – Deep down inside, it’s all 1s and 0s What can you do with 1s and 0s? – Boolean.
Computer Organization By Dr. M. Khamis Mrs. Dua’a Al Sinari.
1 Why study Boolean Algebra? 4 It is highly desirable to find the simplest circuit implementation (logic) with the smallest number of gates or wires. We.
1 Logic Gates Digital Computer Logic Kashif Bashir WWW:
Switching functions The postulates and sets of Boolean logic are presented in generic terms without the elements of K being specified In EE we need to.
Combinational Logic 1.
CS231 Boolean Algebra1 K-map Summary K-maps are an alternative to algebra for simplifying expressions. – The result is a minimal sum of products, which.
Chapter 2 Two- Level Combinational Logic. Chapter Overview Logic Functions and Switches Not, AND, OR, NAND, NOR, XOR, XNOR Gate Logic Laws and Theorems.
February 2, 2004CS 2311 Karnaugh maps Last time we saw applications of Boolean logic to circuit design. – The basic Boolean operations are AND, OR and.
1 Boolean Algebra  Digital circuits Digital circuits  Boolean Algebra Boolean Algebra  Two-Valued Boolean Algebra Two-Valued Boolean Algebra  Boolean.
June 11, 2002© Howard Huang1 Boolean algebra Last time we talked about Boolean functions, Boolean expressions, and truth tables. Today we’ll learn.
Discrete Mathematics CS 2610 September Equal Boolean Functions Two Boolean functions F and G of degree n are equal iff for all (x 1,..x n )  B.
June 10, 2002© Howard Huang1 Number systems To get started, we’ll discuss one of the fundamental concepts underlying digital computer design:
ENGIN112 L6: More Boolean Algebra September 15, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 6 More Boolean Algebra A B.
CS231 Boolean Algebra1 Summary so far So far: – A bunch of Boolean algebra trickery for simplifying expressions and circuits – The algebra guarantees us.
A. Abhari CPS2131 Chapter 2: Boolean Algebra and Logic Gates Topics in this Chapter: Boolean Algebra Boolean Functions Boolean Function Simplification.
1 Lect # 2 Boolean Algebra and Logic Gates Boolean algebra defines rules for manipulating symbolic binary logic expressions. –a symbolic binary logic expression.
© BYU 03 BA1 Page 1 ECEn 224 Boolean Algebra – Part 1.
Module 5.  In Module 3, you have learned the concept of Boolean Algebra which consists of binary variables and binary operator.  A binary variable x,
Boolean Functions and Boolean Algebra Laxmikant Kale.
Lecture 18: Boolean Algebra Boolean Functions. w = Chris is allowed to watch television x = Chris's homework is finished y = it is a school night z =
CS231 Boolean Algebra1 The dual idea: products of sums Just to keep you on your toes... A product of sums (POS) expression contains: – Only AND (product)
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 4 Dr. Shi Dept. of Electrical and Computer Engineering.
CEC 220 Digital Circuit Design SOP and POS forms Friday, January 23 CEC 220 Digital Circuit Design Slide 1 of 17.
ECE DIGITAL LOGIC LECTURE 8: BOOLEAN FUNCTIONS Assistant Prof. Fareena Saqib Florida Institute of Technology Spring 2016, 02/11/2016.
CEC 220 Digital Circuit Design SOP and POS forms Friday, Sept 11 CEC 220 Digital Circuit Design Slide 1 of 17.
CSE 461. Binary Logic Binary logic consists of binary variables and logical operations. Variables are designated by letters such as A, B, C, x, y, z etc.
CS231 Boolean Algebra1 Circuit analysis summary After finding the circuit inputs and outputs, you can come up with either an expression or a truth table.
Mu.com.lec 9. Overview Gates, latches, memories and other logic components are used to design computer systems and their subsystems Good understanding.
CHAPTER 2 Boolean algebra and Logic gates
CS231: Computer Architecture I Laxmikant Kale Fall 2002.
CS2100 Computer Organisation
Chapter 2: Boolean Algebra and Logic Functions
ECE 2110: Introduction to Digital Systems
ECE 20B, Winter 2003 Introduction to Electrical Engineering, II LECTURE NOTES #2 Instructor: Andrew B. Kahng (lecture)
CS 105 Digital Logic Design
Complement of a Function
CHAPTER 2 Boolean Algebra This chapter in the book includes:
Princess Sumaya University
Boolean Algebra – Part 1 ECEn 224.
Circuit analysis summary
Boolean algebra Last time we talked about Boolean functions, Boolean expressions, and truth tables. Today we’ll learn how to how use Boolean algebra to.
Speaker: Fuw-Yi Yang 楊伏夷 伏夷非征番, 道德經 察政章(Chapter 58) 伏者潛藏也
Boolean Algebra.
Boolean Algebra.
Discrete Mathematics CS 2610
Boolean Algebra.
Lecture 14: Boolean Algebra
Chapter 2 Boolean Algebra and Logic Gate
CSE 370 – Winter Combinational Logic - 1
Functions Computers take inputs and produce outputs, just like functions in math! Mathematical functions can be expressed in two ways: We can represent.
MINTERMS and MAXTERMS Week 3
From now on: Combinatorial Circuits:
Digital Logic Chapter-2
Presentation transcript:

IKI a-Boolean Algebra Bobby Nazief Semester-I The materials on these slides are adopted from those in CS231’s Lecture Notes at UIUC, which is derived from Howard Huang’s work and developed by Jeff Carlyle.

2 Road Map Boolean Algebra Logic Gates & Flip-flops Register-Transfer Design Finite-State Machines Binary Systems & Data Represent. Generalized FSM Sequential Design Techniques Logic Design Techniques Combinatorial Components Storage Components Processor Components

3 Boolean Algebra

4 Boolean values Earlier, we used electrical voltages to represent two discrete values 1 and 0, from which binary numbers can be formed. It’s also possible to think of voltages as representing two logical values, true and false. For simplicity, we often still write digits instead: – 1 (high) is true – 0 (low) is false We will use these values 1 and 0 as the elements of our Boolean System.

5 Basic boolean operations There are two basic operations for logical values. AND (product) of two inputs OR (sum) of two inputs xy, or x  yx + y Operation: Expression: Truth table:

6 Axiomatic definition of Boolean Algebra A Boolean algebra requires – A set of elements B, consisting of two elements (0 and 1) – Two binary operations OR and AND – The axioms below must always be true – Based on axiom #5, we can develop a unary (one-argument) operation NOT

7 Basic theorems of Boolean Algebra In addition to the axioms, additional laws can be derived; they are called theorems of Boolean Algebra These theorems are useful in performing algebraic manipulations of Boolean expressions

8 Proofing the theorems using axioms Idempotency: x + x = x Proof: x + x = (x + x)  1by identity = (x + x)  (x + x’)by complement = x + x  x’by distributivity = x + 0by complement = xby identity Idempotency: x  x = x Proof: x  x = (x  x) + 0by identity = (x  x) + (x  x’)by complement = x  (x + x’)by distributivity = x  1by complement = xby identity

9 Duality principle The left and right columns of axioms are duals – exchange all ANDs with ORs, and 0s with 1s So are the theorems:

10 Boolean Functions Computers take inputs and produce outputs, just like functions in math! Mathematical functions can be expressed in two ways: We can represent logical functions in two analogous ways too: – A finite, but non-unique Boolean expression. – A truth table, which will turn out to be unique and finite. f(x,y)= 2x + y = x + x + y = 2(x + y/2) =... An expression is finite but not unique A function table is unique but infinite

11 Boolean expressions We can use these basic operations to form more complex expressions: f(x,y,z) = (x + y’)z + x’ Some terminology and notation: – f is the name of the function. – (x,y,z) are the input variables, each representing 1 or 0. Listing the inputs is optional, but sometimes helpful. – A literal is any occurrence of an input variable or its complement. The function above has four literals: x, y’, z, and x’. Precedence is important, but not too difficult. – NOT has the highest precedence, followed by AND, and then OR. – Fully parenthesized, the function above would be kind of messy: f(x,y,z) = (((x +(y’))z) + x’)

12 Truth tables A truth table shows all possible inputs and outputs of a function. Remember that each input variable represents either 1 or 0. – Because there are only a finite number of values (1 and 0), truth tables themselves are finite. – A function with n variables has 2 n possible combinations of inputs. Inputs are listed in binary order—in this example, from 000 to 111. f(0,0,0)= (0 + 1)0 + 1= 1 f(0,0,1)= (0 + 1)1 + 1= 1 f(0,1,0)= (0 + 0)0 + 1= 1 f(0,1,1)= (0 + 0)1 + 1= 1 f(1,0,0)= (1 + 1)0 + 0= 0 f(1,0,1)= (1 + 1)1 + 0= 1 f(1,1,0)= (1 + 0)0 + 0= 0 f(1,1,1)= (1 + 0)1 + 0= 1 f(x,y,z) = (x + y’)z + x’

13 Complement of a function The complement of a function always outputs 0 where the original function outputted 1, and 1 where the original produced 0. In a truth table, we can just exchange 0s and 1s in the output column(s) f(x,y,z)= x(y’z’ + yz)

14 Complementing a function algebraically You can use DeMorgan’s law to keep “pushing” the complements inwards You can also take the dual of the function, and then complement each literal – If f(x,y,z) = x(y’z’ + yz)… – …the dual of f is x + (y’ + z’)(y + z)… – …then complementing each literal gives x’ + (y + z)(y’ + z’)… – …so f’(x,y,z) = x’ + (y + z)(y’ + z’) f(x,y,z)= x(y’z’ + yz) f’(x,y,z)= ( x(y’z’ + yz) )’[ complement both sides ] = x’ + (y’z’ + yz)’[ because (xy)’ = x’ + y’ ] = x’ + (y’z’)’ (yz)’[ because (x + y)’ = x’ y’ ] = x’ + (y + z)(y’ + z’)[ because (xy)’ = x’ + y’, twice]

15 Algebraic manipulation We can now start doing some simplifications x’y’ + xyz + x’y = x’(y’ + y) + xyz[ Distributive; x’y’ + x’y = x’(y’ + y) ] = x’  1 + xyz[ Axiom 5; y’ + y = 1 ] = x’ + xyz[ Axiom 2; x’  1 = x’ ] = (x’ + x)(x’ + yz)[ Distributive ] = 1  (x’ + yz)[ Axiom 5; x’ + x = 1 ] = x’ + yz[ Axiom 2 ; x’  1 = x’]

16 Canonical Forms Any boolean function that is expressed as a sum of minterms or as a product of maxterms is said to be in its canonical form.

17 Minterms A minterm is a special product of literals, in which each input variable appears exactly once. A function with n variables has 2 n minterms (since each variable can appear complemented or not) A three-variable function, such as f(x,y,z), has 2 3 = 8 minterms: Each minterm is true for exactly one combination of inputs: x’y’z’x’y’zx’yz’x’yz xy’z’xy’zxyz’xyz MintermIs true when…Shorthand x’y’z’x=0, y=0, z=0m 0 x’y’zx=0, y=0, z=1m 1 x’yz’x=0, y=1, z=0m 2 x’yzx=0, y=1, z=1m 3 xy’z’x=1, y=0, z=0m 4 xy’zx=1, y=0, z=1m 5 xyz’x=1, y=1, z=0m 6 xyzx=1, y=1, z=1m 7

18 Sum of minterms form Every function can be written as a sum of minterms, which is a special kind of sum of products form The sum of minterms form for any function is unique If you have a truth table for a function, you can write a sum of minterms expression just by picking out the rows of the table where the function output is 1 (1-minterm). f = x’y’z’ + x’y’z + x’yz’ + x’yz + xyz’ = m 0 + m 1 + m 2 + m 3 + m 6 =  (0,1,2,3,6) f’ = xy’z’ + xy’z + xyz = m 4 + m 5 + m 7 =  (4,5,7) f’ contains all the minterms not in f

19 Sum of minterms: practise F = x + yz, how to express this in the sum of minterms? = x(y + y’)(z + z’) + (x + x’)yz = xyz + xyz’ + xy’z + xy’z’ + xyz + x’yz = x’yz + xy’z’ + xy’z + xyz’ + xyz =  (3,4,5,6,7) or, convert the expression into truth-table and then read the minterms from the table

20 Maxterms A maxterm is a sum of literals, in which each input variable appears exactly once. A function with n variables has 2 n maxterms The maxterms for a three-variable function f(x,y,z): Each maxterm is false for exactly one combination of inputs: x’ + y’ + z’x’ + y’ + zx’ + y + z’x’+ y + z x + y’ + z’x + y’ + zx + y + z’x + y + z MaxtermIs false when…Shorthand x + y + zx=0, y=0, z=0M 0 x + y + z’x=0, y=0, z=1M 1 x + y’ + zx=0, y=1, z=0M 2 x + y’ + z’x=0, y=1, z=1M 3 x’ + y + zx=1, y=0, z=0M 4 x’ + y + z’x=1, y=0, z=1M 5 x’ + y’ + zx=1, y=1, z=0M 6 x’ + y’ + z’x=1, y=1, z=1M 7

21 Product of maxterms form Every function can be written as a unique product of maxterms If you have a truth table for a function, you can write a product of maxterms expression by picking out the rows of the table where the function output is 0 (0-maxterm). f = (x’ + y + z)(x’ + y + z’)(x’ + y’ + z’) = M 4 M 5 M 7 = ∏(4,5,7) f’ = (x + y + z)(x + y + z’)(x + y’ + z) (x + y’ + z’)(x’ + y’ + z) = M 0 M 1 M 2 M 3 M 6 = ∏(0,1,2,3,6) f’ contains all the maxterms not in f

22 Product of maxterms: practise F = x’y’ + xz, how to express this in the product of maxterms? = (x’y’ + x)(x’y’ + z) = (x’ + x)(y’ + x)(x’ + z)(y’ + z) = (x + y’)(x’ + z)(y’ + z) = (x + y’ + zz’)(x’ + z + yy’)(xx’ + y’ + z) = (x + y’ + z)(x + y’ + z’)(x’ + y + z)(x’ + y’ + z)(x + y’ + z)(x’ + y’ + z) = (x + y’ + z)(x + y’ + z’)(x’ + y + z)(x’ + y’ + z) = ∏(2,3,4,6) or, convert the expression into truth-table and then read the minterms from the table

23 Minterms and maxterms are related Any minterm m i is the complement of the corresponding maxterm M i For example, m 4 ’ = M 4 because (xy’z’)’ = x’ + y + z MaxtermShorthand x + y + zM 0 x + y + z’M 1 x + y’ + zM 2 x + y’ + z’M 3 x’ + y + zM 4 x’ + y + z’M 5 x’ + y’ + zM 6 x’ + y’ + z’M 7 MintermShorthand x’y’z’m 0 x’y’zm 1 x’yz’m 2 x’yzm 3 xy’z’m 4 xy’zm 5 xyz’m 6 xyzm 7

24 Converting between canonical forms We can convert a sum of minterms to a product of maxterms In general, just replace the minterms with maxterms, using maxterm numbers that don’t appear in the sum of minterms: The same thing works for converting from a product of maxterms to a sum of minterms From beforef=  (0,1,2,3,6) andf’=  (4,5,7) = m 4 + m 5 + m 7 complementing(f’)’= (m 4 + m 5 + m 7 )’ sof = m 4 ’ m 5 ’ m 7 ’[ DeMorgan’s law ] = M 4 M 5 M 7 [ By the previous page ] = ∏(4,5,7) f=  (0,1,2,3,6) = ∏(4,5,7)

25 Standard Forms Any boolean function that is expressed as a sum of products (SOP) or as a product of sums (POS), where each product-term or sum-term may require fewer than (n-1) operations, is said to be in its standard form. Standard forms are not unique, there can be several different SOPs and POSs for a given function. A SOP expression contains: – Only OR (sum) operations at the “outermost” level – Each term (implicant) must be a product of literals A POS expression contains: – Only AND (product) operations at the “outermost” level – Each term (implicate) must be a sum of literals f(x,y,z) = xy + x’yz + xy’z f(x,y,z) = (x’ + y’)(x + y’ + z’)(x’ + y + z’)

26 Strategy for operator (literal) reduction

27 Other Logic Operations We’ve already seen all the basic Boolean operations and the associated primitive logic gates. There is a few additional gates that are often used in logic design. – They are all equivalent to some combination of primitive gates. – But they have some interesting properties in their own right. NAND (NOT-AND) NOR (NOT-OR) XOR (eXclusive OR) (xy)’ = x’ + y’(x + y)’ = x’ y’x  y = x’y + xy’ Operation: Expressions: Truth table: