CHAPTER 2 Boolean algebra and Logic gates

Slides:



Advertisements
Similar presentations
Boolean Algebra and Logic Gates
Advertisements

Boolean Algebra and Logic Gates
Boolean Algebra and Logic Gates
Logical Systems Synthesis.
Chapter 2 Logic Circuits.
Chapter 2 – Combinational Logic Circuits Part 1 – Gate Circuits and Boolean Equations Logic and Computer Design Fundamentals.
1 Section 10.1 Boolean Functions. 2 Computers & Boolean Algebra Circuits in computers have inputs whose values are either 0 or 1 Mathematician George.
Boolean Algebra and Logic Gates
CSE-221 Digital Logic Design (DLD)
Lecture 3. Boolean Algebra, Logic Gates
Fall 2002CMSC Discrete Structures1 Yes, No, Maybe... Boolean Algebra.
Chapter Two Boolean Algebra and Logic Gate
Chapter 2: Boolean Algebra and Logic Functions
Boolean Algebra. Binary Logic and Gates Binary variables take on one of two values. Logical operators operate on binary values and binary variables. Basic.
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,
Logic Design CS221 1 st Term Boolean Algebra Cairo University Faculty of Computers and Information.
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:
IKI a-Boolean Algebra Bobby Nazief Semester-I The materials on these slides are adopted from those in CS231’s Lecture Notes at UIUC,
Boolean Algebra and Digital Circuits
Combinational Logic 1.
Chapter 2. Outlines 2.1 Introduction 2.2 Basic Definitions 2.3 Axiomatic Definition of Boolean Algebra 2.4 Basic thermos and proprieties of Boolean Algebra.
Boolean Algebra 1854, George Boole created a two valued algebraic system which is now called Boolean algebra. 1938, Claude Shannon adapted Boolean algebra.
Module 4.  Boolean Algebra is used to simplify the design of digital logic circuits.  The design simplification are based on: Postulates of Boolean.
Logic Design Dr. Yosry A. Azzam.
Overview Part 1 – Gate Circuits and Boolean Equations
LOGIC GATES AND CIRCUITS Digital systems are said to be constructed by using logic gates. These gates are the AND, OR, NOT, NAND, NOR, EXOR and EXNOR gates.
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.
A. Abhari CPS2131 Chapter 2: Boolean Algebra and Logic Gates Topics in this Chapter: Boolean Algebra Boolean Functions Boolean Function Simplification.
Lecture 4 Boolean Algebra. Logical Statements °A proposition that may or may not be true: Today is Monday Today is Sunday It is raining °Compound Statements.
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.
Boolean Algebra & Logic Circuits Dr. Ahmed El-Bialy Dr. Sahar Fawzy.
Chapter 2: Basic Definitions BB inary Operators ●A●AND z = x y = x yz=1 if x=1 AND y=1 ●O●OR z = x + yz=1 if x=1 OR y=1 ●N●NOT z = x = x’ z=1 if x=0.
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.
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.
Boolean Algebra.
Fuw-Yi Yang1 數位系統 Digital Systems Department of Computer Science and Information Engineering, Chaoyang University of Technology 朝陽科技大學資工系 Speaker: Fuw-Yi.
Mu.com.lec 9. Overview Gates, latches, memories and other logic components are used to design computer systems and their subsystems Good understanding.
Digital Logic Circuits, Digital Component and Data Representation Course: BCA-2 nd Sem Subject: Computer Organization And Architecture Unit-1 1.
Boolean Algebra & Logic Gates
Speaker: Fuw-Yi Yang 楊伏夷 伏夷非征番, 道德經 察政章(Chapter 58) 伏者潛藏也
Chapter 2: Boolean Algebra and Logic Functions
Unit 2 Boolean Algebra.
ECE 20B, Winter 2003 Introduction to Electrical Engineering, II LECTURE NOTES #2 Instructor: Andrew B. Kahng (lecture)
CS 105 Digital Logic Design
CHAPTER 2 Boolean Algebra
… and now for the Final Topic:
CHAPTER 2 Boolean Algebra This chapter in the book includes:
Overview Part 1 – Gate Circuits and Boolean Equations
Princess Sumaya University
TN 221: DIGITAL ELECTRONICS 1
Speaker: Fuw-Yi Yang 楊伏夷 伏夷非征番, 道德經 察政章(Chapter 58) 伏者潛藏也
Boolean Algebra Why study Boolean Algebra?
Boolean Algebra.
INTRODUCTION TO LOGIC DESIGN Chapter 2 Boolean Algebra and Logic Gates
Boolean Algebra.
Boolean Algebra & Logic Circuits
Chapter 2 Boolean Algebra and Logic Gate
2. Boolean Algebra and Logic Gates
Functions Computers take inputs and produce outputs, just like functions in math! Mathematical functions can be expressed in two ways: We can represent.
Yes, No, Maybe... BooleanAlgebra 12/10/2018.
Digital Logic Chapter-2
Digital Logic Chapter-2
Circuit Simplification and
Presentation transcript:

