ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 4 Dr. Shi Dept. of Electrical and Computer Engineering.

Slides:



Advertisements
Similar presentations
Boolean Algebra and Logic Gates
Advertisements

Chapter 2 Logic Circuits.
Boolean Algebra and Logic Gates 1 Computer Engineering (Logic Circuits) Lec. # 4 Dr. Tamer Samy Gaafar Dept. of Computer & Systems Engineering Faculty.
ENGIN112 L4: Number Codes and Registers ENGIN 112 Intro to Electrical and Computer Engineering Lecture 4 Number Codes and Registers.
ECE 331 – Digital System Design Boolean Algebra (Lecture #3) The slides included herein were taken from the materials accompanying Fundamentals of Logic.
CS 151 Digital Systems Design Lecture 7 More Logic Functions: NAND, NOR, XOR.
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.
CS 151 Digital Systems Design Lecture 4 Number Codes and Registers.
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.
ENGIN112 L5: Boolean Algebra September 12, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 5 Boolean Algebra.
Chapter Two Boolean Algebra and Logic Gate
Boolean Algebra and Logic Simplification
Chapter 2: Boolean Algebra and Logic Functions
CHAPTER 2 Boolean Algebra
Logic Design CS221 1 st Term Boolean Algebra Cairo University Faculty of Computers and Information.
BOOLEAN ALGEBRA Saras M. Srivastava PGT (Computer Science)
Boolean Algebra and Digital Circuits
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.
ECE 331 – Digital System Design
 Seattle Pacific University EE Logic System DesignSOP-POS-1 The Connection: Truth Tables to Functions abcF abcF
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.
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.
Boolean Algebra Introduction Logical arguments are valid (or not) by virtue of their form, not content Example All men are mortal(premise 1) Harry is a.
LOGIC GATES & BOOLEAN ALGEBRA
Based on slides by:Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. ECE/CS 352: Digital System Fundamentals Lecture 6 – Canonical Forms.
1 BOOLEAN ALGEBRA Basic mathematics for the study of logic design is Boolean Algebra Basic laws of Boolean Algebra will be implemented as switching devices.
Digital Logic Design Week 4 Boolean algebra. Laws and rules De Morgan’s theorem Analysis of logic circuits Standard forms Project 1 preparation.
Chap 2. Combinational Logic Circuits
ENGIN112 L6: More Boolean Algebra September 15, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 6 More Boolean Algebra A B.
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 
© BYU 03 BA1 Page 1 ECEn 224 Boolean Algebra – Part 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.
BOOLEAN ALGEBRA – Digital Circuit 1 Choopan Rattanapoka.
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
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.
DE MORGAN’S THEOREM. De Morgan’s Theorem De Morgan’s Theorem.
Fuw-Yi Yang1 數位系統 Digital Systems Department of Computer Science and Information Engineering, Chaoyang University of Technology 朝陽科技大學資工系 Speaker: Fuw-Yi.
CHAPTER 2 Boolean algebra and Logic gates
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
CHAPTER 2 Boolean Algebra This chapter in the book includes:
Princess Sumaya University
Boolean Algebra – Part 1 ECEn 224.
Give qualifications of instructors: DAP
SLIDES FOR CHAPTER 2 BOOLEAN ALGEBRA
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.
FIGURES FOR CHAPTER 2 BOOLEAN ALGEBRA
ECE 331 – Digital System Design
Speaker: Fuw-Yi Yang 楊伏夷 伏夷非征番, 道德經 察政章(Chapter 58) 伏者潛藏也
17-Nov-18 Logic Algebra 1 Combinational logic.
Boolean Algebra.
Boolean Algebra.
Chapter 2 Boolean Algebra and Logic Gate
Functions Computers take inputs and produce outputs, just like functions in math! Mathematical functions can be expressed in two ways: We can represent.
Digital Systems Design
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION Part (a)
COMS 361 Computer Organization
Presentation transcript:

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 4 Dr. Shi Dept. of Electrical and Computer Engineering

Boolean Algebra

 A Boolean algebra is defined with:  A set of elements S={0,1}  A set of operators +, *  A number of axioms or postulates

Definition of Boolean Algebra 3. The operations * and + are commutative: a + b = b + a a · b = b · a 4. The operator * is distributive over + The operation + is distributive over * a · ( b + c ) = ( a · b ) + ( a · c ) a + ( b · c ) = ( a + b ) · ( a + c )

Associative Law  Operators * and + are associative  a + (b + c) = (a + b) + c  a · (b · c) = (a · b) · c  The associative law can be derived from the postulates

Comparison with ordinary algebra  The distributive law of + over * is not valid for regular algebra a + ( b * c ) = ( a + b ) * ( a + c )  Boolean algebra does not have additive or multiplicative inverses; therefore there are no subtraction or division operations

Truth Tables x · yx + y x’

Duality  The principle of duality is an important concept.  It says that if an expression is valid in Boolean algebra, the dual of that expression is also valid.  To form the dual of an expression, replace all + operators with * operators, all * operators with + operators, all ones with zeros, and all zeros with ones.

Duality  Example 1  Given equation a + (b * c) = (a + b) * (a + c)  The dual is as follows: a * (b + c) = (a* b) + (a * c)  Example 2  Given equation a + 1 = 1  The dual is as follows a * 0 = 0

DeMorgan’s Theorem  A key theorem in simplifying Boolean algebra expression is DeMorgan’s Theorem. It states: (a + b)’ = a’b’(ab)’ = a’ + b’  Complement the expression a(b + z(x + a’)) and simplify. (a(b+z(x + a’)))’ = a’ + (b + z(x + a’))’ = a’ + b’(z(x + a’))’ = a’ + b’(z’ + (x + a’)’) = a’ + b’(z’ + x’a’’) = a’ + b’(z’ + x’a)

Theorem 1(a)  This theorem states: x+x= x  Proof:

Theorem 1(b)  This theorem states: x · x= x  Proof:

Theorem 2(a)  This theorem states: x +1= 1  Proof:

Theorem 2(b)  This theorem states: x · 0= 0  Proof (hint - use the duality property):

Hard One  Prove: x y + x’z= xy + yz + x’z

CIRCUIT REPRESENTATIONS

Overview  Expressing Boolean functions  Relationships between algebraic equations, symbols, and truth tables  Simplification of Boolean expressions  Minterms and Maxterms  AND-OR representations  Product of sums  Sum of products

Boolean Functions  Boolean algebra deals with binary variables and logic operations.  Function results in binary 0 or 1 x x y y z z F F F = x(y+z’) x y z z’ y+z’ F = x(y+z’)

Boolean Functions x x y y z z xy 0 1 x y z G = xy +yz yz xy We will learn how to transition between equation, symbols, and truth table. yz G G

Representation Conversion  Need to transition between Boolean expression, truth table, and circuit (symbols). Truth Table Circuit Boolean Expression

Truth Table to Expression  Converting a truth table to an expression  Each row with output of 1 becomes a product term  Sum product terms together. x x y y z z G G xyz + xyz’ + x’yz Any Boolean Expression can be represented in sum of products form!

Equivalent Representations of Circuits  All three formats are equivalent  Number of 1’s in truth table output column equals AND terms for Sum-of-Products (SOP) x y z x x y y z z G G G = xyz + xyz’ + x’yz G x x x x x x x x x

Reducing Boolean Expressions  Is this the smallest possible implementation of this expression? No!  Use Boolean Algebra rules to reduce complexity while preserving functionality.  Step 1: Use Theorem 1 (a + a = a)  So xyz + xyz’ + x’yz = xyz + xyz + xyz’ + x’yz  Step 2: Use distributive rule a(b + c) = ab + ac  So xyz + xyz + xyz’ + x’yz = xy(z + z’) + yz(x + x’)  Step 3: Use Postulate 3 (a + a’ = 1)  So xy(z + z’) + yz(x + x’) = xy · 1 + yz · 1  Step 4: Use Postulate 2 (a · 1 = a)  So xy · 1 + yz · 1 = xy + yz = xyz + xyz’ + x’yz G = xyz + xyz’ + x’yz

Reduced Hardware Implementation  Reduced equation requires less hardware!  Same function implemented! x y z x x y y z z G G G = xyz + xyz’ + x’yz = xy + yz G x x x x

Minterms and Maxterms  Each variable in a Boolean expression is a literal  Boolean variables can appear in normal (x) or complement form (x’)  Each AND combination of terms is a minterm  Each OR combination of terms is a maxterm For example: Minterms x y z Minterm x’y’z’ m x’y’z m 1 … xy’z’ m 4 … xyz m 7 For example: Maxterms x y z Maxterm x+y+z M x+y+z’ M 1 … x’+y+z M 4 … x’+y’+z’ M 7

Representing Functions with Minterms  Minterm number same as row position in truth table (starting from top from 0)  Shorthand way to represent functions x x y y z z G G G = xyz + xyz’ + x’yz G = m 7 + m 6 + m 3 = Σ(3, 6, 7)

Complementing Functions  Minterm number same as row position in truth table (starting from top from 0)  Shorthand way to represent functions x x y y z z G G G = xyz + xyz’ + x’yz G’ = (xyz + xyz’ + x’yz)’ = G’ Can we find a simpler representation?

Complementing Functions Step 1: assign temporary names  b + c  z  (a + z)’ = G’  Step 2: Use DeMorgans’ Law  (a + z)’ = a’ · z’  Step 3: Resubstitute (b+c) for z  a’ · z’ = a’ · (b + c)’  Step 4: Use DeMorgans’ Law  a’ · (b + c)’ = a’ · (b’ · c’)  Step 5: Associative rule  a’ · (b’ · c’) = a’ · b’ · c’ G’ = (a + b + c)’ G = a + b + c G’ = a’ · b’ · c’ = a’b’c’ G = a + b + c

Complementation Example  Find complement of F = x’z + yz  F’ = (x’z + yz)’  DeMorgan’s  F’ = (x’z)’ (yz)’  DeMorgan’s  F’ = (x’’+z’)(y’+z’)  Reduction -> eliminate double negation on x  F’ = (x+z’)(y’+z’) This format is called product of sums

Conversion Between Canonical Forms  Easy to convert between minterm and maxterm representations  For maxterm representation, select rows with 0’s x x y y z z G G G = xyz + xyz’ + x’yz G = m 7 + m 6 + m 3 = Σ(3, 6, 7) G = M 0 M 1 M 2 M 4 M 5 = Π(0,1,2,4,5) G = (x+y+z)(x+y+z’)(x+y’+z)(x’+y+z)(x’+y+z’)

Representation of Circuits  All logic expressions can be represented in 2-level format  Circuits can be reduced to minimal 2-level representation  Sum of products representation most common in industry.

Venn Diagrams

Venn Diagram: A+B

Venn Diagram: A.B

Containment

Venn Diagram: A’B

Venn Diagram: A+B’

Venn Diagram: (A+B’)’ = A’.B

Venn Diagram: A’+B’ =?

Venn Diagram: A’+B’ = (AB)’

Venn Diagram: 3 Variables

Summary  Truth table, circuit, and boolean expression formats are equivalent  Easy to translate truth table to SOP and POS representation  Boolean algebra rules can be used to reduce circuit size while maintaining function  Venn Diagrams can be used to represent Boolean expressions.  All logic functions can be made from AND, OR, and NOT

Codes

Binary Coded Decimal  Binary coded decimal (BCD) represents each decimal digit with four bits  Ex· =  This is NOT the same as  Why do this? Because people think in decimal. Digit BCD Code Digit BCD Code

Putting It All Together °BCD not very efficient. °Used in early computers (40s, 50s). °Used to encode numbers for seven- segment displays. °Easier to read?

Gray Code  Gray code is not a number system.  It is an alternate way to represent four bit data  Only one bit changes from one decimal digit to the next  Useful for reducing errors in communication.  Can be scaled to larger numbers. DigitBinary Gray Code

ASCII Code  American Standard Code for Information Interchange  ASCII is a 7-bit code, frequently used with an 8 th bit for error detection. CharacterASCII (bin) ASCII (hex) DecimalOctal A B C … Z a … 1 ‘

ASCII Codes and Data Transmission °ASCII Codes °A – Z (26 codes), a – z (26 codes) °0-9 (10 codes), others