Binary Logic and Gates Boolean Algebra Canonical and Standard Forms Chapter 2: Boolean Algebra and Logic Gates.

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.
Chapter 2 – Combinational Logic Circuits Part 1 – Gate Circuits and Boolean Equations Logic and Computer Design Fundamentals.
Overview Part 1 – Gate Circuits and Boolean Equations
CS 151 Digital Systems Design Lecture 6 More Boolean Algebra A B.
SYEN 3330 Digital SystemsJung H. Kim Chapter SYEN 3330 Digital Systems Chapter 2 -Part 2.
Boolean Algebra and Logic Gates
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Edited by Dr. Muhamed Mudawar for COE 202 & EE 200 at KFUPM) Boolean Algebra and Logic Gates.
CSCE 211: Digital Logic Design
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 2 – Combinational Logic Circuits Part 1.
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.
Gate Circuits and Boolean Equations BIL- 223 Logic Circuit Design Ege University Department of Computer Engineering.
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.
Boolean Algebra and Logic Gates 1 Computer Engineering (Logic Circuits) Lec. # 3 Dr. Tamer Samy Gaafar Dept. of Computer & Systems Engineering Faculty.
Binary Logic and Gates Binary variables take on one of two values.
Boolean Algebra and Digital Circuits
1 Representation of Logic Circuits EE 208 – Logic Design Chapter 2 Sohaib Majzoub.
Chapter 2: Boolean Algebra and Logic Gates. F 1 = XY’ + X’Z XYZX’Y’XY’X’ZF1F
Overview Part 1 – Gate Circuits and Boolean Equations
Chapter 4 Combinational Logic Design Principles. Overview Objectives -Define combinational logic circuit -Analysis of logic circuits (to describe what.
CHAPTER 3: PRINCIPLES OF COMBINATIONAL LOGIC
Boolean Algebra and Logic Gates
ENGIN112 L6: More Boolean Algebra September 15, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 6 More Boolean Algebra A B.
Based on slides by:Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use ECE/CS.
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.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 2 – Combinational Logic Circuits Part 1.
Boolean Algebra and Logic Gates CSE-1108 Ahsanullah University of Science and Technology (AUST)
Boolean Algebra & Logic Circuits Dr. Ahmed El-Bialy Dr. Sahar Fawzy.
CS151 Introduction to Digital Design Chapter 2: Combinational Logic Circuits Lecture 5: Binary Logic and 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.
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 =
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 4 Dr. Shi Dept. of Electrical and Computer Engineering.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 2 – Combinational Logic Circuits Part 1.
ECE DIGITAL LOGIC LECTURE 8: BOOLEAN FUNCTIONS Assistant Prof. Fareena Saqib Florida Institute of Technology Spring 2016, 02/11/2016.
Boolean Algebra. BOOLEAN ALGEBRA Formal logic: In formal logic, a statement (proposition) is a declarative sentence that is either true(1) or false (0).
Lecture 5 More Boolean Algebra A B. Overview °Expressing Boolean functions °Relationships between algebraic equations, symbols, and truth tables °Simplification.
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
ECE 301 – Digital Electronics
Chapter 2: Boolean Algebra and Logic Functions
Overview Part 1 – Gate Circuits and Boolean Equations
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
Complement of a Function
Gate & Circuit Design.
CHAPTER 2 Boolean Algebra This chapter in the book includes:
Overview Part 1 – Gate Circuits and Boolean Equations
Princess Sumaya University
Speaker: Fuw-Yi Yang 楊伏夷 伏夷非征番, 道德經 察政章(Chapter 58) 伏者潛藏也
ECE/CS 352 Digital Systems Fundamentals
17-Nov-18 Logic Algebra 1 Combinational logic.
Boolean Algebra.
Boolean Algebra.
Lecture 14: Boolean Algebra
Chapter 2 Boolean Algebra and Logic Gate
2. Boolean Algebra and Logic Gates
Digital Logic Chapter-2
Introductory Concepts
Chapter 4 Combinational Logic Design Principles. Overview Objectives -Define combinational logic circuit -Analysis of logic circuits (to describe what.
Lecture 4 – Binary Logic and Logic Gates
Presentation transcript:

Binary Logic and Gates Boolean Algebra Canonical and Standard Forms Chapter 2: Boolean Algebra and Logic Gates

Chapter 2 - Part 1 2 Binary Logic and Gates  Binary variables take on one of two values.  Logical operators operate on binary values and binary variables.  Basic logical operators are the logic functions AND, OR and NOT.  Logic gates implement logic functions.  Boolean Algebra: a useful mathematical system for specifying and transforming logic functions.  We study Boolean algebra as foundation for designing and analyzing digital systems!

Chapter 2 - Part 1 3 Binary Variables  Recall that the two binary values have different names: True/False On/Off Yes/No 1/0  We use 1 and 0 to denote the two values.  Variable identifier examples: A, B, y, z, or X 1 for now RESET, START_IT, or ADD1 later

Chapter 2 - Part 1 4 Logical Operations  The three basic logical operations are: AND OR NOT  AND is denoted by a dot (·).  OR is denoted by a plus (+).  NOT is denoted by an overbar ( ¯ ), a single quote mark (') after, or (~) before the variable.

Chapter 2 - Part 1 5  Examples: is read “Y is equal to A AND B.” is read “z is equal to x OR y.” is read “X is equal to NOT A.” Notation Examples  Note: The statement: = 2 (read “one plus one equals two”) is not the same as = 1 (read “1 or 1 equals 1”).  BAY  yxz   AX 

Chapter 2 - Part 1 6 Operator Definitions  Operations are defined on the values "0" and "1" for each operator: AND 0 · 0 = 0 0 · 1 = 0 1 · 0 = 0 1 · 1 = 1 OR = = = = 1 NOT 10  01 

Chapter 2 - Part X NOT XZ  Truth Tables  Truth table  a tabular listing of the values of a function for all possible combinations of values on its arguments  Example: Truth tables for the basic logic operations: Z = X·Y YX AND OR XYZ = X+Y

Chapter 2 - Part 1 8  Using Switches For inputs:  logic 1 is switch closed  logic 0 is switch open For outputs:  logic 1 is light on  logic 0 is light off. NOT uses a switch such that:  logic 1 is switch open  logic 0 is switch closed Logic Function Implementation Switches in series => AND Switches in parallel => OR C Normally-closed switch => NOT

Chapter 2 - Part 1 9  Example: Logic Using Switches  Light is on (L = 1) for L(A, B, C, D) = and off (L = 0), otherwise.  Useful model for relay circuits and for CMOS gate circuits, the foundation of current digital logic technology Logic Function Implementation (Continued) B A D C

Chapter 2 - Part 1 10 Logic Gates  In the earliest computers, switches were opened and closed by magnetic fields produced by energizing coils in relays. The switches in turn opened and closed the current paths.  Later, vacuum tubes that open and close current paths electronically replaced relays.  Today, transistors are used as electronic switches that open and close current paths.

Chapter 2 - Part 1 11 Logic Gates (continued)  Implementation of logic gates with transistors (See Reading Supplement  CMOS Circuits)  Transistor or tube implementations of logic functions are called logic gates or just gates  Transistor gate circuits can be modeled by switch circuits

Chapter 2 - Part 1 12 Logic Gate Symbols and Behavior  Logic gates have special symbols:  And waveform behavior in time as follows :

Chapter 2 - Part 1 13 Logic Diagrams and Expressions  Boolean equations, truth tables and logic diagrams describe the same function!  Truth tables are unique; expressions and logic diagrams are not. This gives flexibility in implementing functions. X Y F Z Logic Diagram Equation ZY X F  Truth Table X Y Z Z Y X F   

Chapter 2 - Part Commutative Associative Distributive DeMorgan’s X. 1 X = X. 00 = X. XX = 0 = Boolean Algebra  An algebraic structure defined on a set of at least two elements, B, together with three binary operators (denoted +, · and ) that satisfies the following basic identities: X + YY + X = (X + Y)Z + X + (YZ)Z) += X(Y + Z) Z)XYXZ += X + YX. Y = XYYX = (XY)ZX(YX(YZ)Z) = X+ YZ(X + Y)(X + Z)= X. YX + Y = X + 0 X = + X 11 = X + XX = 1 = X = X

Chapter 2 - Part 1 15  The identities above are organized into pairs. These pairs have names as follows: 1-4 Existence of 0 and Idempotence 7-8 Existence of complement 9 Involution Commutative Laws Associative Laws Distributive Laws DeMorgan’s Laws  If the meaning is unambiguous, we leave out the symbol “·” Some Properties of Identities & the Algebra  The dual of an algebraic expression is obtained by interchanging + and · and interchanging 0’s and 1’s.  The identities appear in dual pairs. When there is only one identity on a line the identity is self-dual, i. e., the dual expression = the original expression.

Chapter 2 - Part 1 16  Unless it happens to be self-dual, the dual of an expression does not equal the expression itself.  Example: F = (A + C) · B + 0 dual F = (A · C + B) · 1 = A · C + B  Example: G = X · Y + (W + Z) dual G =  Example: H = A · B + A · C + B · C dual H =  Are any of these functions self-dual? Some Properties of Identities & the Algebra (Continued)

Chapter 2 - Part 1 17  There can be more that 2 elements in B, i. e., elements other than 1 and 0. What are some common useful Boolean algebras with more than 2 elements?  If B contains only 1 and 0, then B is called the switching algebra which is the algebra we use most often. Some Properties of Identities & the Algebra (Continued) Algebra of Sets Algebra of n-bit binary vectors

Chapter 2 - Part 1 18 Boolean Operator Precedence  The order of evaluation in a Boolean expression is: 1.Parentheses 2.NOT 3.AND 4.OR  Consequence: Parentheses appear around OR expressions  Example: F = A(B + C)(C + D)

Chapter 2 - Part 1 19 Example 1: Boolean Algebraic Proof  A + A·B = A (Absorption Theorem) Proof Steps Justification (identity or theorem) A + A·B =A · 1 + A · B X = X · 1 = A · ( 1 + B) X · Y + X · Z = X ·(Y + Z)(Distributive Law) = A · X = 1 = A X · 1 = X  Our primary reason for doing proofs is to learn: Careful and efficient use of the identities and theorems of Boolean algebra, and How to choose the appropriate identity or theorem to apply to make forward progress, irrespective of the application.

Chapter 2 - Part 1 20  AB + AC + BC = AB + AC (Consensus Theorem) Proof Steps Justification (identity or theorem) AB + AC + BC = AB + AC + 1 · BC ? = AB +AC + (A + A) · BC ? = Example 2: Boolean Algebraic Proofs

Chapter 2 - Part 1 21 Example 3: Boolean Algebraic Proofs  Proof Steps Justification (identity or theorem) = YXZ)YX(  )ZX(XZ)YX(  YY

Chapter 2 - Part 1 22 xy  y           Useful Theorems   ninimizatioMyyyxyyyx     tionSimplifica yxyxyxyx       Consensuszyxzyzyx              zyxzyzyx  Laws sDeMorgan'xx   xx x x xx xx yx  y

Chapter 2 - Part 1 23 Proof of Simplification   yyyxyyyx  x  x

Chapter 2 - Part 1 24 Proof of DeMorgan’s Laws  yxx  y  yx  yx  

Chapter 2 - Part 1 25 Boolean Function Evaluation z x yx F4 x z yx zyx F3 x F2 xy F1     z yz  y 

Chapter 2 - Part 1 26 Expression Simplification  An application of Boolean algebra  Simplify to contain the smallest number of literals (complemented and uncomplemented variables): = AB + ABCD + A C D + A C D + A B D = AB + AB(CD) + A C (D + D) + A B D = AB + A C + A B D = B(A + AD) +AC = B (A + D) + A C 5 literals  DCBADCADBADCABA

2- 27 Complement of a Function 1. Use DeMorgan's Theorem :Interchange AND and OR operators 2.Complement each constant value and literal  generalizations (A+B+C+... +F)' = A'B'C'... F' (ABC... F)' = A'+ B'+C'+... +F'

Chapter 2 - Part 1 28 Complementing Functions (A+B+C)' = (A+X)'let B+C = X = A'X' by DeMorgan's = A'(B+C)' = A'(B'C') by DeMorgan's = A'B'C' associative  Example: Complement F = F = (x + y + z)(x + y + z)  Example: Complement G = (a + bc)d + e G = x  zyzyx

2- 29 Canonical and Standard Forms  Minterms and Maxterms A minterm: an AND term consists of all literals in their normal form or in their complement form For example, two binary variables x and y,  xy, xy', x'y, x'y' It is also called a standard product n variables can be combined to form 2 n minterms A maxterm: an OR term It is also call a standard sum 2 n maxterms

2- 30 each maxterm is the complement of its corresponding minterm, and vice versa

2- 31  An Boolean function can be expressed by a truth table sum of minterms f 1 = x'y'z + xy'z' + xyz = m 1 + m 4 +m 7 f 2 = x'yz+ xy'z + xyz'+xyz = m 3 + m 5 +m 6 + m 7

2- 32  The complement of a Boolean function the minterms that produce a 0 f 1 ' = m 0 + m 2 +m 3 + m 5 + m 6 = x'y'z'+x'yz'+x'yz+xy'z+xyz' f 1 = (f 1 ')' = (x+y+z)(x+y'+z) (x+y'+z') (x'+y+z')(x'+y'+z)= M 0 M 2 M 3 M 5 M 6 Any Boolean function can be expressed as  a sum of minterms  a product of maxterms  canonical form

