Logic Gates and Boolean Algebra

Similar documents
Combinational logic. Possible logic functions of two variables. Minimal set of functions. Cost of different logic functions.

CMSC 313 Lecture 16 Postulates & Theorems of Boolean Algebra Semiconductors CMOS Logic Gates

CHAPTER 3 LOGIC GATES & BOOLEAN ALGEBRA

12/31/2010. Overview. 05-Boolean Algebra Part 3 Text: Unit 3, 7. DeMorgan s Law. Example. Example. DeMorgan s Law

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

Chapter 2: Switching Algebra and Logic Circuits

Theorem/Law/Axioms Over (.) Over (+)

XOR - XNOR Gates. The graphic symbol and truth table of XOR gate is shown in the figure.

Logic Design. Chapter 2: Introduction to Logic Circuits

Chapter 2 Combinational Logic Circuits

Boole Algebra and Logic Series

CHAPTER1: Digital Logic Circuits Combination Circuits

EECS Variable Logic Functions

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

COMP2611: Computer Organization. Introduction to Digital Logic

Combinational Logic (mostly review!)

Computer Organization: Boolean Logic

LOGIC GATES A Y=A+B. Logic symbol of OR gate B The Boolean expression of OR gate is Y = A + B, read as Y equals A 'OR' B.

Why digital? Overview. Number Systems. Binary to Decimal conversion

Possible logic functions of two variables

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

EEE130 Digital Electronics I Lecture #4

Part 5: Digital Circuits

Goals for Lecture. Binary Logic and Gates (MK 2.1) Binary Variables. Notation Examples. Logical Operations

Chap 2. Combinational Logic Circuits

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA

4 Switching Algebra 4.1 Axioms; Signals and Switching 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

WEEK 2.1 BOOLEAN ALGEBRA

CS 226: Digital Logic Design

CHAPTER 2 BOOLEAN ALGEBRA

Boolean Algebra & Logic Gates. By : Ali Mustafa

MC9211 Computer Organization

Chapter 2. Digital Logic Basics

Chapter 2 Boolean Algebra and Logic Gates

Switches: basic element of physical implementations

Unit 8A Computer Organization. Boolean Logic and Gates

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

Prove that if not fat and not triangle necessarily means not green then green must be fat or triangle (or both).

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

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

Department of Electrical and Computer Engineering University of Wisconsin - Madison. ECE/CS 352 Digital System Fundamentals.

Lecture 9: Digital Electronics

Chapter 2: Boolean Algebra and Logic Gates

Number System. Decimal to binary Binary to Decimal Binary to octal Binary to hexadecimal Hexadecimal to binary Octal to binary

Appendix A: Digital Logic. Principles of Computer Architecture. Principles of Computer Architecture by M. Murdocca and V. Heuring

Lecture 3. Title goes here 1. level Networks. Boolean Algebra and Multi-level. level. level. level. level

Experiment 7: Magnitude comparators

UNIT 8A Computer Circuitry: Layers of Abstraction. Boolean Logic & Truth Tables

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

New Students Day Activity

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

Circuits & Boolean algebra.

Digital Electronics. Delay Max. FF Rate Power/Gate High Low (ns) (MHz) (mw) (V) (V) Standard TTL (7400)

Boolean Algebra. The Building Blocks of Digital Logic Design. Section. Section Overview. Binary Operations and Their Representation.

Digital Circuits. 1. Inputs & Outputs are quantized at two levels. 2. Binary arithmetic, only digits are 0 & 1. Position indicates power of 2.

COSC 243. Introduction to Logic And Combinatorial Logic. Lecture 4 - Introduction to Logic and Combinatorial Logic. COSC 243 (Computer Architecture)

EC-121 Digital Logic Design

Digital Logic. Lecture 5 - Chapter 2. Outline. Other Logic Gates and their uses. Other Logic Operations. CS 2420 Husain Gholoom - lecturer Page 1

ECE 545 Digital System Design with VHDL Lecture 1A. Digital Logic Refresher Part A Combinational Logic Building Blocks

Unit 2 Boolean Algebra

Chapter 2 Boolean Algebra and Logic Gates

Boolean Algebra, Gates and Circuits

CS61c: Representations of Combinational Logic Circuits

Digital Fundamentals

Ch 2. Combinational Logic. II - Combinational Logic Contemporary Logic Design 1

