Binary Logic and Gates

Similar documents
Binary Logic and Gates. Our objective is to learn how to design digital circuits.

CS 121 Digital Logic Design. Chapter 2. Teacher Assistant. Hanin Abdulrahman

Chapter 2: Switching Algebra and Logic Circuits

Combinational Logic Design Principles

Boolean Algebra & Logic Gates. By : Ali Mustafa

Chapter 2 Boolean Algebra and Logic Gates

ENG2410 Digital Design Combinational Logic Circuits

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA

Logic Design. Chapter 2: Introduction to Logic Circuits

Digital Circuit And Logic Design I. Lecture 3

Chapter 2 Combinational Logic Circuits

Chapter-2 BOOLEAN ALGEBRA

Digital Logic Design. Malik Najmus Siraj

CHAPTER 3 BOOLEAN ALGEBRA

CHAPTER 2 BOOLEAN ALGEBRA

CHAPTER III BOOLEAN ALGEBRA

Unit 2 Boolean Algebra

MC9211 Computer Organization

Unit 2 Boolean Algebra

Chapter 2. Boolean Algebra and Logic Gates

Boolean Algebra CHAPTER 15

Chapter 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:

CHAPTER III BOOLEAN ALGEBRA

Chapter 2 Combinational Logic Circuits

E&CE 223 Digital Circuits & Systems. Lecture Transparencies (Boolean Algebra & Logic Gates) M. Sachdev

2. Associative Law: A binary operator * on a set S is said to be associated whenever (A*B)*C = A*(B*C) for all A,B,C S.

Boolean Algebra and Logic Gates

CprE 281: Digital Logic

INTRODUCTION TO INFORMATION & COMMUNICATION TECHNOLOGY LECTURE 8 : WEEK 8 CSC-110-T

E&CE 223 Digital Circuits & Systems. Lecture Transparencies (Boolean Algebra & Logic Gates) M. Sachdev. Section 2: Boolean Algebra & Logic Gates

Week-I. Combinational Logic & Circuits

Chapter 2 Boolean Algebra and Logic Gates

Chapter 2 Boolean Algebra and Logic Gates

ECE 238L Boolean Algebra - Part I

Lecture 3: Boolean Algebra

BOOLEAN ALGEBRA. Introduction. 1854: Logical algebra was published by George Boole known today as Boolean Algebra

Digital Logic (2) Boolean Algebra

EECS150 - Digital Design Lecture 4 - Boolean Algebra I (Representations of Combinational Logic Circuits)

Outline. EECS150 - Digital Design Lecture 4 - Boolean Algebra I (Representations of Combinational Logic Circuits) Combinational Logic (CL) Defined

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 2 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

Discrete Mathematics. CS204: Spring, Jong C. Park Computer Science Department KAIST

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA (CONT.)

Chapter 2: Princess Sumaya Univ. Computer Engineering Dept.

Number System conversions

Logic Gate Level. Part 2

BOOLEAN ALGEBRA TRUTH TABLE

EC-121 Digital Logic Design

ECE380 Digital Logic. Axioms of Boolean algebra

4 Switching Algebra 4.1 Axioms; Signals and Switching Algebra

Digital electronics form a class of circuitry where the ability of the electronics to process data is the primary focus.

Chapter 3. Boolean Algebra. (continued)

Contents. Chapter 2 Digital Circuits Page 1 of 30

UNIT 3 BOOLEAN ALGEBRA (CONT D)

BOOLEAN LOGIC. By- Neha Tyagi PGT CS KV 5 Jaipur II Shift, Jaipur Region. Based on CBSE curriculum Class 11. Neha Tyagi, KV 5 Jaipur II Shift

. T SHREE MAHAPRABHU PUBLIC SCHOOL & COLLEGE NOTES FOR BOARD EXAMINATION SUBJECT COMPUTER SCIENCE (Code: 083) Boolean Algebra

ECE 20B, Winter 2003 Introduction to Electrical Engineering, II LECTURE NOTES #2

Standard Expression Forms

Combinational Logic Fundamentals

Lecture 5: NAND, NOR and XOR Gates, Simplification of Algebraic Expressions

Boolean Algebra. Boolean Variables, Functions. NOT operation. AND operation. AND operation (cont). OR operation

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA

control in out in out Figure 1. Binary switch: (a) opened or off; (b) closed or on.

Chap 2. Combinational Logic Circuits

Standard & Canonical Forms

