Boolean Algebra.

Slides:



Advertisements
Similar presentations
Boolean Algebra and Logic Gates
Advertisements

Logical Systems Synthesis.
Chapter 2 Logic Circuits.
CS 151 Digital Systems Design Lecture 6 More Boolean Algebra A B.
Boolean Algebra and Logic Gates
Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No. 3-1 Chapter #2: Two-Level Combinational Logic Section 2.1, Logic Functions.
CS1104: Computer Organisation Lecture 3: Boolean Algebra
CSCE 211: Digital Logic Design
Chapter Two Boolean Algebra and Logic Gate
Chapter 2: Boolean Algebra and Logic Functions
Chapter 2 Boolean Algebra and Logic Gates
Boolean Algebra Boolean algebra Boolean algebra, like any other deductive mathematical system, may be defined with –a set of elements, –a set of operators,
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.
CS1104: Computer Organisation School of Computing National University of Singapore.
1 COMBINATIONAL LOGIC One or more digital signal inputs One or more digital signal outputs Outputs are only functions of current input values (ideal) plus.
BOOLEAN ALGEBRA Saras M. Srivastava PGT (Computer Science)
1 Representation of Logic Circuits EE 208 – Logic Design Chapter 2 Sohaib Majzoub.
Boolean Algebra 1854, George Boole created a two valued algebraic system which is now called Boolean algebra. 1938, Claude Shannon adapted Boolean algebra.
1 Binary Codes Digital systems use 2-state devices that understand only 2 binary values (0 and 1). But we communicate using various symbols and methods.
Module 4.  Boolean Algebra is used to simplify the design of digital logic circuits.  The design simplification are based on: Postulates of Boolean.
Chapter 2 Two- Level Combinational Logic. Chapter Overview Logic Functions and Switches Not, AND, OR, NAND, NOR, XOR, XNOR Gate Logic Laws and Theorems.
CHAPTER 3: PRINCIPLES OF COMBINATIONAL LOGIC
LOGIC GATES & BOOLEAN ALGEBRA
Boolean Algebra and Logic Gates
1 Boolean Algebra  Digital circuits Digital circuits  Boolean Algebra Boolean Algebra  Two-Valued Boolean Algebra Two-Valued Boolean Algebra  Boolean.
ENGIN112 L6: More Boolean Algebra September 15, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 6 More Boolean Algebra A B.
ece Parity Used to check for errors Can be either ODD or EVEN Left most bit used as the indicator For EVEN, insert a 0 or a 1 so as to make the.
Boolean Algebra – II. Outline  Basic Theorems of Boolean Algebra  Boolean Functions  Complement of Functions  Standard Forms.
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.
Logic Circuits Lecture 3 By Amr Al-Awamry. Basic Definitions Binary Operators  AND z = x y = x yz=1 if x=1 AND y=1  OR z = x + y z=1 if x=1 OR y=1 
Binary Logic and Gates Boolean Algebra Canonical and Standard Forms Chapter 2: Boolean Algebra and Logic Gates.
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,
R. Johnsonbaugh Discrete Mathematics 5 th edition, 2001 Chapter 9 Boolean Algebras and Combinatorial Circuits.
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 4 Dr. Shi Dept. of Electrical and Computer Engineering.
ECE DIGITAL LOGIC LECTURE 8: BOOLEAN FUNCTIONS Assistant Prof. Fareena Saqib Florida Institute of Technology Spring 2016, 02/11/2016.
Lecture 5 More Boolean Algebra A B. Overview °Expressing Boolean functions °Relationships between algebraic equations, symbols, and truth tables °Simplification.
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.
CSE 260 BRAC University.
CHAPTER 2 Boolean algebra and Logic gates
CS2100 Computer Organisation
Chapter 2: Boolean Algebra and Logic Functions
14:332:231 DIGITAL LOGIC DESIGN Boolean Algebra
ECE 20B, Winter 2003 Introduction to Electrical Engineering, II LECTURE NOTES #2 Instructor: Andrew B. Kahng (lecture)
CS 105 Digital Logic Design
Gate Circuits and Boolean Equations
CHAPTER 2 Boolean Algebra This chapter in the book includes:
Princess Sumaya University
ECE 331 – Digital System Design
Speaker: Fuw-Yi Yang 楊伏夷 伏夷非征番, 道德經 察政章(Chapter 58) 伏者潛藏也
Lecture 3: Boolean Algebra
Boolean Algebra Why study Boolean Algebra?
CSE 311 Foundations of Computing I
17-Nov-18 Logic Algebra 1 Combinational logic.
INTRODUCTION TO LOGIC DESIGN Chapter 2 Boolean Algebra and Logic Gates
Boolean Algebra.
Boolean Algebra & Logic Circuits
Lecture 14: Boolean Algebra
Chapter 2 Boolean Algebra and Logic Gate
CSE 370 – Winter Combinational Logic - 1
2. Boolean Algebra and Logic Gates
January 19 W’05 Yutao He 4532B Boelter Hall CSM51A/EEM16-Sec.1 W’05
MINTERMS and MAXTERMS Week 3
COMS 361 Computer Organization
Chapter #2: Two-Level Combinational Logic
Logic Circuits I Lecture 3.
Digital Logic Chapter-2
Digital Logic Chapter-2
Analysis of Logic Circuits Example 1
Presentation transcript:

Boolean Algebra

Outline Laws and theorems of Boolean Algebra Switching functions Logic functions: NOT, AND, OR, NAND, XOR, XNOR Switching function representations Canonical forms CS 3402--Digital Logic Boolean Algebra

Axiomatic of Boolean Algebra A Boolean algebra consists of a set B with two binary operations (  “AND”,  “OR”) and a unary operation ( ¯ or  “NOT”), such that the following axioms satisfy: Set B contains at least two distinct elements a and b. Closure: For every a, b  B, a + b  B a  b  B Commutative Laws: For every a, b  B, a + b = b + a a  b = b  a CS 3402--Digital Logic Boolean Algebra

Axiomatic of Boolean Algebra Associative Laws: For every a, b, c  B, (a + b) + c = a + (b + c) (a  b)  c = a  (b  c) Identities: For every a  B,  an identity element 0, such that a + 0 = a  an identity element 1, such that a  1 = a Distributive Laws: For every a, b, c  B, a  (b + c) = (a  b) + (a  c) Complement: For each a  B,  an such that a + = 1 a  = 0 CS 3402--Digital Logic Boolean Algebra

Boolean function A Boolean function uniquely maps Bn to B.     A Boolean function uniquely maps Bn to B. A Boolean expression is an algebraic statement containing Boolean (binary) variables and operators (, +, and ), that is (AND, OR, and NOT) A literal is a variable itself or its complement. When a Boolean function is implemented with logic gates, each literal represents an input to a gate, and each term is implemented a gate.     CS 3402--Digital Logic Boolean Algebra

Examples F = XYZ F = X + Y Z F = X Y Z + X YZ + XZ Z = A  B  (C + D) Z = (A  (B  (C + D))) CS 3402--Digital Logic Boolean Algebra

Laws and Theorems of Boolean Algebra Duality Every Boolean expression is deducible from the postulates of Boolean algebra remains valid if the operators and the identity elements are interchanged. That is interchange OR and AND operators and replace 1's by 0's and 0's by 1's. CS 3402--Digital Logic Boolean Algebra

Examples X + 1 = 1  X  0 = 0 X + XY = X  X(X + Y) CS 3402--Digital Logic Boolean Algebra

Laws and Theorems Boundness law: A + 1 = 1 A  0 = 0 Identity law: Idempotent Theorem: A + A = A A  A = A Involution Theorem: (A) = A Theorem of complementarity: A + A = 1 A  A = 0 Commutative law: A + B = B + A AB = BA Associative law: A + (B + C) = (A + B) + C A(BC) = (AB)C Distributive law: A (B + C) = AB + AC A + BC = (A+B)(A+C) DeMorgan's Theorem: (A + B) = A B (AB) = A + B Absorption law: A + AB = A A(A + B) = A Consensus Theorem: AB+BC+AC = AB+AC (A+B)(B+C)(A+C) = (A+B)(A+C) CS 3402--Digital Logic Boolean Algebra