Lecture 1. Notes. Notes. Notes. Introduction. Introduction digital logic February Bern University of Applied Sciences

Unit 2 Boolean Algebra

Electronics. Overview. Introducction to Synthetic Biology

Chapter 2 Combinational Logic Circuits

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

Chapter 2. Boolean Algebra and Logic Gates

XI STANDARD [ COMPUTER SCIENCE ] 5 MARKS STUDY MATERIAL.

Digital- or Logic Circuits. Outline Logic Circuits. Logic Voltage Levels. Binary Representation

Combinational Logic Design Principles

NAND, NOR and XOR functions properties

L2: Combinational Logic Design (Construction and Boolean Algebra)

Digital Logic (2) Boolean Algebra

Chapter 2 Combinational Logic Circuits

Review: Additional Boolean operations

Chapter 2 (Lect 2) Canonical and Standard Forms. Standard Form. Other Logic Operators Logic Gates. Sum of Minterms Product of Maxterms

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.

Algebraic Methods for the Analysis and Synthesis

ECE 545 Digital System Design with VHDL Lecture 1. Digital Logic Refresher Part A Combinational Logic Building Blocks

Contents. Chapter 2 Digital Circuits Page 1 of 30

ECE/CS 250 Computer Architecture

In Module 3, we have learned about Exclusive OR (XOR) gate. Boolean Expression AB + A B = Y also A B = Y. Logic Gate. Truth table

ELCT201: DIGITAL LOGIC DESIGN

Chapter 7 Combinational Logic Networks

Chapter 2: Princess Sumaya Univ. Computer Engineering Dept.

CSC9R6 Computer Design. Practical Digital Logic

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA

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

School of Computer Science and Electrical Engineering 28/05/01. Digital Circuits. Lecture 14. ENG1030 Electrical Physics and Electronics

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

Lecture 10: 09//25/03 A.R. Neureuther Version Date 09/14/03 EECS 42 Introduction to Digital Electronics Andrew R. Neureuther

EGC221: Digital Logic Lab

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

ECE 250 / CPS 250 Computer Architecture. Basics of Logic Design Boolean Algebra, Logic Gates

Transcription:

Logic Gates and oolean lgebra The ridge etween Symbolic Logic nd Electronic Digital Computing Compiled y: Muzammil hmad Khan mukhan@ssuet.edu.pk asic Logic Functions and or nand nor xor xnor not 2 Logic Gates and oolean lgebra

Logic Gate Symbols! ND! OR! NND! NOR! XOR! XNOR! NOT 3 Logic Gates Logic Gate 4! Logic Gates are the basic building blocks for building electronic (digital) circuits! They have output terminal, and ( n ) input terminal(s)! Output will be or, depending on the digital levels of the input terminal(s)! These gates form the basic building blocks of digital systems; that evaluate digital input levels and produce specific output response! 7 Logic Gates: ND, OR, NOT, NND, NOR, XOR, X-NOR Logic Gates and oolean lgebra 2

Logic Gate Notations! Not is written Ā! and is written! or is written +! xor is written 5 Related Terminologies 6! oolean Expression n expression which evaluates to either true or false is called a oolean Expression. n expression that results in a value of either TRUE or FLSE. For example, the expression 2 < 5 (2 is less than 5) is a oolean expression because the result is TRUE. ll expressions that contain relational operators, such as the less than sign (<), are oolean. The operators -- ND, OR, XOR, NOR, and NOT -- are oolean operators. oolean expressions are also called comparison expressions, conditional expressions, and relational expressions. Logic Gates and oolean lgebra 3

Related Terminologies 7! Truth Table truth table shows how a logic circuit's output responds to various combinations of the inputs, using logic for true and logic for false. truth table is a breakdown of a logic function by listing all possible values the function can attain ll permutations of the inputs are listed on the left, and the output of the circuit is listed on the right. The desired output can be achieved by a combination of logic gates. truth table can be extended to any number of inputs. The input columns are usually constructed in the order of binary counting with a number of bits equal to the number of inputs. Related Terminologies! Logic Circuit Logic Circuit is a graphical representation of a program using formal logic 8 Logic Gates and oolean lgebra 4

ND Gate ND! This is a Two-Input ND Gate (label inputs & output)! y convention, letters, are used as inputs, and letter(s) X is used as output! ND Gate Operation is defined as: The output, X, is HIGH if input and input are both HIGH. Output is only when all inputs are! Let s complete a truth table for the ND gate 9 ND Gate ND! ND Gate Truth Table X = X = X = X = ND Truth Table X Logic Gates and oolean lgebra 5