CHAPTER 2 Boolean algebra and Logic gates Digital Logic Design CHAPTER 2 Boolean algebra and Logic gates

Basic Definitions Boolean Algebra: A deductive mathematical system Defined with A set of elements, ex: B = {0, 1} A set of operators, ex: +, *, … A number of unproved axioms or postulates A set of elements is any collection of objects having a common property A binary operator defined on a set S: The relation a*b=c , “*” is a binary operator if a, b, c  S However, “*” is not a binary operator if a, b  S, while c is not belong to S.

Most Common Postulates The most common postulates used to formulate various algebraic structure are: Closure: The result of any operators is still in a set S if all operands are also in set S ex: natural number N = {1, 2, 3, …} natural + natural = natural Associative law: ex: (X * Y) * Z = X * (Y * Z) for all X, Y, Z in set S Commutative law: ex: X * Y = Y * X for all X, Y in set S

Most Common Postulates Identity element: If e is an identity element with respect to a binary operator *, then e * X = X * e = X for every X in set S ex: x + 0 = 0 + x = x (x is an integer) Inverse: If y is an inverse of x with respect to an operator *, then x * y = e ex: a + (-a) = 0 (0 is the identity element of +) Distributive law: ex: X . (Y + Z) = X . Y + X . Z (. distributive over +)

Postulates of Boolean Algebra Boolean algebra is Defined by a set of elements B Defined with two binary operators + (OR), . (AND) Satisfies the following postulates: (1) Closure w.r.t the operators ‘+’ and ‘.’ (2) Identity w.r.t ‘+’ is 0; identity w.r.t ‘.’ is 1 (3) Commutative w.r.t ‘+’ and ‘.’ (4) Distributive w.r.t ‘+’ and ‘.’ (5) x + x’ (inverse) = 1; x . x’ = 0 (6) There exists at least two different elements in B

Boolean vs. Ordinary Boolean Algebra Ordinary Algebra Associate law not included (but still valid) Distributive law is valid No additive or multiplicative inverses Define complement No. of elements is not clearly defined 2 for two-valued Boolean algebra Ordinary Algebra Associate law included Distributive law may not valid Have additive and multiplicative inverses No complement Operator Deal with real numbers Infinite set of elements

Two-Valued Boolean Algebra A two-valued Boolean algebra is Defined on a set of two elements B = {0, 1} With rules for the binary operators ‘+’ and ‘.’ These rules are exactly the same as the AND, OR and NOT operations, respectively. We must show that the Huntington postulates are valid for the set B={0,1}and the two binary operators defined above.

Two-Valued Boolean Algebra Closure is obvious from the tables since the result of each operation is either 0, 1. (1, 0  B) From the tables we see: 0 + 0 = 0 0 + 1 = 1 + 0 = 1 1 . 1 = 1 1 . 0 = 0 . 1 = 0 Which establishes the two identity elements 0 for ‘+’ and 1 for ‘.’ The commutative laws are obvious from the symmetry of the binary operator tables. 0 + 1 = 1 + 0 = 1 0 . 1 = 1 . 0 = 0

Two-Valued Boolean Algebra The distributive law x . (y + z)=(x . y) + (x . z) ‘+’ over ‘.’ From the complement table: x + x’ = 1, since 0 + 0’ = 0 + 1 = 1 and 1 + 1’ = 1 x . x’ = 0, since 0 . 0’ = 0 and 1 . 1’ = 0 Postulate 6 is satisfied because the two-valued Boolean algebra has two distinct elements 1 and 0 with 1 ≠ 0.

Basic Theorems And Properties Duality Principle Every Boolean algebraic expression remains valid if the operators and identity elements are interchanged Postulates For two-valued Boolean algebra: Interchange OR and AND operators and replace 1’s by 0’s and 0’s by 1’s Ex: X + 1 = 1 X . 0 = 0

Postulates of Binary Logic (a) X + 0 = X (b) X . 1 = X Postulate 3: (commutative) (a) X + Y = Y + X (b) X . Y = Y . X Postulate 4: (distributive) (a) X (Y + Z) = XY + XZ (b) X + YZ = (X + Y) (X + Z) Postulate 5: (a) X + X’ = 1 (b) X . X’ = 0

