BOOLEAN ALGEBRA TRUTH TABLE

Similar documents
Chapter-2 BOOLEAN ALGEBRA

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

MC9211 Computer Organization

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

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

Boolean Algebra and Logic Gates

Logic Design. Chapter 2: Introduction to Logic Circuits

CHAPTER 2 BOOLEAN ALGEBRA

Boolean Algebra. Examples: (B=set of all propositions, or, and, not, T, F) (B=2 A, U,, c, Φ,A)

Chapter 2 Boolean Algebra and Logic Gates

Chapter 2 : Boolean Algebra and Logic Gates

Chapter 2: Princess Sumaya Univ. Computer Engineering Dept.

BOOLEAN ALGEBRA CLASS XII. Presented By : Dinesh Patel PGT CS KV IIT Powai

Boolean Algebra & Logic Gates. By : Ali Mustafa

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

Chapter 2 Combinational Logic Circuits

Chapter 2: Switching Algebra and Logic Circuits

Chap 2. Combinational Logic Circuits

Digital Logic Design. Malik Najmus Siraj

Chapter 2. Boolean Algebra and Logic Gates

CHAPTER III BOOLEAN ALGEBRA

UNIVERSITI TENAGA NASIONAL. College of Information Technology

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

WEEK 2.1 BOOLEAN ALGEBRA

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

Signals and Systems Digital Logic System

EC-121 Digital Logic Design

This form sometimes used in logic circuit, example:

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

Contents. Chapter 2 Digital Circuits Page 1 of 30

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

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA

Chapter 2: Boolean Algebra and Logic Gates

CHAPTER III BOOLEAN ALGEBRA

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

CHAPTER1: Digital Logic Circuits Combination Circuits

Unit 2 Boolean Algebra

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

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

Combinational Logic Fundamentals


Digital Logic Design. Combinational Logic

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

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

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

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

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

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

Chapter 3. Boolean Algebra. (continued)

Combinational Logic. Review of Combinational Logic 1

EEE130 Digital Electronics I Lecture #4

Week-I. Combinational Logic & Circuits

Lecture 2 Review on Digital Logic (Part 1)

Binary Logic and Gates

Number System conversions

ENG2410 Digital Design Combinational Logic Circuits

Chapter 2 Boolean Algebra and Logic Gates

UNIT 3 BOOLEAN ALGEBRA (CONT D)

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

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

Unit 2 Boolean Algebra

Combinational Logic. Fan-in/ Fan-out Timing. Copyright (c) 2012 Sean Key

University of Technology

CS61c: Representations of Combinational Logic Circuits

Unit 2 Session - 6 Combinational Logic Circuits

ELCT201: DIGITAL LOGIC DESIGN

211: Computer Architecture Summer 2016

Circuits & Boolean algebra.

Boolean Algebra, Gates and Circuits

Combinational Logic Circuits Part II -Theoretical Foundations

Chapter 2 Combinational Logic Circuits

Gate-Level Minimization

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

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

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

7.1. Unit 7. Minterm and Canonical Sums 2- and 3-Variable Boolean Algebra Theorems DeMorgan's Theorem Simplification using Boolean Algebra

SAMPLE ANSWERS MARKER COPY

CHAPTER 3 BOOLEAN ALGEBRA

Digital Circuit And Logic Design I. Lecture 3

ECE 238L Boolean Algebra - Part I

If f = ABC + ABC + A B C then f = AB C + A BC + AB C + A BC + A B C

Digital Logic (2) Boolean Algebra

1. Name the person who developed Boolean algebra

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

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

Combinational Logic Design Principles

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

Boolean Algebra and Logic Simplification

Chapter 2 Boolean Algebra and Logic Gates

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

Chapter 2 Boolean Algebra and Logic Gates

UNIT 5 KARNAUGH MAPS Spring 2011

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

Chapter 2 Combinational logic

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

Midterm Examination # 1 Wednesday, February 25, Duration of examination: 75 minutes

Fundamentals of Computer Systems

Chapter 7 Logic Circuits

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA

Boolean Algebra and Digital Logic

Transcription:

BOOLEAN ALGEBRA TRUTH TABLE Truth table is a table which represents all the possible values of logical variables / statements along with all the possible results of the given combinations of values. Eg: X Y R represents TRUE and represents FALSE. TAUTOLOGY If result of any logical statement or expression is always TRUE or, it is called Tautology. FALLACY If result of any logical statement or expression is always FALSE or, it is called Fallacy. NOT OPERATOR This Operator operates on single variables. Truth Table X Result OR OPERATOR Operator denotes operation called logical addition.