Examples Simplify the following Boolean expressions to a minimum number of literals X + X Y  X + Y XY + X Y  Y X (X + Y )  XY X Y Z + X YZ + XY  X Z + XY XY + X Z + YZ  XY + X Z (X+Y)(X+Z)(Y+Z)  X Y + XZ CS 3402--Digital Logic Boolean Algebra

Switching Functions A switching algebra is a Boolean algebra whose set B contains only two values 0 and 1. A switching function uniquely maps Bn to B. f (X, Y, Z) = XY + X Z + YZ If X = 0, Y = 1, Z = 0, then f (X, Y, Z) = 0. If X = 0, Y = 1, Z = 1, then f (X, Y, Z) = 1. CS 3402--Digital Logic Boolean Algebra

Truth Tables A switching function can be represented as a Boolean function or in a tabular form called truth table. A truth table is a list of possible combinations of inputs that correspond to the values of the switching function (output). CS 3402--Digital Logic Boolean Algebra

Example Truth table of f (X, Y, Z) = XY + X Z + YZ X Y Z f 1 1 CS 3402--Digital Logic Boolean Algebra

Switching Functions There are 16 possible switching functions of two variables: X Y  XY X Y  OR NOR = Y  X  NAND 1 CS 3402--Digital Logic Boolean Algebra

Canonical and Standard Forms Minterms Maxterms CS 3402--Digital Logic Boolean Algebra

Minterms For two binary variables A and B combined with an AND operation, the minterms or standard products are: AB, AB, AB, and AB. That is, two binary variables provide 22 = 4 possible combinations (minterms.) n variables have 2n minterms. Each minterm has each variable being primed if the corresponding bit of the binary number is a 0 and unprimed if a 1. CS 3402--Digital Logic Boolean Algebra

Maxterms Similarly, two binary variables A and B combined with an OR operation, the maxterms or standard sums are: A+B, A+B, A+B, and A+B. That is, two binary variables provide 22 = 4 possible combinations (maxterms.) n variables have 2n maxterms. Each maxterm has each variable being primed if the corresponding bit of the binary number is a 1 and unprimed if a 0. A maxterm is the complement of its corresponding minterm, and vice versa. CS 3402--Digital Logic Boolean Algebra

Boolean function Sum of Products (or Minterms)     Sum of Products (or Minterms) A Boolean function can be expressed as a sum of minterms. The minterms whose sum defines the Boolean function are those that give the 1's of the function in a truth table. Product of Sums (or Maxterms) A Boolean function can be expressed as a product of maxterms. The maxterms whose sum defines the Boolean function are those that give the 0's of the function in a truth table.     CS 3402--Digital Logic Boolean Algebra

Minterms and Maxterms for Three Binary Variables Input Minterm Maxterm X Y Z Term Designation XYZ m0 X+Y+Z M0 1 XYZ m1 X+Y+Z M1 XYZ m2 X+Y+Z M2 XYZ m3 X+Y+Z M3 XYZ m4 X+Y+Z M4 XYZ m5 X+Y+Z M5 XYZ m6 X+Y+Z M6 XYZ m7 X+Y+Z M7 CS 3402--Digital Logic Boolean Algebra

Examples X Y Z Function F1 Function F2 1 CS 3402--Digital Logic 1 CS 3402--Digital Logic Boolean Algebra

Examples F1 and F2 can be expressed as a sum of products as follows: F1 = XYZ+XYZ+XYZ = m1+ m4+ m7 F2 = XYZ+XYZ+XYZ +XYZ = m3+ m5+ m6 + m7 F1 and F2 can also be expressed as a product of sums as follows: F1 = (X+Y+Z)(X+Y+Z)(X+Y+Z)(X+Y+Z)(X+Y+Z) = M0 M2 M3 M5 M6 F2 = (X+Y+Z)(X+Y+Z)(X+Y+Z)(X+Y+Z) = M0 M1 M2 M4 CS 3402--Digital Logic Boolean Algebra