Basic Theorems (1/6) Theorem 1(a): X + X = X Theorem 1(b): X . X = X <proof> X + X = (X + X) . 1 ……………… p2(b) = (X + X) (X + X‘) ………… p5(a) = X + XX‘ ………....………… p4(b) = X + 0 ……………………… P5(b) = X …………………………… P2(a) Theorem 1(b): X . X = X <proof> X . X = XX + 0 ……………….…… p2(a) = XX + XX‘ ……………….… p5(b) = X (X + X‘) …………..…… p4(a) = X . 1 ………………….…… p5(a) = X …………………….……… p2(a)

Basic Theorems (1/6) Note that theorem 1(b) is the dual of theorem 1(a) and that each step of the proof in part (b) is the dual of part (a). Any dual theorem can be similarly derived from the proof of its corresponding pair

Basic Theorems (2/6) Theorem 2(a): X + 1 = 1 Theorem 2(b): X . 0 = 0 <proof> X + 1 = 1 . (X + 1) ………………… p2(b) = (X + X‘) (X + 1) ………… p5(a) = X + X‘ . 1 ………………..… p4(b) = X + X‘ …………………………. p2(b) = 1 ………………………….…….. p5(a) Theorem 2(b): X . 0 = 0 <proof> by duality of theorem 2(a)

Basic Theorems (3/6) Theorem 3: (X‘)‘ = X (involution) <proof> X + X‘ = 1 and X . X‘ = 1 (from p5) X and X‘ are complement to each other the complement of X‘ = (X‘)‘ = X

Basic Theorems (4/6) Theorem 4: (associative) (a) X + (Y + Z) = (X + Y) + Z (b) X (YZ) = (XY) Z <proof for (a)> X + (Y + Z) = X.1 + (Y + Z).1 ………..… p2(b) = X.1 + Y.1 + Z.1 …….….. p4(a) = (X + Y).1 + Z.1 ……..…… p4(a) = (X + Y) + Z …………..……… p2(b) <proof for (b)> can be obtained by the duality of theorem 4(a)

Basic Theorems (5/6) Theorem 5: (DeMorgan) (a) (X + Y)‘ = X‘Y‘ (b) (XY)‘ = X‘ + Y‘ <proof> (a) by truth table (b) can be proofed by similar way

Basic Theorems (6/6) Theorem 6: (absorption) (a) X + XY = X (b) X (X + Y) = X <proof for (a)> X + XY = X . 1 + XY …………….…….. p2(b) = X (1 + Y) ………………..… p4(a) = X (Y + 1) ………..………... p3(a) = X . 1 ……………………….. p2(a) = X …………………………..… p2(b) <proof for (b)> can be obtained by the duality of theorem 6(a)

Operator Precedence (1) Parentheses (2) NOT ……… similar to the sign of numbers (3) AND ……… similar to multiplication (4) OR ……….. similar to addition Ex: (X + Y)‘ + Z step 1: X + Y ……… inside the parentheses step 2: (X + Y)‘ step 3: (X + Y)‘ + Z

Venn Diagram A helpful illustration that may be used to visualize the relationships among the variables of a Boolean expressions is the Venn diagram. x y xy x’y xy’ x’y’ Venn diagram for two variable x y Venn diagram illustration x = x y + x x y x (y + z) z x y x y + z x z

Boolean Functions A Boolean function is described by an algebraic expression that consists of Binary variables The constant 0 and 1 The logic operation symbols For a given value of the binary variables, the function can be equal to either 1 or 0. Ex1: F1 = XYZ’ F1 = 1, if X=1, Y=1 and Z’=1 otherwise F1=0. Ex2: F2 = X +Y’ Z F2 = 1, if X=1 or if Y=0,while Z=1

Boolean Functions A Boolean function can be represented in a truth table. A truth table includes A list of the 2n combinations of 1’s and 0’s assigned to the binary variables A column that shows the value of the function for each binary combination.

Gate Implementation A Boolean function can be transformed from an algebraic expression into a circuit diagram composed of logic gates. The forms of the algebraic expressions have large impact on the logic circuit diagram. For example, the Boolean function F2: A) F2 = x’y’z + x’yz + xy’ B) f2 = xy’ + x’z

Gate Implementation

Algebraic Manipulation Literal: a single variable within a term that may be complement or not F2 = x’y’z + x’yz + xy’ (3 terms, 8 literals) F2 = xy’ + x’z (2 terms, 4 literals) Each literal in the function designates an input to a gate. Each term is implemented with a gate. Reducing the number of terms and the number of literals can often lead to a simpler circuit.