X Y X+ Y AND OPERATOR AND Operator denotes operation called logical Multiplication. X Y X. Y Evaluation of Boolean Expressions Using Truth Table.. X + (Y.Z) X Y Z Y.Z (Y.Z) X+(Y.Z) BASIC LOGIC GATES Logic Gate 2

A Gate is simply an electronic circuit which operates on one or more signals to produce an output signal. There are three types of logic gates:-. Inverter (NOT Gate) 2. OR gate 3. AND gate Inverter (NOT Gate) An inverter (NOT gate) is a gate with only one input signal and one output signal. The output signal is always the opposite of the input state. Truth Table of NOT Gate X X NOT Gate Symbol OR Gate The OR Gate has two or more input signals but only one output signal. If anyone input signal is high () then output signal will be high (). X Y X+ Y OR Gate Symbol 3

AND Gate The AND Gate has two or more input signals but only one output signal. If anyone input signal is low () then output signal will be low otherwise high X Y X. Y AND Gate Symbol BASIC POSTULATES OF BOOLEAN ALGEBRA I. If x!= then x= and if x!= then x= II. OR Relations (logical Addition) + = + = + = + = 4

III. AND Relations (Logical Multiplication). =. =. =. = IV. Complement rules = = PRINCIPLE OF DUALITY This states that starting with a Boolean relation another Boolean relation can be derived by. Changing each OR sign to an AND sign. 2. Changing each AND sign to OR sign. 3. Replacing each by and each by. The derived relation using duality principal is called dual of original expression. BASIC THEOREMS OF BOOLEAN ALGEBRA. Properties of and a. + X = X b. + X = c.. X = d.. X = X 2. Indempotence Law (a) X + X = X (b) X. X = X Proof (a) X + X = X X X R 5

Proof (b) X. X = X X X R 3. Involution X = X Proof X X X (9) Complementarity Law (a) X + X = (b) X. X = Proof X X X+X X X X.X () Commutative Law 6

i. X + Y= Y + X X Y X + Y Y + X ii.x.y = Y. X X Y X.Y Y.X () The Associative Law (i) X + (Y + Z) = (X + Y) + Z (ii) X(YZ) =(XY)Z Truth table for X+(Y+Z) = (X+Y)+Z is given below : Input Output X Y Z Y+Z X+Y X+(Y+Z) (X+Y)+Z 7

Comparing the columns X+(Y+Z) and (X+Y)+Z, we see both of these are identical, Hence proved. Since (i) is proved, (ii) is dual of rule (ii), hence it is also proved. (2) The Distributive Law (i) X(Y+Z) = XY+XZ (ii) X+YZ =(X+Y)(X+Z) Truth table for X(Y+Z) = XY+XZ are given below: Input Output X Y Z Y+Z XY XZ X(Y+Z) XY+XZ 8

Both the columns X(Y+Z) and XY+YZ are identical, hence proved. The algebraic proof of law X+YZ=(X+Y)(X+Z) RHS = (X+Y)(X+Z) =XX+XZ+XY+YZ =X+XZ+XY+YZ =X+XY+XZ+YZ =X(+Y)+Z(X+Y) =X.+Z(X+Y) =X+XZ+YZ=X(+Z)+YZ =X +YZ = LHS, Hence proved. Eg: State Distributive law and verify the same using truth table. Ans. If X, Y, Z are Boolean Variables then X.(Y + Z) = X.Y + X.Z or X+Y.Z = (X+Y).(X+Z) X Y Z Y+Z X.(Y+Z) X.Y X.Z X.Y+X.Z 9

(3) Absorption law (i) X+XY = X (ii) X(X+Y) =X (i) Truth table for X+XY = X is given below : Input Output X Y XY X+XY Both the columns X+XY and X are identical, hence proved. (ii) Truth table for X.(X+Y) = X is given below : Input Output

X Y X+Y X(X+Y) Column X and X(X+Y) are identical, hence proved. DEMORGAN S THEOREMS. Demorgan s First Theorem (X+Y) = X Y Proof (X+Y)+(X Y ) = (X+Y)+X Y =((X+Y)+X ).((X+Y)+Y ) = (X+X +Y).(X+Y+Y ) = (+Y).(X+) =. = (X+Y).(X Y ) = (X+Y).(X Y ) = X Y.(X+Y) = X Y X+X Y Y =.Y+X. = Hence proved 2. Demorgan s Second Theorem (X.Y) = X +Y Proof XY + (X +Y ) = =(X +Y )+XY