Boolean Algebra and Logic Gates Chapter 2. Topics. Boolean Algebra 9/21/10. EECE 256 Dr. Sidney Fels Steven Oldridge

Every time has a value associated with it, not just some times. A variable can take on any value within a range

Chapter 2 : Boolean Algebra and Logic Gates

CHAPTER1: Digital Logic Circuits Combination Circuits

II. COMBINATIONAL LOGIC DESIGN. - algebra defined on a set of 2 elements, {0, 1}, with binary operators multiply (AND), add (OR), and invert (NOT):

Review for Test 1 : Ch1 5

Chapter 2 Boolean Algebra and Logic Gates

INTRO TO I & CT. (Boolean Algebra and Logic Simplification.) Lecture # By: Department of CS & IT.

Systems I: Computer Organization and Architecture

Slide Set 3. for ENEL 353 Fall Steve Norman, PhD, PEng. Electrical & Computer Engineering Schulich School of Engineering University of Calgary

Combinational Logic. Fan-in/ Fan-out Timing. Copyright (c) 2012 Sean Key

Chapter 2 Combinational Logic Circuits

2009 Spring CS211 Digital Systems & Lab CHAPTER 2: INTRODUCTION TO LOGIC CIRCUITS

EEA051 - Digital Logic 數位邏輯 吳俊興高雄大學資訊工程學系. September 2004

2 Application of Boolean Algebra Theorems (15 Points - graded for completion only)

Switches: basic element of physical implementations

EEE130 Digital Electronics I Lecture #4

WEEK 2.1 BOOLEAN ALGEBRA

Boolean Algebra, Gates and Circuits

Signals and Systems Digital Logic System

CS61c: Representations of Combinational Logic Circuits

Lecture 6: Gate Level Minimization Syed M. Mahmud, Ph.D ECE Department Wayne State University

Lecture 2 Review on Digital Logic (Part 1)

Lecture 6: Manipulation of Algebraic Functions, Boolean Algebra, Karnaugh Maps

UC Berkeley College of Engineering, EECS Department CS61C: Representations of Combinational Logic Circuits

Digital Systems and Information Part II

Learning Objectives. Boolean Algebra. In this chapter you will learn about:

Lab 1 starts this week: go to your session

University of Technology

Boolean algebra. Examples of these individual laws of Boolean, rules and theorems for Boolean algebra are given in the following table.

1 Boolean Algebra Simplification

CS 226: Digital Logic Design

EECS150 - Digital Design Lecture 19 - Combinational Logic Circuits : A Deep Dive

COS 140: Foundations of Computer Science

Introduction to Digital Logic Missouri S&T University CPE 2210 Boolean Algebra

Transcription:

1 COE 202- Digital Logic Binary Logic and Gates Dr. Abdulaziz Y. Barnawi COE Department KFUPM

2 Outline Introduction Boolean Algebra Elements of Boolean Algebra (Binary Logic) Logic Operations & Logic Gates Logic Circuits and Boolean Expressions Operator Precedence Basic Identities of Boolean Algebra Duality Principle Algebraic Manipulation

3 Introduction Our objective is to learn how to design digital circuits These circuits use binary systems Signals in such binary systems may represent only one of 2 possible values 0 or 1 Physically, these signals are electrical voltage signals These signals may assume either a High or a Low voltage value The High voltage value typically equals the voltage of the power supply (e.g. 5 volts or 3.3 volts), and the Low voltage value is typically 0 volts (or Ground) When a signal is at the High voltage value, we say that the signal has a Logic 1 value When a signal is at the Low voltage value, we say that the signal has a Logic 0 value

4 Introduction - Digital Circuits Digital circuits process (or manipulate) input binary signals and produce the required output binary signals

5 Introduction - Digital Circuits Generally, the circuit will have a number of input signals (say n) as x 1, x 2,, x n, and a number of output signals (say m ) Z 1, Z 2,.., Z m The value assumed by the i th output signal Z i depends on the values of the input signals x 1, x 2,., x n In other words, we can say that Z i is a function of the n input signals x 1, x 2,., x n. Or we can write: Z i = F i (x 1, x 2,, x n ) for i = 1, 2, 3,., m The m output functions (F i ) are functions of binary signals and each produces a single binary output signal Thus, these functions are binary functions and require binary logic algebra for their derivation and manipulation