ND Gate ND! Notation of ND Gate ND.! ND gates may have more than two inputs! How many combinations to be listed in a truth table? OR Gate OR! This is a two-input OR gate (label inputs & output)! OR Gate Operation is defined as: The output at X will be HIGH whenever input or input is HIGH or both are HIGH. Output is only when any of the inputs is! Let s complete a truth table for the OR gate 2 Logic Gates and oolean lgebra 6

OR Gate OR! OR Gate Truth Table X = X = X = X = OR Truth Table X 3 OR Gate OR! Notation of OR Gate OR +! ND gates may have more than two inputs! How many combinations to be listed in a truth table? 4 Logic Gates and oolean lgebra 7

NOT Gate NOT! Not gate is also known as Inverter Gate! NOT gate is a one-input-one-output logic gate! Notation of NOT Gate: NOT = 5 NOT Gate NOT! Not Gate Truth Table NOT Truth Table X When =, Output X is NOT, Hence = When =, Output X is NOT, Hence = 6 Logic Gates and oolean lgebra 8

XOR Gate! XOR is also called as Exclusive OR! Operation of XOR gate True if either true but not both! Similar Input, Output will be! Dissimilar Input, Output will be! Notation of XOR gate: + 7 XOR Gate! XOR Truth Table XOR Truth Table True if either true but not both Similar Input, Output will be X Dissimilar Input, Output will be 8 Logic Gates and oolean lgebra 9

XOR Gate 9 NND Gate NND! NND gate ( NOT-ND = NND, opposite of ND )! The simplest NND gate is a two-input-oneoutput logic gate! Operation of NND gate: NND gate = Output is only when all inputs are 2 Logic Gates and oolean lgebra

NND Gate NND! NND Gate Truth Table X = X = X = X = NND Truth Table X 2 NOR Gate NOR! NOR gate ( NOT-OR = NOR, opposite of OR )! The simplest NOR gate is a two-input-one-output logic gate! Operation of NOR gate: NOR gate = Output is only when all inputs are 22 Logic Gates and oolean lgebra

NOR Gate NOR! NOR Gate Truth Table X = X = X = X = NOR Truth Table X 23 NXOR Gate! NXOR gate ( NOT-XOR = NOR, opposite of XOR )! The simplest NXOR gate is a two-input-oneoutput logic gate! Operation of XNOR gate Similar Input, Output will be Dissimilar Input, Output will be 24 Logic Gates and oolean lgebra 2

NXOR Gate! NXOR Truth Table NXOR Truth Table X 25 oolean Exp Logic Circuit! To draw a circuit from a oolean expression: From the left, make an input line for each variable. Next, put a NOT gate in for each variable that appears negated in the expression. Still working from left to right, build up circuits for the sub-expressions, from simple to complex. 26 Logic Gates and oolean lgebra 3

Logic Circuit: + (+)! Logic Circuit: + (+)! Input Lines for Variables 27 Logic Circuit: + (+)! NOT Gate for 28 Logic Gates and oolean lgebra 4

Logic Circuit: + (+)! Sub-expression 29 Logic Circuit: + (+)! Sub-expression + + 3 Logic Gates and oolean lgebra 5

Logic Circuit: + (+)! Sub-expression + + + 3 Logic Circuit: + (+)! Sub-expression ( + ) + + 32 (+) Logic Gates and oolean lgebra 6

Logic Circuit: + (+)! Entire Expression + + 33 (+) Logic Circuit oolean Exp! In the opposite direction, given a logic circuit, we can write a oolean expression for the circuit.! First we label each input line as a variable.! Then we move from the inputs labeling the outputs from the gates.! s soon as the input lines to a gate are labeled, we can label the output line.! The label on the circuit output is the result. 34 Logic Gates and oolean lgebra 7

Logic Circuit oolean Exp + + _ + 35 Entire Expression _ (+) (+) Simplifying oolean Expressions! s in ordinary algebra, some oolean expressions can be simplified! The logic circuit that results from a simplified expression will have fewer gates and operations! XOR is not a asic Function 36 = + Logic Gates and oolean lgebra 8

