Logic Gates Ghader Kurdi Adapted from the slides prepared by DEPARTMENT OF PREPARATORY YEAR.

Slides:



Advertisements
Similar presentations
Boolean Algebra and Logic Gates
Advertisements

Basics Combinational Circuits Sequential Circuits
CT455: Computer Organization Logic gate
Chapter 2 Logic Circuits.
Boolean Algebra and Combinational Logic
Boolean Algebra and Logic Gate
Relationship Between Basic Operation of Boolean and Basic Logic Gate The basic construction of a logical circuit is gates Gate is an electronic circuit.
Computer Engineering (Logic Circuits) (Karnaugh Map)
Lecture 3. Boolean Algebra, Logic Gates
Computer Programming Skills Revision Prepared by: Ghader Kurdi.
Boolean Algebra and Logic Simplification
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals with PLD Programming.
1 Why study Boolean Algebra? 4 It is highly desirable to find the simplest circuit implementation (logic) with the smallest number of gates or wires. We.
1 Logic Gates Digital Computer Logic Kashif Bashir WWW:
BOOLEAN ALGEBRA Saras M. Srivastava PGT (Computer Science)
Boolean Algebra and Digital Circuits
Digital Logic Basics Chapter 2 S. Dandamudi To be used with S. Dandamudi, “Fundamentals of Computer Organization and Design,” Springer, 
1 The Chinese University of Hong Kong Faculty of Education Diploma in Education (Part-Time) Winter 1997 Educational Communications and Technology Assignment.
Apr. 3, 2000Systems Architecture I1 Systems Architecture I (CS ) Lecture 3: Review of Digital Circuits and Logic Design Jeremy R. Johnson Mon. Apr.
Combinational Logic 1.
Dr. Eng. Farag Elnagahy Office Phone: King ABDUL AZIZ University Faculty Of Computing and Information Technology CPCS 222.
Logic Gates Shashidhara H S Dept. of ISE MSRIT. Basic Logic Design and Boolean Algebra GATES = basic digital building blocks which correspond to and perform.
+ CS 325: CS Hardware and Software Organization and Architecture Gates and Boolean Algebra Part 2.
PRASAD A. PAWASKAR SPN. NO DETE 2 SEMESTER lec1-11.
Chapter 2 Two- Level Combinational Logic. Chapter Overview Logic Functions and Switches Not, AND, OR, NAND, NOR, XOR, XNOR Gate Logic Laws and Theorems.
Lecture 4 Nand, Nor Gates, CS147 Circuit Minimization and
LOGIC GATES & BOOLEAN ALGEBRA
ECE 301 – Digital Electronics Basic Logic Operations, Boolean Expressions, and Boolean Algebra (Lecture #3)
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.
Karnaugh Maps (K-Maps)
Computer Systems 1 Fundamentals of Computing Simplifying Boolean Expressions.
LOGIC CIRCUITLOGIC CIRCUIT. Goal To understand how digital a computer can work, at the lowest level. To understand what is possible and the limitations.
1 Lect # 2 Boolean Algebra and Logic Gates Boolean algebra defines rules for manipulating symbolic binary logic expressions. –a symbolic binary logic expression.
Chapter-3: BOOLEAN ALGEBRA & LOGIC GATES Analysis and logical design.
Boolean Algebra and Logic Gates
Logic Gates. A logic gate is an elementary building block of a digital circuit. Most logic gates have two inputs and one output. At any given moment,
Karnaugh Maps (K-Maps)
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION
Logic Simplification-Using K-Maps
1 3- De-Morgan’s Theorems 1.The complement of a product of variables is equal to the sum of the complements of the variables. 2. The complement of a sum.
Digital Logic Design Basics Combinational Circuits Sequential Circuits Pu-Jen Cheng Adapted from the slides prepared by S. Dandamudi for the book, Fundamentals.
COMPUTER ARCHITECTURE & OPERATIONS I Instructor: Yaohang Li.
BOOLEAN ALGEBRA LOGIC GATES. Introduction British mathematician George Boole( ) was successful in finding the link between logic and mathematics.
Lecture 5 More Boolean Algebra A B. Overview °Expressing Boolean functions °Relationships between algebraic equations, symbols, and truth tables °Simplification.
CSE 461. Binary Logic Binary logic consists of binary variables and logical operations. Variables are designated by letters such as A, B, C, x, y, z etc.
Mu.com.lec 9. Overview Gates, latches, memories and other logic components are used to design computer systems and their subsystems Good understanding.
Dr. Ameria Eldosoky Discrete mathematics
Digital Logic.
CHAPTER 3 Simplification of Boolean Functions
Lecture 4 Nand, Nor Gates, CS147 Circuit Minimization and
CHAPTER 2 Boolean Algebra
CHAPTER 2 Boolean Algebra This chapter in the book includes:
Boolean Algebra and Combinational Logic
Digital Signals Digital Signals have two basic states:
Basic Digital Logic Basic Gates
Speaker: Fuw-Yi Yang 楊伏夷 伏夷非征番, 道德經 察政章(Chapter 58) 伏者潛藏也
Dr. Clincy Professor of CS
Basics Combinational Circuits Sequential Circuits
Basics Combinational Circuits Sequential Circuits Ahmad Jawdat
Karnaugh Maps (K-Maps)
Computer Science 210 Computer Organization
Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan
BASIC & COMBINATIONAL LOGIC CIRCUIT
CSC 220: Computer Organization Logic Gates and Functions
Dr. Clincy Professor of CS
Chapter 2 Gates.
Digital Logic Design Basics Combinational Circuits Sequential Circuits.
Circuit Simplification and
Presentation transcript:

Logic Gates Ghader Kurdi Adapted from the slides prepared by DEPARTMENT OF PREPARATORY YEAR.

Introduction to Digital Logic Basics Hardware consists of a few simple building blocks  These are called logic gates AND, OR, NOT, … NAND, NOR, XOR, … Both the inputs and output to/from logic gates are expressed in terms of 1s and 0s Logic gate Performs logical operation outputInput/s

Design of Logic Gates The basic logic gates are:  AND  OR  NAND  NOR  XOR  XNOR  Inverter (NOT)  Buffer

Design of Logic Gates Logic gates are built using transistors NOT gate can be implemented by a single transistor AND requires 3 transistors Transistors are the fundamental devices that any electronic system consists of Pentium consists of 3 million transistors Compaq Alpha consists of 9 million transistors Now we can build chips with more than 100 million transistors

AND gate FBA AND function finds the minimum between two binary digits AND gate outputs a 1 only if all the inputs are 1. Truth table Graphical representation F = A. B or F = AB Logical representation

OR gate FBA Truth table F = A + B Logical representation OR finds the maximum between two binary digits OR gate outputs a 1 if any one of the inputs is1. Graphical representation

NAND gate FBA NAND = AND + NOT The output is "false" if both inputs are "true." Otherwise, the output is "true." Truth table Graphical representation F = A. B Logical representation

NOR gate FBA NOR = OR + NOT The output is "true" if both inputs are "false." Otherwise, the output is "false." Truth table Graphical representation F = A + B Logical representation

XOR gate FBA XOR implements exclusive-OR function The output is "true" if either, but not both, of the inputs are "true." The output is "false" if both inputs are "false" or if both inputs are "true." Truth table Graphical representation A + B = A · B + A · B Logical representation

XNOR gate The output is true when both inputs A and B are true and when neither A nor B is true. FBA Truth table Graphical representation A + B Logical representation

NOT (Inventer) gate FA Has only one input Outputs the inverse of the value inputted Truth table Graphical representation F = A or A’ Logical representation

Buffer YA Has only one input Outputs the same value inputted Truth table Graphical representation Y = A Logical representation

Integration levels  SSI (small scale integration) Introduced in late 1960s 1-10 gates (previous examples)  MSI (medium scale integration) Introduced in late 1960s gates  LSI (large scale integration) Introduced in early 1970s ,000 gates  VLSI (very large scale integration) Introduced in late 1970s More than 10,000 gates

Logic Functions Logical functions can be expressed in several ways:  Truth table  Logical expressions  Graphical form Example:  Majority function Output is 1 whenever majority of inputs is 1 We use 3-input majority function

Truth Table F….CBA In a truth table, the number of rows = (number of inputs) 2 The truth table has a column foe each input on the left hand side The outputs are listed in columns on the right hand side

Logic Functions (cont.) 3-input majority function ABCFABCF Logical expression form F = A B + B C + A C

Logic Functions (cont.) Logical expression: Q= A’B + AB’ ABA’B’A’BAB’Q

Logic Circuit Design Process A simple logic design process involves  Problem specification  Truth table derivation  Derivation of logical expression  Simplification of logical expression  Implementation

Logical Equivalence All three circuits implement F = A B function

Logical Equivalence (cont.) Proving logical equivalence of two circuits 1. Derive the logical expression for the output of each circuit 2. Show that these two expressions are equivalent Two ways: You can use the truth table method For every combination of inputs, if both expressions yield the same output, they are equivalent Good for logical expressions with small number of variables You can also use algebraic manipulation Need Boolean identities

Logical Equivalence (cont.) A B A+B Derivation of logical expression from a circuit Trace from the input to output Write down intermediate logical expressions along the path

Logical Equivalence (cont.) Proving logical equivalence: Truth table method A B A B (A + B) F2 = (A + B)

Logical Equivalence (cont.) Derivation of logical expression from a circuit

Logical Equivalence (cont.) Proving logical equivalence: Truth table method A BF1 = A BF3 = (A + B) (A + B) (A + B)

The Universal NAND Gate NAND gate is the main fundamental universal gate for being easier in manufacturing process.

The Universal NAND Gate (cont.)

FBA FBA

FBA FBA

FBA FBA

FBA FBA

FA 0 1 FBA

FA 10 1 FBA

The Universal NOR Gate NOR gate is also another main fundamental universal gate

Deriving Logical Expressions Derivation of logical expressions from truth tables  sum-of-products (SOP) form  product-of-sums (POS) form SOP form  Write an AND term for each input combination that produces a 1 output Write the variable if its value is 1; complement otherwise  OR the AND terms to get the final expression POS form  Dual of the SOP form

Deriving Logical Expressions (cont.) 3-input majority function ABCF SOP logical expression Four product terms  Because there are 4 rows with a 1 output F = A B C + A B C + A B C + A B C

Deriving Logical Expressions (cont.) 3-input majority function ABCF POS logical expression Four sum terms  Because there are 4 rows with a 0 output F = (A + B + C) (A + B + C) (A + B + C) (A + B + C)

Boolean Algebra Boolean algebra can be used to formalize the combinations of binary logic states. In these relations A and B are binary quantities, they can be either logical true (T or 1) or logical false (F or 0).

Boolean Algebra

Boolean Algebra (cont.)

Logical Expression Simplification Prove that: A B = (A + B) (A + B) (A + B) Used rules (A + B) (A + B) (A + B)Distribution (A + BB) (A + B)Complement (A + 0) (A + B)Identity A (A + B)Distribution AA + ABComplement 0 + ABIdentity AB

Logical Expression Simplification Prove that: A B = (A + B) (A + B) (A + B) Used rules (A + B) (A + B) (A + B)Idempotent (A + B) (A + B) ((A + B) (A + B)) ((A + B) (A + B))Distribution (A + BB) (B + AA)Complement (A + 0) (B + 0) Identity (A)(B) AB

Logical Expression Simplification (cont.) Prove that: X+XY = X Used rules X+XYX+XY X(1+Y)Null X(1)Identity X

Logical Expression Simplification (cont.) Prove that: X(X+Y) = X Used rules X(X+Y)Distribution XX+XYIdempotent X+XYX+XY X(1+Y)Null X(1)Identity X

Logical Expression Simplification (cont.) Prove that: X.(Y+Z) = X.Y + X.Z Used rules X.Y + X.ZDistribution (X.Y + X) (X.Y + Z)Absorption X. (X.Y + Z)Distribution X. (Z+X. Z+Y)Associative (X. X+Z). (Y+Z)Absorption X. (Y+Z)

Logical Expression Simplification (cont.) Prove that: X(X+X') = X Used rules X(X+X')Distribution XX + XX’Idempotent X + XX’Complement X + 0Identity X

Logical Expression Simplification (cont.) Majority function example A B C + A B C + A B C + A B C = A B C + A B C + A B C + A B C + A B C + A B C We can now simplify this expression as B C + A C + A B A difficult method to use for complex expressions Added extra

Logical Expression Simplification (cont.) Simplify the next: WY + XY + WZ + XZ = (W + X) (Y + Z) Used rules WY + XY + WZ + XZ Distribution Y(W + X) + Z(W + X) (W + X) (Y + Z)

Logical Expression Simplification (cont.) Simplify the next: (X + Y) + (X + Y) = 0 Used Rules (X + Y) + (X + Y) Associative (X + X) + ( Y + Y) Complement, Idempotent 1 + YNull 1 0

Logical Expression Simplification (cont.) Simplify the next: (X + Y) + (X + Y) = 0 Used Rules (X + Y). (X + Y)De Morgan (X. Y). ( X. Y)De Morgan (X. Y). ( X. Y) Associative (X. X). (Y. Y) Idempotent (X. X). (Y) Complement 0. YNull 0

Simplification Using Boolean Algebra AB+A(B+C)+B(B+C)  (distributive law) AB+AB+AC+BB+BC  ( Idempotent ; BB=B) AB+AB+AC+B+BC  (I dempotent ; AB+AB=AB) AB+AC+B+BC  ( Absorption ; B+BC=B) AB+AC+B  ( Absorption ; AB+B=B) B+AC A B C A B C AB+A(B+C)+B(B+C)

Logical Expression Simplification (cont.) Two basic methods  Algebraic manipulation Use Boolean laws to simplify the expression Difficult to use Don’t know if you have the simplified form  Karnaugh map (K-map) method Graphical method Easy to use limited to problems with up to 4 binary inputs. Let's start with a simple example

Karnaugh Map Method Karnaugh Map Of Two Variables A = 0 B = 0 A = 0 B = 1 A = 1 B = 0 A = 1 B = 1

Karnaugh Map Method (cont.) Step 1: Find a truth tableStep 2: Draw a K-map FA’BA’B’B’A’BA A B F = A’B’ + A’B

Karnaugh Map Method (cont.) Step 3: Group adjacent 1’s Step 4: Read off a reduced expression A B A B A’B’ A’B A’B’ + A’B = A’

Karnaugh Map Method (cont.) A B A B A B A B A B A B How to group adjacent 1’s ?