6 Boolean Algebra The binary system algebra is commonly referred to as Boolean Algebra after the mathematician George Boole The functions are known as Boolean functions while the binary signals are represented by Boolean variables To be able to design a digital circuit, we must learn how to derive the Boolean function implemented by this circuit Systems manipulating Binary Logic Signals are commonly referred to as Binary Logic systems Digital circuits implementing a particular Binary (Boolean) function are commonly known as Logic Circuits

7 Elements of Boolean Algebra (Binary Logic) As in standard algebra, Boolean algebra has 3 main elements: Constants, Variables, and Operators. Logically Constant values are either 0 or 1 Binary Variables { 0, 1} 3 Possible Operators: The AND operator, the OR operator, and the NOT operator.

8 Physically Elements of Boolean Algebra (Binary Logic) Constants Power Supply Voltage (Logic 1) Ground Voltage (Logic 0) Variables Signals (High = 1, Low = 0) Operators Electronic Devices (Logic Gates) AND - Gate OR - Gate NOT - Gate (Inverter)

9 Logical Operations Three basic logical operations can be applied to binary variables: AND, OR, NOT The electronic devices which perform the above operations are called: AND gate, OR gate, NOT gate A truth table of a logical operation is a table of all possible combinations of input variable values, and the corresponding value of the output

10 The AND Operation In Boolean expressions, the AND operation is represented either by a dot or by the absence of an operator. Thus, X AND Y is written as X Y or just XY AND: Z = X Y or Z = XY The AND operation works as follows: If both X and Y have a value of 1, the output Z will be 1 else Z will be 0 The electronic device which performs the AND operation is called the AND gate

11 The AND Gate 2- input and 3- input AND gates, symbols and truth tables Truth table of 2- input AND X Y Z 0 0 0 0 1 0 1 0 0 1 1 1 Truth table of 3- input AND W X Y Z 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1

12 The OR Operation In Boolean expressions, the AND operation is represented either by a plus sign. Thus, X OR Y is written as X + Y OR: Z = X + Y The OR operation implies: If either X or Y have a value of 1, the output Z will be 1 The electronic device which performs the OR operation is called the OR gate.

13 The OR Gate 2- input and 3- input OR gates, symbols and truth tables Truth table of 2- input OR X Y Z = X +Y 0 0 0 0 1 1 1 0 1 1 1 1 W X Y Truth table of 3- input OR Z= W + X + Y W X Y Z = W + X + Y 0 0 0 0 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 1