Laws of oolean lgebra Identity Law Zero Law + =. =. = + = Idempotent Law Commutative Law + = + = +. = = 37 ssociative Law Distributive Law (+) + C = + (+C) (+C) = + C () C = (C) + C = (+) (+C) Laws of oolean lgebra bsorption Law + = (+) = Complement Law + _ = _ = DeMorgan s _ Law + = = + Double Complement _ = 38 Logic Gates and oolean lgebra 9

Identity and Null Law! Identity Law! Null Law! + =!. =! =! + =!. =! = Ā 39 Idempotence and Inverse Law! Idempotence Law! Inverse Law! + =!. =! =! + Ā =!. Ā =! Ā = = 4 Logic Gates and oolean lgebra 2

Commutative and ssociative Law! Commutative Law! ssociative Law! + = +! =! =! + + C = (+)+C = +(+C)! C = () C = (C)! C = ( ) C = ( C) 4 Distributive and bsorption Law! Distributive Law! bsorption Law! + C = ( + C)! C = ( C)! + =! (+) = 42 Logic Gates and oolean lgebra 2

DeMorgan s Law + = = + 43 DeMorgan s Law! Implementation of DeMorgan's Theorem with basic gates. 44 Logic Gates and oolean lgebra 22

Simplification Revisited 45! Once we have the E for the circuit, perhaps we can simplify. ( + )( + ) = ( + ) = = = ( + )( + )( + ) ( + + ) ( + ) = + = Logic Circuit oolean Exp 46 Reduces to: Logic Gates and oolean lgebra 23

Example 47 ( + ) pply Distributi ve Law + pply Inverse Law + pply Identity Law Example 2 48 + C + D + CD pply ssociative Law ( + C) + (D + CD) pply Distributive Law ( + C) + D( + C) pply Distributive Law again ( + D)( + C) Logic Gates and oolean lgebra 24

Example 3 49 + + ( ) Use Substituti on ( + ) pply ssociative Law ( + ) + + pply Idempotence Use Substituti on Example 4 5 + + pply ssociativ e Law + ( + ) pply DeMorgan' s Law + pply Inverse Law Logic Gates and oolean lgebra 25

Example 5 5 Rewrite using nd & Or + pply DeMorgan' s ( )( ) pply DeMorgan' s Law again ( + )( + ) Law Example 5 (continued) ( + )( + ) pply Inverse ( + )( + ) Law pply Distributi ve Law + + + pply Inverse Law + + + pply Identity Law + 52 Logic Gates and oolean lgebra 26

Example 6 53 + ( + ) ( )( DeMorgan's Law DeMorgan's Law + + + Distributive Law + + + Inverse Law + Identity Law Equivalence ( + )( + ) pply InverseLaw lgebraic Manipulation Examples 54. X + XY = X (+Y) = X 2. XY + XY = X (Y + Y ) = X 3. X + X Y = (X + X ) (X + Y) = X + Y 4. X (X + Y) = X + XY = X ( + Y) = X 5. (X + Y)(X + Y ) = X + XY + XY + YY = X ( + Y ) + XY = X + XY = X + XY = X ( + Y) = X 6. X(X + Y) = XX +XY = XY Logic Gates and oolean lgebra 27

The oolean Triangle oolean Expression Logic Circuit Truth Table 55 Logic Gates Implementation! uilt from transistors solid-state electronic switches either OFF or ON extremely small and fast built from semiconductor materials such as silicon 56 Logic Gates and oolean lgebra 28

Logic Gates Implementation! Transistors -> Gates! Two or more transistors combine to form a gate ND gate -- two transistors in series! value is the control line of the first transistor! value2 is the control line of the second transistor OR gate -- two transistors in parallel! each value is the control line of one transistor NOT gate -- one transistor plus a resistor! value is the control line 57 Where do we go from Gates?! Combinations of gates form electrical circuits Transform a set of oolean input values into a set of oolean output values Output depends solely on current input Each unique combination of inputs produces a specific output value Circuits are combined into integrated circuits (ICs) or computer chips ICs are connected together to carry out more complex tasks Put enough of the right ICs together and you have a computer 58 Logic Gates and oolean lgebra 29

Review asic Logic Gates 59 Conclusion! Logic Gates and oolean lgebra are the bridge between symbolic logic and electronic digital computing. Compiled y: Muzammil hmad Khan mukhan@ssuet.edu.pk 6 Logic Gates and oolean lgebra 3