Notation Boolean functions expressed as a sum of products or product of sums are said to be in canonical form A convenient way to express these function is by using a short notation, decimal form: F1(X, Y, Z) = m(1,4,7) F2(X, Y, Z) = m(3,5,6,7) or F1(X, Y, Z) =  M(0,2,3,5,6) F2(X, Y, Z) =  M(0,1,2,4) CS 3402--Digital Logic Boolean Algebra

Standard forms A Boolean function is said to be in standard form if the function contains one, two or any number of literals. For example: F1 = Y+XY+XYZ or F2 = X(Y+Z)(X+Y+Z+W) A Boolean function may be expressed in a nonstandard form. For example, the function F = (WX+YZ)(WX+YZ) CS 3402--Digital Logic Boolean Algebra

Example 1 1. Given the following truth table. Express F in a canonical minterms and maxterms. X Y Z F 1 CS 3402--Digital Logic Boolean Algebra

Example 2 2. Design a digital logic circuit that will activate an alarm if a door or window is open during non-business hours. Assume that Clock C = 0 (non-business hours) 1 (business hours) Door D = 0 (closed) 1 (opened) Window W = 0 (closed) Alarm A = 0 (off) 1 (on) CS 3402--Digital Logic Boolean Algebra

Conversion between canonical form To convert from a sum of products to a product of sums: rewrite the minterm canonical form in a shorthand notation then replace the existing term numbers by the missing numbers. For example: F1(X, Y, Z) = m(1,3,6,7) =  M(0,2,4,5) CS 3402--Digital Logic Boolean Algebra

Conversion between canonical form To convert from a product of sums to a sum of products: rewrite the maxterm canonical form in a shorthand notation then replace the existing term numbers by the missing numbers. For example: F1(X, Y, Z) =  M(0,2,4,5) = m(1,3,6,7) CS 3402--Digital Logic Boolean Algebra

Conversion between canonical form To obtain the minterm (or maxterm) canonical form of the complement, given the Boolean function in a sum of products (or product of sums) form : list the term numbers that are missing in For example: F(X, Y, Z) = m(0,2,4,5)  F(X, Y, Z) = m (1,3,6,7) F(X, Y, Z) = M(1,3,6,7)  F(X, Y, Z) = M(0,2,4,5) CS 3402--Digital Logic Boolean Algebra

Don't Care Conditions F(A,B,C,D) = m(1,3,7,11,13,15) + d(0,2,5) BCD increment by 1 function. CS 3402--Digital Logic Boolean Algebra

Logic Functions AND Operation Z = X  Y Inputs Output X Y Z 1 1 CS 3402--Digital Logic Boolean Algebra

Logic Functions OR Operation Z = X + Y Inputs Output X Y Z 1 1 CS 3402--Digital Logic Boolean Algebra

Logic Functions NOT Operation Z = X  Inputs Output X Z 1 1 CS 3402--Digital Logic Boolean Algebra

Logic Functions NAND Operation Z = (X  Y) Inputs Output X Y Z 1 1 CS 3402--Digital Logic Boolean Algebra

Logic Functions NOR Operation Z = (X + Y) Inputs Output X Y Z 1 1 CS 3402--Digital Logic Boolean Algebra

Logic Functions XOR Operation Z = X  Y Inputs Output X Y Z 1 1 CS 3402--Digital Logic Boolean Algebra

Logic Functions XNOR Operation Z = (X  Y) Inputs Output X Y Z 1 1 CS 3402--Digital Logic Boolean Algebra

Switching function representations There are 3 ways to represent a switching function: Boolean expression Truth table Logic diagram CS 3402--Digital Logic Boolean Algebra

Positive and Negative Logic CS 3402--Digital Logic Boolean Algebra

Positive and Negative Logic Truth Table Positive Logic Negative Logic x y z low 1 high CS 3402--Digital Logic Boolean Algebra

Positive and Negative Logic Truth Table Positive Logic Negative Logic x y z low 1 high CS 3402--Digital Logic Boolean Algebra

Example Example: Traffic lights -- to define three signals CS 3402--Digital Logic Boolean Algebra