14 The NOT Operation NOT is a unary operator, meaning there can only be 1 input In Boolean expressions, the NOT operation is represented by either a bar on top of the variable (e.g. Z=X ) or a prime (e.g. Z = X' ). NOT: Z = X If the value of X is a 0, Z is a 1, and if X = 1, Z= 0 X is also referred to as the complement of Z The electronic device which performs the NOT operation is called the NOT gate, or simply INVERTER

15 The NOT Gate (Inverter) NOT gate symbol and truth table X Z= X Truth table of NOT NOT X Z = X' 0 1 1 0

16 Logic Circuits and Boolean Expressions Boolean Algebra (summary) Values Regular Algebra Numbers Integers Real numbers Complex Numbers Boolean Algebra 1 (True, High) 0 (False, Low) Operators +, -, x, /, etc AND ( ) OR (+) NOT ( ' )

17 Logic Circuits and Boolean Expressions F (X,Y) = XY + Y A Boolean expression is made of Boolean variables and constants combined with logical operators: AND, OR and NOT A literal is each instance of a variable or constant Boolean expressions are fully defined by their truth tables A Boolean expression can be represented using interconnected logic gates Literals correspond to the input signals to the gates Constants (1 or 0) can also be input signals variable operator literals Operators of the expression are converted to logic gates

18 Logic Circuits and Boolean Expressions Example: Consider the function F = X ( Y + Z) This function has three inputs X, Y, Z and the output is given by F Logic circuit diagram of F = X ( Y + Z) shows the gates needed to construct this circuit are: 2 input AND, 2 input OR and NOT Y Y X F Z

19 Logic Circuits and Boolean Expressions Another representation of the function F = X ( Y + Z) is the truth table F = X ( Y + Z) X Y Z Y Y + Z F = X.(Y +Z) 0 0 0 1 1 0 0 0 1 1 1 0 0 1 0 0 0 0 0 1 1 0 1 0 1 0 0 1 1 1 1 0 1 1 1 1 1 1 0 0 0 0 1 1 1 0 1 1

20 Operator Precedence Given a Boolean expression, the order of operations depends on the precedence rules given by: Example: XY + WZ will be evaluated as: 1. XY 2. WZ 3. XY + WZ 1. Parenthesis Highest Priority 2. NOT 3. AND 4. OR Lowest Priority

21 Basic Identities of Boolean Algebra

22 Duality Principle The principle of duality states that given a Boolean Algebra identity, its dual is obtained by replacing all 1 s with 0 s and 0 s with 1 s, all AND operators with OR, and all OR operators with AND The dual of an identity is also an identity AND Identities: X 1 = X X 0 = 0 X X = X X X = 0 Replacing 1 with 0 0 with 1 + with with + OR Identities (Dual): X + 0 = X X + 1 = 1 X + X = X X + X = 1

23 DeMorgan s Theorem X + Y = X Y X Y = X + Y use truth tables to prove that two Boolean expressions are equal! Extended DeMorgan s Theorem: X 1 + X 2 +. +X n = X 1 X 2..X n X 1 X 2. X n = X 1 + X 2 +.+X n

24 Basic Identities of Boolean Algebra Identities of Boolean Algebra can be easily proved using truth tables. The only difference between the dual of an expression and the complement of that expression is that in the dual variables are not complemented while in the complement expression, all variables are complemented. Using the Boolean Algebra Identities, complex Boolean expressions can be manipulated into a simpler forms resulting in simpler logic circuit implementations. Simpler expressions are generally implemented by simpler logic circuits which are both faster and less expensive.

25 Algebraic Manipulation The objective here is to acquire some skills in manipulating Boolean expressions into simpler forms for more efficient implementations. Example: Prove that X + XY = X Proof: X + XY = X 1 + XY =X (1 + Y) = X.1 = X This is called absorption Y has been absorbed Example: Prove that X + X`Y= X + Y Proof: X + X`Y= (X+ X`) (X + Y)= 1 (X + Y)= X + Y OR X + X`Y= X.1 + X`Y= X (1+Y) + X`Y= X + XY + X`Y= X + (XY +X`Y)= X + Y(X +X`)= X + Y

26 Algebraic Manipulation Example: F = X`YZ + X`YZ` + XZ = X`Y(Z+Z`) + XZ = X`Y 1 + XZ = X`Y + XZ

27 Algebraic Manipulation Example: F = X`YZ + X`YZ` + XZ = X`Y(Z+Z`) + XZ = X`Y 1 + XZ = X`Y + XZ Need to verify? We have reduced the circuit size from 4 gates + 2 inverters to 3 gates + 1 inverter

28 Consensus Theorem Prove: LHS = XY+X Z+YZ = XY+X Z+YZ.1 = XY+X Z+YZ(X+X ) = XY+X Z+XYZ+X YZ = XY+XYZ+X Z+X YZ = XY(1+Z)+X Z(1+Y) = XY 1 + X Z 1 = XY + X Z = RHS XY + X Z + YZ = XY + X Z Adding an extra step to acquire the desired output Y and Z are associated with X and X in the first two terms and appear together in the third. YZ is redundant and can be eliminated.

29 Algebraic Manipulation Example: Reduce F1 = (A + B + AB) (AB + A C + BC) Using DeMorgan s Theorem, F1 = (A.B.(A +B')).(A +B ).(A+C ).(B +C ) = (A.B.A + A.B.B ).(A +B )(A+C ).(B +C ) = (A B + 0).(A +B )(A+C ).(B +C ) = (A BA + A BB ) (A+C ).(B +C ) = (A B) (A+C ).(B +C ) = (A BA+A BC )(B +C ) = (0+A BC )(B +C ) = (A BC B + A BC C ) = (0 + A BC ) = A BC

30 Algebraic Manipulation Example: Simplify the function

31 Complement of afunction The complement of a function F is F F is obtained in two ways: 1. Truth Table: Change 1s to 0s and 0s to 1s 2. Boolean Expression: Apply DeMorgan s Theorem (Be Careful, before begin, surround all AND terms with parentheses (easy to make mistake!)) Short cut: Take the dual and complement the literals. Truth table A B F F 0 0 0 1 0 1 1 0 1 0 1 0 1 1 0 1

32 Conclusion Boolean Algebra is a mathematical system to study logic circuits Boolean identities and algebraic manipulation can be used to simplify Boolean expressions. Simplified Boolean expressions result in simpler and, generally, faster circuits.