=(X +Y +X).(X +Y +Y) =(X+X +Y ).(X +Y+Y ) =(+Y ).(X +) =. = XY. (X +Y ) = = XY.( X +Y ) ->X(Y+Z)=XY+XZ = XYX +XYY =.Y+X. = + = Note:- Find the dual of the following expression. (X+Y)+Z=X+(Y+Z) The dual is (X.Y).Z=X.(Y.Z) Derivation of Boolean expression. Minterms Minterms is a product of all the literals (with or without the bar) within the logic system. Example: Convert X+Y to minterm X+Y = X.+Y. (Because X. = X) = X.(Y+Y )+Y.(X+X ) (Because X+X = ) = XY+XY +XY+X Y By Distributive law = XY+XY +X Y (Because X+X = X) 2. Maxterms Maxterm is a sum of all the literals (with or without the bar) within the logic system. Example: If the value of the variables are X=, Y= and Z= then the Maxterm will be X+Y +Z 2

3. Canonical Expression Boolean expression composed entirely either of minterms or Maxterm is referred to as canonical expression. Canonical expression can be represented in two forms: a. Sum of Products (SOP) form ii) Product of Sum (POS) form Canonical Sum of Products form When a Boolean expression is represented purely as sum of minterms (Product terms), it is said to be canonical Sum of Product form. Truth table for Product Terms (3 input) X Y Z ProductTerms/ Minterms X Y Z X Y Z X YZ X YZ XY Z XY Z XYZ XYZ Canonical sum of products expression can also be represented by the following Short hand notation. Example: - F= (,4,5,6,7) = m + m4 + m5 + m6 + m7 = + + + + (Boolean values for decimal numbers) = X Y Z + XY Z + XY Z+XYZ +XYZ Canonical Product of sum form 3

When a Boolean expression is represented purely as product of maxterms, it is said to be in canonical Product of Sum form of expression. Truth table for Sum Terms (3 input) X Y Z SumTerms/Maxterms X+Y+Z X+Y+Z X+Y +Z X+Y +Z X +Y+Z X +Y+Z X +Y +Z X +Y +Z Canonical product of sum expression can also be represented by the following Short hand notation. Example(): - F= (,4,5,6,7) =M. M4. M5. M6.M7 = + + + + (Boolean values for decimal numbers) = (X+Y+Z )( X +Y+Z)( X +Y+Z )( X +Y +Z)( X +Y +Z ) Minimization of Boolean expression. Algebraic method Example : - Reduce X Y Z + X YZ + XY Z + XYZ = X (Y Z + YZ ) + X(Y Z +YZ ) =X (Z (Y +Y)) + X(Z (Y +Y)) =X (Z.)+X(Z.) =X Z +XZ =Z (X +X) =Z. =Z 4

2. Simplification using karnaugh maps Karnaugh map Karnaugh map or K map is a graphical display of the fundamental products in a truth table. K Map is nothing but a rectangle made up of certain number of squares represents a Maxterm or minterm SOP reduction using K-maps For a function of n variables, there would be a map of 2 n squares each represents a minterm. Following are two, three, four variables k-maps for SOP reduction. Two variables Three variables 5

Four variable: ) Reduce the following Boolean expression using K-Map Ans. F(U,V,W,Z) = (,, 2, 3, 4,, ) 6

. Obtain the simplified form of a boolean expression using Karnaugh map. F(U,V,W,X) = (,3, 4, 5, 7,, 3, 5) [] U V []W Z [] W Z []WZ []WZ [] U V [] UV [] UV 2 quads, pair. Quad (m3+m7+m+m5) reduces to WZ Quad 2(m5+m7+m3+m5) reduces to VZ Pair (m,m4) reduces to U W Z Therefore F=WZ + VZ + U W Z POS reduction using K-maps : - For a function of n variables, there would be a map of 2 n squares each represents a maxterm. Following are two, three, four variables k-maps for POS reduction. Two variables Y Y X+Y X+Y 7

