CT455: Computer Organization Logic gate

Slides:



Advertisements
Similar presentations
Switching circuits Composed of switching elements called “gates” that implement logical blocks or switching expressions Positive logic convention (active.
Advertisements

ENGIN112 L7: More Logic Functions September 17, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 7 More Logic Functions: NAND, NOR,
Basics Combinational Circuits Sequential Circuits
Logic Gates.
Computer Science 210 Computer Organization Introduction to Logic Circuits.
Programmable Logic Controllers.
CS2100 Computer Organisation
ECE 2373 Modern Digital System Design Exam 2. ECE 2372 Exam 2 Thursday March 5 You may use two 8 ½” x 11” pages of information, front and back, write.
Boolean Algebra and Logic Gate
EECC341 - Shaaban #1 Lec # 1 Winter Introduction to Digital Systems Analog devices and systems process time-varying signals that can take.
Digital Electronics Dan Simon Cleveland State University ESC 120 Revised December 30, 2010.
1 Boolean Algebra & Logic Design. 2 Developed by George Boole in the 1850s Mathematical theory of logic. Shannon was the first to use Boolean Algebra.
Chapter 4 Logic Gates and Boolean Algebra. Introduction Logic gates are the actual physical implementations of the logical operators. These gates form.
2-6 Other Logic Operations For two variables one can achieve sixteen operations Only eight are useful for computers Boolean algebra built on AND, OR and.
Logical Circuit Design Week 5: Combinational Logic Circuits Mentor Hamiti, MSc Office ,
by Prof. Dr. Ali S. Hennache
Module 3.  Binary logic consists of :  logic variables  designated by alphabet letters, e.g. A, B, C… x, y, z, etc.  have ONLY 2 possible values:
XOR and XNOR Logic Gates. XOR Function Output Y is TRUE if input A OR input B are TRUE Exclusively, else it is FALSE. Logic Symbol  Description  Truth.
Lecture 17: Digital Design Today’s topic –Intro to Boolean functions Reminders –HW 4 due Wednesday 10/8/2014 (extended) –HW 5 due Wednesday 10/15/2014.
Digital Logic Basics Chapter 2 S. Dandamudi To be used with S. Dandamudi, “Fundamentals of Computer Organization and Design,” Springer, 
 In studying digital integrated circuits, one must start with the simplest group of circuit, the SSIs or Small Scale Integrated Circuits. Since these.
Basic Logic Operations and Standard Logic Gates (Lecture #1) ECE 331 – Digital System Design.
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.
Sneha.  Gates Gates  Characteristics of gates Characteristics of gates  Basic Gates Basic Gates  AND Gate AND Gate  OR gate OR gate  NOT gate NOT.
Basic logic gates  AND gate:The truth table is given by A.BBA
ACOE1611 Combinational Logic Circuits Reference: M. Mano, C. Kime, “Logic and Computer Design Fundamentals”, Chapter 2.
CHAPTER-2 Fundamentals of Digital Logic. Digital Logic Digital electronic circuits are used to build computer hardware as well as other products (digital.
COMPUTER ARCHITECTURE TRUTH TABLES AND LOGIC GATES.
Chapter-3: BOOLEAN ALGEBRA & LOGIC GATES Analysis and logical design.
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,
Basic Logic Operations and Standard Logic Gates [Lecture:1] Instructor: Sajib Roy Lecturer, ETE, ULAB ETE 204 – Digital Electronics.
Logic Gates Ghader Kurdi Adapted from the slides prepared by DEPARTMENT OF PREPARATORY YEAR.
CHAPTER 5 Combinational Logic Analysis
COMPUTER ARCHITECTURE & OPERATIONS I Instructor: Yaohang Li.
Combinational Logic Analysis. Basic Combinational Logic Circuits AND-OR logic AND-OR logic AND-OR logic produces an SOP expression. AND-OR logic produces.
NAND, NOR, and EXOR (more primitive logical gates) CS Computer Architecture David Mayer.
Chapter 33 Basic Logic Gates. Objectives After completing this chapter, you will be able to: –Identify and explain the function of the basic logic gates.
Digital electronics 4–1 Gates and Circuits SANJAYBHAI RAJGURU COLLEGE OF ENGG.
Circuit Synthesis A logic function can be represented in several different forms:  Truth table representation  Boolean equation  Circuit schematic 
Hoda Roodaki Boolean Algebra Hoda Roodaki
Logic gates.
Boolean Algebra & Logic Gates
Dr. Ameria Eldosoky Discrete mathematics
Chapter 5 Combinational Logic 组合逻辑
Eng. Mai Z. Alyazji October, 2016
Logic Gates and Boolean Algebra
ECE 331 – Digital System Design
Logic Gates.
EI205 Lecture 5 Dianguang Ma Fall 2008.
Basic Logical Operations (Fascinating)
Digital Signals Digital Signals have two basic states:
Basic Digital Logic Basic Gates
Principles & Applications
Dr. Clincy Professor of CS
Basics Combinational Circuits Sequential Circuits
Computer Science 210 Computer Organization
Schematics 201 Lecture Topic: Electrical Symbols
CS Chapter 3 (3A and ) Part 3 of 8
Logic Gates.
CSC 220: Computer Organization Logic Gates and Functions
Logic Gates.
CS Chapter 3 (3A and ) – Part 2 of 5
GCSE Computer Science – Logic Gates & Boolean Expressions
XOR Function Logic Symbol  Description  Truth Table 
Truth tables Mrs. Palmer.
Digital Logic Design Basics Combinational Circuits Sequential Circuits.
Eng. Ahmed M Bader El-Din October, 2018
Logic Gates By: Asst Lec. Besma Nazar Nadhem
What are Logic Gates?.
Agenda Lecture Content: Combinatorial Circuits Boolean Algebras
Presentation transcript:

CT455: Computer Organization Logic gate CS1103 Digital Logic Design CT455: Computer Organization Logic gate

Lecture 4: Logic Gates and Circuits The Inverter The AND Gate The OR Gate The NAND Gate The NOR Gate The XOR Gate The XNOR Gate Drawing Logic Circuit Analysing Logic Circuit Propagation Delay

Lecture 4: Logic Gates and Circuits Universal Gates: NAND and NOR NAND Gate NOR Gate Implementation using NAND Gates Implementation using NOR Gates Implementation of SOP Expressions Implementation of POS Expressions Positive and Negative Logic Integrated Circuit Logic Families

Digital (logic) Elements: Gates Digital devices or gates have one or more inputs and produce an output that is a function of the current input value(s). All inputs and outputs are binary and can only take the values 0 or 1 A gate is called a combinational circuit because the output only depends on the current input combination. Digital circuits are created by using a number of connected gates such as the output of a gate is connected to to the input of one or more gates in such a way to achieve specific outputs for input values. Digital or logic design is concerned with the design of such circuits.

Chapter 1: Introduction Hardware consists of a few simple building blocks These are called logic gates AND, OR, NOT, … NAND, NOR, XOR, … Logic gates are built using transistors NOT gate can be implemented by a single transistor AND gate requires 3 transistors Transistors are the fundamental devices Pentium consists of 3 million transistors Compaq Alpha consists of 9 million transistors Now we can build chips with more than 100 million transistors CS1103 Chapter 1: Introduction

(ANSI/IEEE Standard 91-1984) Logic Gates Gate Symbols a b a.b a+b a' (a+b)' (a.b)' a  b & 1 AND 1 =1 OR NOT NAND NOR Symbol set 1 Symbol set 2 (ANSI/IEEE Standard 91-1984) EXCLUSIVE OR

Truth Tables Provides a listing of every possible combination of values of binary inputs to a digital circuit and the corresponding outputs. Example (2 inputs, 2 outputs): inputs Truth table outputs inputs outputs x y x . y x + y 1 x x . y Digital circuit y x + y

Chapter 1: Introduction Basic Concepts Simple gates AND OR NOT Functionality can be expressed by a truth table A truth table lists output for each possible input combination Other methods Logic expressions Logic diagrams CS1103 Chapter 1: Introduction

Basic Concepts (cont’d) Additional useful gates NAND NOR XOR NAND = AND + NOT NOR = OR + NOT XOR implements exclusive-OR function NAND and NOR gates require only 2 transistors AND and OR need 3 transistors! CS1103 Chapter 1: Introduction

Realizing Logic in Hardware Boolean Algebra and truth tables are essential important tools to express logical relationships. To use these tools in the real world , we must have some physical way to represent TRUE and FALSE (T and F). In, digital electronic circuits, T and F are represented by voltage levels: The transistor-transistor logic (TTL) 74LS family of digital integrated circuits produces two voltage levels: < .5V which represents low voltage L (0) and, > 2.7V which represents high voltage H (1) for the digital device.

Electronic Logic Gates Electrical Signals and Logic Values A signal that is set to logic 1 is said to be asserted, active, or true. An active-high signal is asserted when it is high (positive logic). An active-low signal is asserted when it is low (negative logic). CS1103 Chapter 1: Introduction

Logic Gates: The Inverter Application of the inverter: complement. 1 Binary number 1’s Complement

Logic Gates: The AND Gate B A.B &

Logic Gates: The AND Gate Application of the AND Gate 1 sec A Enable Counter Reset to zero between Enable pulses Register, decode and frequency display

Logic Gates: The OR Gate 1 A B A+B

Logic Gates: The NAND Gate & A B (A.B)'  NAND Negative-OR 

Logic Gates: The NOR Gate 1 A B (A+B)'  NOR Negative-AND 

Logic Gates: The XOR Gate =1 A B A  B

Logic Gates: The XNOR Gate B (A  B)' A B (A  B)' =1

Basic Concepts (cont’d) Proving NAND gate is universal CS1103 Chapter 1: Introduction

Basic Concepts (cont’d) Proving NOR gate is universal CS1103 Chapter 1: Introduction

Drawing Logic Circuit When a Boolean expression is provided, we can easily draw the logic circuit. Examples: (i) F1 = xyz' (note the use of a 3-input AND gate) x y z F1 z'

Drawing Logic Circuit (ii) F2 = x + y'z (can assume that variables and their complements are available) x y' z F2 y'z (iii) F3 = xy' + x'z x' z F3 x'z xy' x y'

Analysing Logic Circuit When a logic circuit is provided, we can analyse the circuit to obtain the logic expression. Example: What is the Boolean expression of F4? A'B' A' B' C F4 A'B'+C (A'B'+C)' F4 = (A'B'+C)' = (A+B).C'

Logic Functions (cont’d) 3-input majority function A B C F 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 1 1 1 1 1 Logical expression form F = A B + B C + A C CS1103 Chapter 1: Introduction

Propagation Delay Every logic gate experiences some delay (though very small) in propagating signals forward. This delay is called Gate (Propagation) Delay. Formally, it is the average transition time taken for the output signal of the gate to change in response to changes in the input signals. Three different propagation delay times associated with a logic gate: tPHL: output changing from the High level to Low level tPLH: output changing from the Low level to High level tPD=(tPLH + tPHL)/2 (average propagation delay)

Propagation Delay Input Output Output Input H L tPHL tPLH

Propagation Delay A B C In reality, output signals normally lag behind input signals: 1 time Signal for C Signal for B Signal for A Ideally, no delay: 1 time Signal for C Signal for B Signal for A

Calculation of Circuit Delays Amount of propagation delay per gate depends on: (i) gate type (AND, OR, NOT, etc) (ii) transistor technology used (TTL,ECL,CMOS etc), (iii) miniaturisation (SSI, MSI, LSI, VLSI) To simplify matters, one can assume (i) an average delay time per gate, or (ii) an average delay time per gate-type. Propagation delay of logic circuit = longest time it takes for the input signal(s) to propagate to the output(s). = earliest time for output signal(s) to stabilise, given that input signals are stable at time 0.

Calculation of Circuit Delays In general, given a logic gate with delay, t. Logic Gate t1 t2 tn : max (t1, t2, ..., tn ) + t If inputs are stable at times t1,t2,..,tn, respectively; then the earliest time in which the output will be stable is: max(t1, t2, .., tn) + t To calculate the delays of all outputs of a combinational circuit, repeat above rule for all gates.

Calculation of Circuit Delays As a simple example, consider the full adder circuit where all inputs are available at time 0. (Assume each gate has delay t.) X Y S C Z max(0,0)+t = t t max(t,0)+t = 2t max(t,2t)+t = 3t 2t where outputs S and C, experience delays of 2t and 3t, respectively.

Universal Gates: NAND and NOR AND/OR/NOT gates are sufficient for building any Boolean functions. We call the set {AND, OR, NOT} a complete set of logic. However, other gates are also used because: (i) usefulness (ii) economical on transistors (iii) self-sufficient NAND/NOR: economical, self-sufficient XOR: useful (e.g. parity bit generation)

(x.x)' = x' (T1: idempotency) NAND Gate NAND gate is self-sufficient (can build any logic circuit with it). Therefore, {NAND} is also a complete set of logic. Can be used to implement AND/OR/NOT. Implementing an inverter using NAND gate: x x' (x.x)' = x' (T1: idempotency)

NAND Gate Implementing AND using NAND gates: x x.y y (x.y)' ((xy)'(xy)')' = ((xy)')' idempotency = (xy) involution Implementing OR using NAND gates: x x+y y x' y' ((xx)'(yy)')' = (x'y')' idempotency = x''+y'' DeMorgan = x+y involution

(x+x)' = x' (T1: idempotency) NOR Gate NOR gate is also self-sufficient. Therefore, {NOR} is also a complete set of logic Can be used to implement AND/OR/NOT. Implementing an inverter using NOR gate: x x' (x+x)' = x' (T1: idempotency)

NOR Gate Implementing AND using NOR gates: x x.y y x' y' ((x+x)'+(y+y)')'=(x'+y')' idempotency = x''.y'' DeMorgan = x.y involution Implementing OR using NOR gates: x x+y y (x+y)' ((x+y)'+(x+y)')' = ((x+y)')' idempotency = (x+y) involution

Implementation using NAND gates Possible to implement any Boolean expression using NAND gates. Procedure: (i) Obtain sum-of-products Boolean expression: e.g. F3 = xy'+x'z (ii) Use DeMorgan theorem to obtain expression using 2-level NAND gates = (xy'+x'z)' ' involution = ((xy')' . (x'z)')' DeMorgan

Implementation using NAND gates x' z F3 (x'z)' (xy')' x y' F3 = ((xy')'.(x'z)') ' = xy' + x'z

Implementation using NOR gates Possible to implement any Boolean expression using NOR gates. Procedure: (i) Obtain product-of-sums Boolean expression: e.g. F6 = (x+y').(x'+z) (ii) Use DeMorgan theorem to obtain expression using 2-level NOR gates. = ((x+y').(x'+z))' ' involution = ((x+y')'+(x'+z)')' DeMorgan

Implementation using NOR gates x' z F6 (x'+z)' (x+y')' x y' F6 = ((x+y')'+(x'+z)')' = (x+y').(x'+z)

Chapter 1: Introduction Logical Equivalence All three circuits implement F = A B function CS1103 Chapter 1: Introduction

Logical Equivalence (cont’d) Derivation of logical expression from a circuit Trace from the input to output Write down intermediate logical expressions along the path CS1103 Chapter 1: Introduction

Logical Equivalence (cont’d) Proving logical equivalence: Truth table method A B F1 = A B F3 = (A + B) (A + B) (A + B) 0 0 0 0 0 1 0 0 1 0 0 0 1 1 1 1 CS1103 Chapter 1: Introduction

Implementation of SOP Expressions Sum-of-Products expressions can be implemented using: 2-level AND-OR logic circuits 2-level NAND logic circuits AND-OR logic circuit F A B D C E F = AB + CD + E

Implementation of SOP Expressions NAND-NAND circuit (by circuit transformation) a) add double bubbles b) change OR-with- inverted-inputs to NAND & bubbles at inputs to their complements F A B D C E E'

Deriving Logical Expressions (cont’d) 3-input majority function A B C F 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 1 1 1 1 1 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 Sigma notation S(3, 5, 6, 7) CS1103 Chapter 1: Introduction

Brute Force Method of Implementation 3-input even-parity function A B C F 0 0 0 0 0 0 1 1 0 1 0 1 0 1 1 0 1 0 0 1 1 0 1 0 1 1 0 0 1 1 1 1 SOP implementation CS1103 Chapter 1: Introduction

Implementation of POS Expressions Product-of-Sums expressions can be implemented using: 2-level OR-AND logic circuits 2-level NOR logic circuits OR-AND logic circuit G A B D C E G = (A+B).(C+D).E

Implementation of POS Expressions NOR-NOR circuit (by circuit transformation): a) add double bubbles b) changed AND-with- inverted-inputs to NOR & bubbles at inputs to their complements G A B D C E E'

Deriving Logical Expressions (cont’d) 3-input majority function A B C F 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 1 1 1 1 1 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) Pi notation  (0, 1, 2, 4 ) CS1103 Chapter 1: Introduction

Brute Force Method of Implementation 3-input even-parity function A B C F 0 0 0 0 0 0 1 1 0 1 0 1 0 1 1 0 1 0 0 1 1 0 1 0 1 1 0 0 1 1 1 1 POS implementation CS1103 Chapter 1: Introduction

Positive & Negative Logic In logic gates, usually: H (high voltage, 5V) = 1 L (low voltage, 0V) = 0 This convention – positive logic. However, the reverse convention, negative logic possible: H (high voltage) = 0 L (low voltage) = 1 Depending on convention, same gate may denote different Boolean function.

Positive & Negative Logic A signal that is set to logic 1 is said to be asserted, or active, or true. A signal that is set to logic 0 is said to be deasserted, or negated, or false. Active-high signal names are usually written in uncomplemented form. Active-low signal names are usually written in complemented form.

Positive & Negative Logic Positive logic: Enable Active High: 0: Disabled 1: Enabled Negative logic: Enable Active Low: 0: Enabled 1: Disabled

Integrated Circuit Logic Families Some digital integrated circuit families: TTL, CMOS, ECL. TTL: Transistor-Transistor Logic. Uses bipolar junction transistors Consists of a series of logic circuits: standard TTL, low-power TTL, Schottky TTL, low-power Schottky TTL, advanced Schottky TTL, etc.

Integrated Circuit Logic Families

Integrated Circuit Logic Families CMOS: Complementary Metal-Oxide Semiconductor. Uses field-effect transistors ECL: Emitter Coupled Logic. Uses bipolar circuit technology. Has fastest switching speed but high power consumption.

Integrated Circuit Logic Families Performance characteristics Propagation delay time. Power dissipation. Fan-out: Fan-out of a gate is the maximum number of inputs that the gate can drive. Speed-power product (SPP): product of the propagation delay time and the power dissipation.

Drawing Logic Circuits When a Boolean expression is provided, we can easily draw the logic circuit. Examples: F1 = xyz' (note the use of a 3-input AND gate) x y z F1 z'

Analysing Logic Circuits When a logic circuit is provided, we can analyse the circuit to obtain the logic expression. Example: What is the Boolean expression of F4? A' B' C F4 A'B' A'B'+C (A'B'+C)' F4 = (A'B'+C)'

Analysing Logic Circuit Example: What is Boolean expression of F5? z F5 x y F5 =

Simple Circuit Design: Two-input Multiplexer Multiplexer with two input bits, A, B and a control input bit S and output Z. Depending on the value of S, the circuit is to transfer either the the value of A or B to the output Z A Truth table from circuit description Z B S A B Z 0 0 0 0 0 0 1 0 0 1 0 1 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 0 1 1 1 1 Using logic design methods (to be studied later) we get the optimal logic function for Z Z = S’. A + S . B S S’. A A S Z S’. A + S . B B S . B

Analysis of Combinational Circuits (1) Digital Circuit Design: Word description of a function  a set of switching equations  hardware realization (gates, programmable logic devices, etc.) Digital Circuit Analysis: Hardware realization  switching expressions, truth tables, timing diagrams, etc. Analysis is used To determine the behavior of the circuit To verify the correctness of the circuit To assist in converting the circuit to a different form. CS1103 Chapter 1: Introduction

Analysis of Combinational Circuits (2) Algebraic Method: Use switching algebra to derive a desired form. Example 2.33: Find a simplified switching expressions and logic network for the following logic circuit (Fig. 2.21a). CS1103 Chapter 1: Introduction

Analysis of Combinational Circuits (3) Write switching expression for each gate output: The output is: Simplify the output function using switching algebra: [Eq. 2.24] [T8] [T5(b)] [T4(a)] = b c [Eq. 2.32] Therefore, f (a,b,c) = (b c)' = CS1103 Chapter 1: Introduction

Analysis of Combinational Circuits (4) Example 2.34: Find a simplified switching expressions and logic network for the following logic circuit (Fig. 2.22). CS1103 Chapter 1: Introduction

Analysis of Combinational Circuits (5) Derive the output expression: f(a,b,c) = = [T8(b)] = [T8(a)] = [Eq. 2.24] = [P5(b)] = [P6(b), T4(a)] = [T4(a)] = [T9(a)] = [T7(a)] CS1103 Chapter 1: Introduction

Analysis of Combinational Circuits (6) Truth Table Method: Derive the truth table one gate at a time. The truth table for Example 2.34: CS1103 Chapter 1: Introduction

Analysis of Combinational Circuits (7) Analysis of Timing Diagrams Timing diagram is a graphical representation of input and output signal relationships over the time dimension. Timing diagrams may show intermediate signals and propagation delays. CS1103 Chapter 1: Introduction

Analysis of Combinational Circuits (8) Example 2.35: Derivation of truth table from a timing diagram CS1103 Chapter 1: Introduction

Chapter 1: Introduction CS1103 Chapter 1: Introduction

Integrated Circuits An Integrated circuit (IC) is a number of logic gated fabricated on a single silicon chip. ICs can be classified according to how many gates they contain as follows: Small-Scale Integration (SSI): Contain 1 to 20 gates. Medium-Scale Integration (MSI): Contain 20 to 200 gates. Examples: Registers, decoders, counters. Large-Scale Integration (LSI): Contain 200 to 200,000 gates. Include small memories, some microprocessors, programmable logic devices. Very Large-Scale Integration (VLSI): Usually stated in terms of number of transistors contained usually over 1,000,000. Includes most microprocessors and memories.

Computer Hardware Generations The First Generation, 1946-59: Vacuum Tubes, Relays, Mercury Delay Lines: ENIAC (Electronic Numerical Integrator and Computer): First electronic computer, 18000 vacuum tubes, 1500 relays, 5000 additions/sec. First stored program computer: EDSAC (Electronic Delay Storage Automatic Calculator). The Second Generation, 1959-64: Discrete Transistors. (e.g IBM 7000 series, DEC PDP-1) The Third Generation, 1964-75: Small and Medium-Scale Integrated (SSI, MSI) Circuits. (e.g. IBM 360 mainframe) The Fourth Generation, 1975-Present: The Microcomputer. VLSI-based Microprocessors.

Hierarchy of Computer Architecture High-Level Language Programs Assembly Language Programs Software I/O system Instr. Set Proc. Compiler Operating System Application Digital Design Circuit Design Instruction Set Architecture Firmware Datapath & Control Layout Machine Language Program Software/Hardware Boundary Hardware Microprogram Register Transfer Notation (RTN) Logic Diagrams Circuit Diagrams

Summary Logic Gates Drawing Logic Circuit Analysing Logic Circuit AND, OR, NOT NAND NOR Drawing Logic Circuit Analysing Logic Circuit Given a Boolean expression, draw the circuit. Given a circuit, find the function. Implementation of a Boolean expression using these Universal gates. Implementation of SOP and POS Expressions Positive and Negative Logic Concept of Minterm and Maxterm

End of file