Binary Logic and Gates Binary variables take on one of two values.

Slides:



Advertisements
Similar presentations
Boolean Algebra and Logic Gates
Advertisements

CS 151 Digital Systems Design Lecture 5 Boolean Algebra.
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.
ECE 331 – Digital System Design Boolean Algebra (Lecture #3) The slides included herein were taken from the materials accompanying Fundamentals of Logic.
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
SYEN 3330 Digital SystemsJung H. Kim Chapter SYEN 3330 Digital Systems Chapter 2 -Part 2.
1 Section 10.1 Boolean Functions. 2 Computers & Boolean Algebra Circuits in computers have inputs whose values are either 0 or 1 Mathematician George.
ENGIN112 L5: Boolean Algebra September 12, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 5 Boolean Algebra.
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 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 Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2009.
Boolean Algebra Boolean algebra Boolean algebra, like any other deductive mathematical system, may be defined with –a set of elements, –a set of operators,
Boolean Algebra and Logic Gates 1 Computer Engineering (Logic Circuits) Lec. # 3 Dr. Tamer Samy Gaafar Dept. of Computer & Systems Engineering Faculty.
Boolean Algebra and Digital Circuits
1 Representation of Logic Circuits EE 208 – Logic Design Chapter 2 Sohaib Majzoub.
Combinational Logic 1.
Overview Part 1 – Gate Circuits and Boolean Equations
KFUPM COE 202: Digital Logic Design Combinational Logic Part 1 Courtesy of Dr. Ahmad Almulhem.
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.
Figure 2.6. A truth table for the AND and OR operations. 2.3 Truth Tables 1.
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.
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.
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.
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)
Binary Logic and Gates Boolean Algebra Canonical and Standard Forms Chapter 2: Boolean Algebra and Logic Gates.
CS151 Introduction to Digital Design Chapter 2: Combinational Logic Circuits Lecture 5: Binary Logic and Gates.
Chapter-3: BOOLEAN ALGEBRA & LOGIC GATES Analysis and logical design.
Module –I Boolean Algebra Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.
R. Johnsonbaugh Discrete Mathematics 5 th edition, 2001 Chapter 9 Boolean Algebras and Combinatorial Circuits.
Ahmad Almulhem, KFUPM 2009 COE 202: Digital Logic Design Combinational Logic Part 1 Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
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).
CHAPTER 2 Boolean algebra and Logic gates
ECE 301 – Digital Electronics
Boolean Algebra.
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)
Logic Gates and Boolean Algebra
CS 105 Digital Logic Design
Gate Circuits and Boolean Equations
CHAPTER 2 Boolean Algebra
Gate & Circuit Design.
CHAPTER 2 Boolean Algebra This chapter in the book includes:
Overview Part 1 – Gate Circuits and Boolean Equations
Boolean Algebra – Part 1 ECEn 224.
SLIDES FOR CHAPTER 2 BOOLEAN ALGEBRA
FIGURES FOR CHAPTER 2 BOOLEAN ALGEBRA
Speaker: Fuw-Yi Yang 楊伏夷 伏夷非征番, 道德經 察政章(Chapter 58) 伏者潛藏也
ECE/CS 352 Digital Systems Fundamentals
Lecture 3: Boolean Algebra
CHAPTER 2 Boolean Algebra
Boolean Algebra.
Boolean Algebra.
Boolean Algebra & Logic Circuits
Chapter 2 Boolean Algebra and Logic Gate
COE 202: Digital Logic Design Combinational Logic Part 1
Introductory Concepts
Lecture 4 – Binary Logic and Logic Gates
Presentation transcript:

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 a foundation for designing and analyzing digital systems!

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 X1 for now RESET, START_IT, or ADD1 later

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.

Notation Examples Examples: Note: The statement: is not the same as 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.” Y = A × B y x z + = A X Note: The statement: 1 + 1 = 2 (read “one plus one equals two”) is not the same as 1 + 1 = 1 (read “1 or 1 equals 1”).

Operator Definitions 0 · 0 = 0 0 + 0 = 0 = 1 0 · 1 = 0 0 + 1 = 1 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 0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 1 NOT 1 =

Truth Tables 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: 1 Z = X·Y Y X AND OR X Y Z = X+Y 1 1 X NOT Z =

Truth Tables – Cont’d Used to evaluate any logic function Consider F(X, Y, Z) = X Y + Y Z X Y Z X Y Y Z F = X Y + Y Z 1

Logic Function Implementation Using Switches Inputs: logic 1 is switch closed logic 0 is switch open Outputs: logic 1 is light on logic 0 is light off. NOT input: logic 1 is switch open logic 0 is switch closed Switches in parallel => OR Switches in series => AND C Normally-closed switch => NOT

Logic Function Implementation – cont’d Example: Logic Using Switches Light is on (L = 1) for L(A, B, C, D) = and off (L = 0), otherwise. Useful model for relay and CMOS gate circuits, the foundation of current digital logic circuits B C A D A (B C + D) = A B C + A D

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.