X +Y 2 X +Y 3 X X Three variables Y+Z Y+Z Y +Z Y +Z X+Y+Z X+Y+Z X+Y +Z 3 X+Y +Z 2 X +Y+Z 4 X +Y+Z 5 X +Y +Z 7 X +Y +Z 6 X X Four variables W+X+Y+Z W+X +Y+Z 4 W +X +Y+Z 2 W +X+Y+Z 8 Y+Z Y+Z Y +Z Y +Z W+X+Y+Z W+X+Y +Z W+X+Y +Z 3 2 W+X +Y+Z W+X +Y +Z W+X +Y +Z 5 7 6 W +X +Y+Z W +X +Y +Z W +X +Y +Z 3 5 4 W +X+Y+Z W +X+Y +Z W +X+Y +Z 9 8

W+X W+X W +X W +X More about Logic Gates NAND and NOR Gates NAND and NOR gates can greatly simplify circuit diagrams. As we will see you can use these gates wherever you could use AND, OR, and NOT. NAND Gate:- The NAND gate has two or more input signals but only one output signal. If all of the inputs are (high), then the output produced is (low). 9

A B B A NAND NOR Gates:- The NOR gates has two or more input signals but only one output signal. If all inputs are (i.e., low), then the output signal is (high). A B B A 2

NOR XOR and XNOR Gates XOR is used to choose between two mutually exclusive inputs. Unlike OR, XOR is true only when one input or the other is true, not both A B AÅB XOR Gate (Exclusive OR gate):- The XOR gate can also have two or more inputs but produces one output signal. Exclusive-OR gate different from OR gate. OR gate produces output for any input combination having one or more s, but XOR gate produces output for only those input combinations that have odd number s. XOR 2

XNOR Gate (Exclusive NOR gate) The XNOR Gate is logically equivalent to an inverted XOR i.e., XOR gate followed by a NOT gate (inventor). Thus XNOR produces (high) output when the input combination has even number of s. A B A B XNOR SOLVED PROBLEMS mark Questions ) Why are AND and NOR gates called Universal gates? () 22