Example 2-1 Simplify the following Boolean functions to a minimum number of literals 1. x(x’ + y) = xx’ + xy = 0 +xy = xy 2. x + x’y = (x + x’)(x + y) = 1(x + y) = x + y 3. (x + y)(x + y’) = x + xy + xy’ + yy’ = x(1 + y + y’) + 0 = x 4. xy + x’z + yz = xy + x’z + yz(x + x’) = xy + x’z + xyz + x’yz = xy(1 + z) + x’z(1 + y) = xy + x’z 5. (x + y)(x’ + z)(y + z) = (x + y)(x’ + z) by duality from function 4

Complement of a Function Can be derived algebraically through DeMorgan’s theorem DeMorgan’s theorem can be extended to three or more variables (A + B + C + … + F)’ = A’B’C’ … F’ (ABC … F)’ = A’ + B’ + C’ + … + F’ Proof for three variables is shown in the book The complement of a function is obtained by interchanging AND and OR operators and complementing each literal.

Example 2-2 2-2: complement by DeMorgan’s theorem F1’ = (x’yz’ + x’y’z)’ = (x’yz’)’(x’y’z)’ = (x + y’ + z)(x + y + z’) F2’ = [x(y’z’ + yz)]’ = x’ + (y’z’ + yz)’ = x’ + (y’z’)’(yz)’ = x’ + (y + z)(y’ + z’) A simpler procedure for deriving the complement of a function is to take the dual of the function and complement each literal.

Example 2-3 2-3: complement by taking duals and complementing each literal F1 = x’yz’ + x’y’z The dual of F1 is (x’ + y + z’)(x’ + y’ + z) Complement each literal is (x + y’ + z)(x + y + z’)= F1’ F2 = x(y’z’ + yz) The dual of F2 is x + (y’ + z’)(y + z) Complement each literal is x’ + (y + z)(y’ + z’) = F2’

Canonical and Standard Forms Minterms and Maxterms n binary variables can be combined to form 2n terms (AND terms),called minterms or standard products. In a similar fashion, n binary variables can be combined to form 2n terms (OR terms), called maxterms or standard sums. Note that each maxterm is the complement of its corresponding minterm and vice versa.

Minterms and Maxterms

Canonical Form

Sum of Minterms

Notation for Sum of Minterms

Product of Maxterms

Conversion between Canonical Forms

Example 2-5 by Conversion

Standard Forms The canonical forms are basic forms obtained from the truth table. Very seldom to have the least number of literals Standard forms : not required to have all variables in each term. Sum of products [ex: F1 = y’ + xy + x’yz’ ] Product of sums [ex: F2 = x(y’ + z)(x’ + y + z’) ]

Non-Standard Forms Neither in sum of products nor in product of sums. F3= (AB+CD)(A’B’+C’D’) It can be changed to a standard form by using the distributive law to remove the parentheses: F3= (A’B’CD)+(ABC’D’)

Other Logic Operation There are 22^n functions for n binary variables. For 2 variables, there are 16 functions as shown below We can assign special operator symbols for each function. They can still be expressed by AND, OR, NOT Except the exclusive-OR, those new symbol are not commonly used by digital designers

Other Logic Operation

Digital Logic Gates Considerations for constructing other logic gates: The feasibility and economy of producing the gate with physical components The possibility of extending to more than two inputs The basic properties (commutativity, associativity, …) The ability to implement Boolean functions In the 16 functions defined in Table (slide 41): Two are equal to a constant and four are repeated twice Two (inhibition and implication) are not commutative or associative The other eight are used as standard gates

Digital Logic Gates

Digital Logic Gates

Extension to Multiple Inputs A gate can be extended to have multiple inputs if the binary operation it represents is commutative and associative. The standard gates, except the inverter and buffer, can be extended to have more than two inputs The AND and OR operations posses these two properties X+Y = Y+X (commutative) (X+Y)+Z = X+(Y+Z) = X+Y+Z (associative) Can be extended to more than two inputs

Extension to Multiple Inputs The NAND and NOR functions are commutative but not associative (x ↓ y) ↓ z = [(x + y)’ + z]’ = (x + y)z’ = xz’ + yz’ x ↓ (y ↓ z) = [x + (y + z)’]’ = x’(y + z) = x’y + x’z

Extension to Multiple Inputs Therefore, the multiple-input NOR (or NAND) gate as a complemented OR (or AND) gate x ↓ y ↓ z = (x+y+z)’ x ↑ y ↑ z = (xyz)’

Extension to Multiple Inputs Exclusive-OR (XOR) and equivalence (XNOR) gates are both commutative and associative. Can be extended to more than two inputs The exclusive-OR is an odd function, i.e., it is equal to 1 if the input variables have an odd number of 1’s. The equivalence function is an even function, i.e., it is equal to 1 if the input variables have an even number of 0’s.

Extension to Multiple Inputs