2- 33  Sum of minterms F = A+B'C = A (B+B') + B'C = AB +AB' + B'C = AB(C+C') + AB'(C+C') + (A+A')B'C =ABC+ABC'+AB'C+AB'C'+A'B'C F = A'B'C +AB'C' +AB'C+ABC'+ ABC = m 1 + m 4 +m 5 + m 6 + m 7 F(A,B,C) =  (1, 4, 5, 6, 7) or, built the truth table first

2- 34  Product of maxterms x + yz = (x + y)(x + z) = (x+y+zz')(x+z+yy') =(x+y+z)(x+y+z’)(x+y'+z) F = xy + x'z = (xy + x') (xy +z) = (x+x')(y+x')(x+z)(y+z) = (x'+y)(x+z)(y+z) x'+y = x' + y + zz' = (x'+y+z)(x'+y+z') F = (x+y+z)(x+y'+z)(x'+y+z)(x'+y+z') = M 0 M 2 M 4 M 5 F(x,y,z) =  (0,2,4,5)

2- 35  Conversion between Canonical Forms F(A,B,C) =  (1,4,5,6,7) F'(A,B,C) =  (0,2,3) By DeMorgan's theorem F(A,B,C) =  (0,2,3) m j ' = M j sum of minterms = product of maxterms interchange the symbols  and  and list those numbers missing from the original form  of 1's  of 0's

2- 36  Example F = xy + xz F(x, y, z) =  (1, 3, 6, 7) F(x, y, z) =  (0, 2, 4, 6)

2- 37  Standard Forms Canonical forms are seldom used sum of products F 1 = y' + zy+ x'yz' product of sums F 2 = x(y'+z)(x'+y+z'+w) F 3 = A'B'CD+ABC'D'

2- 38  Two-level implementation  Multi-level implementation

2- 39 Other Logic Operations  2 n rows in the truth table of n binary variables  2 2 n functions for n binary variables  16 functions of two binary variables

2- 40