Ans. NAND and NOR gates are less expensive and easier to design. Also, other switching functions (AND, OR) can easily be implemented using NAND/NOR gates. Thus, these (NAND, NOR) gates are also reffered to as Universal Gates. (2) Write the Sum of Products form of the function G(U,V,W). Truth table representation of G is as follows: () U V W G Ans. To get the product of sums form, we need to add maxterms for all those input combinations that produce output as. Thus, G(U,V,W) = (U + V + W) (U + V + W ) (U + V + W ) (U + V + W ) (3) Convert P+Q R to product of sum Ans: P+Q R=(P+Q ) (P+R ) =(P+Q +RR ) ( P+QQ +R) [ by the rule A+BC= (A+B)(A+C) [ by the rule AA = 23

= (P+Q +R) (P+Q +R ) (P+Q+R) (P+Q +R) [ by the rule A+BC= (A+B)(A+C) (4) Concert X+YZ into sum of product Ans: X+YZ=X.+YZ. [by the rule A.=A = X(Y+Y )+YZ(X+X ) [ by the rule A+A = =XY+XY +YZX+YZX =XY.+XY.+XYZ+YZX [by the rule A.=A =XY(Z+Z )+XY (Z+Z )+XYZ+X YZ [ by the rule A+A = =XYZ+XYZ +XY Z+XY Z +XYZ+X YZ 2 marks Questions () Write the equivalent Boolean Expression for the following Logic circuit.. Prove that X.(X+Y)=X by truth table method. (2) 24

Ans. X Y X+Y X.(X+Y). 2. From the above table it is obvious that X.(X+Y) = X because both the columns are identical. 2. Prove that X.(X+Y)=X by algebric method (2) Ans. LHS = X.(X+Y) = X.X+X.Y =X+X.Y =X.(+Y) =X. = X = RHS 3. State the distributive laws of Boolean algebra. How are they different from distributive laws of ordinary algebra. (2) Ans. Distributive laws of Boolean algebra state that i. X(Y+Z) = XY+XZ ii.x+yz =(X+Y)(X+Z) Ist law X(Y+Z) = XY+XZ holds good for all values of X, Y and Z in ordinary algebra whereas X+YZ =(X+Y)(X+Z) holds good only for two values (,) of X, Y and Z. 4. In Boolean algebra, verify using truth table that (X + Y) = X Y for each X, Y in (, ). (2) 25

Ans. As it is a 2-variable expression, truth table will be as follows : X Y X+Y (X+Y) X Y X Y 5. State Demorgan s laws. Verify one of the Demorgan s laws using truth tables. (2) Ans. De Morgan s first theorem. It states that X + Y = X. Y De Morgan s second theorem. It states that X. Y = X + Y Truth table for second theorem X Y X.Y X.Y X Y X+Y X.Y and X+Y are identical. 6. Draw the logic circuit diagram for the following expression : (2) Y = a b + b c + c a 26

7. Prepare a truth table for X Y Z + X Y (2) Ans. Truth table for is given below : Input O u t p u t X Y Z X Y Z X YZ XY X YZ + XY 27

(9) Write the equivalent expression for the following logic circuit : (2) Ans. F=(AC) +(BA) +(BC) () Write the equivalent expression for the following logic circuit: (2) Ans. (X + Y )(X + Y)(X + Y ) 4 marks Questions () Obtain the simplified form of a boolean expression using Karnaugh map. (4) F(u,v,w,x) = (, 3, 4, 5, 7,, 3, 5) []W Z [] W Z []W Z []W Z 28

[] U V [] U V [] U V [] U V 2 quads, pair. Quad (m3+m7+m+m5) reduces to WZ Quad 2(m5+m7+m3+m5) reduces to VZ Pair (m,m4) reduces to UWZ Therefore F=WZ + VZ + UWZ 8. By means of truth table, demonstrate the validity of the following Postulates / Laws of Boolean algebra: (4) a. Commulative law b. Idempotent law Ans. (a) The commulative law states that (i) X+Y = Y+X (ii) X.Y =Y.X (i) Truth table for X+Y = Y+X is given below : Input Output X Y X+Y Y+X 29

Comparing the columns X+Y and Y+X, we see both of these are identical. Hence proved. (ii) Truth table for X.Y = Y.X is given below: Input Output X Y X.Y Y.X Comparing the columns X.Y and Y.X, we see both of these are identical. Hence proved. (b) The Idempotent law states that (i) X+X = X ii) X.X =X (i) Truth table for X+X = X is given below : Input Output X X X+X (ii) Truth table for X.X = X is given below : Input Output X X X.X 3

POINTS TO REMEMBER Binary Decision Logical Statements TRUTH TABLE :-Truth table is a table which represents all the possible values of logical variables /statements along with all the possible results of the given combinations of values TAUTOLOGY:-If result of any logical statement or expression is always TRUE or, it is called Tautology. FALLACY : - If result of any logical statement or expression is always FALSE or, it is called Fallacy. PRINCIPLE OF DUALITY This states that starting with a Boolean relation another Boolean relation can be derived by. Changing each OR sign to an AND sign. 2. Changing each AND sign to OR sign. 3. Replacing each by and each by. The derived relation using duality principal is called dual of original expression. BASIC THEOREMS OF BOOLEAN ALGEBRA 4. Properties of and 5. +x=x 6. +x= 7..x= 3

8..x=x 9. Indempotence law (a) x+x=x (b) x.x=x Involution x =x Complementarity law (a) x+x = (b) x.x = Cummtative law x + y= y+x The associative law (i) X+(Y+Z) = (X+Y)+Z The distributive law (i) X(Y+Z) = XY+XZ Absorption law (ii) X(YZ) =(XY)Z (ii) X+YZ =(X+Y)(X+Z) (i) X+XY = X (ii) X(X+Y) =X DEMORGAN S THEOREMS (X+Y) =X Y (X.Y) =X +Y Minterms: - Minterms is a product of all the literals (with or without the bar) within the logic system. Maxterms: - Maxterm is a sum of all the literals (with or without the bar) within the logic system Canonical sum of product form:- When a Boolean expression is represented purely as sum of minterms or product terms, it is said to be canonical sum of product form. 32

Canonical Product of sum form: - When a Boolean expression is represented purely as product of maxterms, it is said to be in canonical product of sum form of expression. NOR Gates:- The NOR gates has two or more input signals but only one output signal. If all inputs are (i.e., low), then the output signal is (high). NAND Gate:- The NAND gate has two or more input signals but only one output signal. If all of the inputs are (high), then the output produced is (low). XOR Gate (Exclusive OR gate):- The XOR gate can also have two or more inputs but produces one output signal. Exclusive-OR gate different from OR gate. OR gate produces output for any input combination having one or more s, but XOR gate produces output for only those input combinations that have odd number s. XNOR Gate (Exclusive NOR gate) The XNOR Gate is logically equivalent to an inverted XOR i.e., XOR gate followed by a NOT gate (inventor). Thus XNOR produces (high) output when the input combination has even number of s. 33

34