Logic Gate Symbols and Behavior Logic gates have special symbols: And waveform behavior in time as follows: OR gate X Y Z = + · AND gate NOT gate or inverter X 1 Y · (AND) + (OR) (NOT)

Logic Diagrams and Expressions Truth Table 1 1 1 1 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 0 0 1 0 0 0 X Y Z Z Y X F × + = Logic Equation Z Y X F + = X Y F Z Logic Diagram Boolean equations, truth tables and logic diagrams describe the same function! Truth tables are unique, but expressions and logic diagrams are not. This gives flexibility in implementing functions.

Boolean Algebra Invented by George Boole in 1854 An algebraic structure defined by a set B = {0, 1}, together with two binary operators (+ and ·) and a unary operator ( ) Identity element 1. 3. 5. 7. 9. X + 0 = + 1 X + X X = X 2. 4. 6. 8. X . 1 = . 0 X . X Idempotence Complement Involution 10. 12. 14. 16. X + Y Y + X = (X + Y) Z + X + (Y Z) X(Y + XY XZ X . Y 11. 13. 15. 17. XY YX = (XY) Z X(Y Z) X + YZ (X + Y) (X + Z) X . Y X + Y Commutative Associative Distributive DeMorgan ’ s

Some Properties of Boolean Algebra Boolean Algebra is defined in general by a set B that can have more than two values A two-valued Boolean algebra is also know as Switching Algebra. The Boolean set B is restricted to 0 and 1. Switching circuits can be represented by this 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. Sometimes, the dot symbol ‘’ (AND operator) is not written when the meaning is clear

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

Boolean Algebraic Proof – Example 1 A + A · B = A (Absorption Theorem) Proof Steps Justification A + A · B = A · 1 + A · B Identity element: A · 1 = A = A · ( 1 + B) Distributive = A · 1 1 + B = 1 = A Identity element 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.

Boolean Algebraic Proof – Example 2 AB + AC + BC = AB + AC (Consensus Theorem) Proof Steps Justification = AB + AC + BC = AB + AC + 1 · BC Identity element = AB + AC + (A + A) · BC Complement = AB + AC + ABC + ABC Distributive = AB + ABC + AC + ACB Commutative = AB · 1 + ABC + AC · 1 + ACB Identity element = AB (1+C) + AC (1 + B) Distributive = AB . 1 + AC . 1 1+X = 1 = AB + AC Identity element

Useful Theorems Minimization X Y + X Y = Y Absorption X + X Y = X Simplification X + X Y = X + Y DeMorgan’s X + Y = X · Y Minimization (dual) (X+Y)(X+Y) = Y Absorption (dual) X · (X + Y) = X Simplification (dual) X · (X + Y) = X · Y DeMorgan’s (dual) X · Y = X + Y

Truth Table to Verify DeMorgan’s X + Y = X · Y X · Y = X + Y X Y X·Y X+Y X · Y 1 Generalized DeMorgan’s Theorem: X1 + X2 + … + Xn = X1 · X2 · … · Xn X1 · X2 · … · Xn = X1 + X2 + … + Xn We can also use algebraic properties in doing this proof. We will show that, x’ . y’, satisfies the definition of the complement of (x + y), defined as (x + y)’ by DeMorgan’s Law. To show this we need to show that A + A’ = 1 and A.A’ = 0 with A = x + y and A’ = x’. y’. This proves that x’. y’ = (x + y)’. Part 1: Show x + y + x’. y’ = 1. x + y + x’. y’ = (x + y + x’) (x + y + y’) X + YZ = (X + Y)(X + Z) (Distributive Law) = (x + x’ + y) (x + y + y’) X + Y = Y + X (Commutative Law) = (1 + y)(x + 1) X + X’ = 1 = 1 . 1 1 + X = 1 = 1 1 . X = 1 Part 2: Show (x + y) . x’. y’ = 0. (x + y) . x’. y’ = (x . x’. y’ + y . x’. y’) X (Y + Z) = XY + XZ (Distributive Law) = (x . x’. y’ + y . y’ . x’) XY = YX (Commutative Law) = (0 . y’ + 0 . x’) X . X’ = 0 = (0 + 0) 0 . X = 0 = 0 X + 0 = X (With X = 0) Based on the above two parts, x’y’ = (x + y)’ The second DeMorgans’ law is proved by duality. Note that DeMorgan’s Law, given as an identity is not an axiom in the sense that it can be proved using the other identities.

Complementing Functions Use DeMorgan's Theorem: 1. Interchange AND and OR operators 2. Complement each constant and literal    Example: Complement F = F = (x + y + z)(x + y + z) Example: Complement G = (a + bc)d + e G = (a (b + c) + d) e x + z y G' = ((a (b' + c'))+ d ) e' = (a (b' + c') + d) e'

Expression Simplification An application of Boolean algebra Simplify to contain the smallest number of literals (variables that may or may not be complemented) = 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 (has only 5 literals) + D C B A