Henry Lin, Department of Electrical and Computer Engineering, California State University, Bakersfield Lecture 7 (Digital Logic) July 24 th, 2012

Similar documents
Lecture (05) Boolean Algebra and Logic Gates

QUESTION BANK FOR TEST

Digital Logic Design Exercises. Assignment 1

Chapter 2 Logic Gates and Introduction to Computer Architecture

Objectives: 1- Bolean Algebra. Eng. Ayman Metwali

Lecture 21: Combinational Circuits. Integrated Circuits. Integrated Circuits, cont. Integrated Circuits Combinational Circuits

Philadelphia University Student Name: Student Number:

DIGITAL CIRCUIT LOGIC UNIT 9: MULTIPLEXERS, DECODERS, AND PROGRAMMABLE LOGIC DEVICES

Chap-2 Boolean Algebra

R10. II B. Tech I Semester, Supplementary Examinations, May

Chapter 2. Boolean Algebra and Logic Gates

1. Mark the correct statement(s)

6.1 Combinational Circuits. George Boole ( ) Claude Shannon ( )

01 Introduction to Digital Logic. ENGR 3410 Computer Architecture Mark L. Chang Fall 2008

Boolean Logic CS.352.F12

2.1 Binary Logic and Gates

Von Neumann Architecture

Bawar Abid Abdalla. Assistant Lecturer Software Engineering Department Koya University

CS 261 Fall Mike Lam, Professor. Combinational Circuits

(ii) Simplify and implement the following SOP function using NOR gates:

Computer Organization and Levels of Abstraction

Lecture #21 March 31, 2004 Introduction to Gates and Circuits

3. The high voltage level of a digital signal in positive logic is : a) 1 b) 0 c) either 1 or 0

LECTURE 4. Logic Design

Basic Arithmetic (adding and subtracting)

Electronic Engineering Part 1 Laboratory Experiment. Digital Circuit Design 1 Combinational Logic. (3 hours)

01 Introduction to Digital Logic. ENGR 3410 Computer Architecture Mark L. Chang Fall 2006

Digital logic fundamentals. Question Bank. Unit I

Injntu.com Injntu.com Injntu.com R16

Combinational Circuits

SUBJECT CODE: IT T35 DIGITAL SYSTEM DESIGN YEAR / SEM : 2 / 3

EXPERIMENT #8: BINARY ARITHMETIC OPERATIONS

Code No: 07A3EC03 Set No. 1

Chapter 3. Boolean Algebra and Digital Logic

Lecture 4: Implementation AND, OR, NOT Gates and Complement

Boolean Algebra and Logic Gates

Computer Organization and Levels of Abstraction

LAB #1 BASIC DIGITAL CIRCUIT

2008 The McGraw-Hill Companies, Inc. All rights reserved.

KING FAHD UNIVERSITY OF PETROLEUM & MINERALS COMPUTER ENGINEERING DEPARTMENT

Reference Sheet for C112 Hardware

6.1 Combinational Circuits. George Boole ( ) Claude Shannon ( )

Code No: R Set No. 1

Parallel logic circuits

Combinational Circuits

Review. EECS Components and Design Techniques for Digital Systems. Lec 05 Boolean Logic 9/4-04. Seq. Circuit Behavior. Outline.

6. Combinational Circuits. Building Blocks. Digital Circuits. Wires. Q. What is a digital system? A. Digital: signals are 0 or 1.

Boolean Algebra. BME208 Logic Circuits Yalçın İŞLER

GC03 Boolean Algebra

ECE 341 Midterm Exam

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 3, 2015

Mark Redekopp, All rights reserved. EE 352 Unit 8. HW Constructs

SIR C.R.REDDY COLLEGE OF ENGINEERING, ELURU DEPARTMENT OF INFORMATION TECHNOLOGY LESSON PLAN

END-TERM EXAMINATION

NADAR SARASWATHI COLLEGE OF ENGINEERING AND TECHNOLOGY Vadapudupatti, Theni

UPY14602-DIGITAL ELECTRONICS AND MICROPROCESSORS Lesson Plan

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 2, 2016

CS470: Computer Architecture. AMD Quad Core

COMP combinational logic 1 Jan. 18, 2016

UNIT - V MEMORY P.VIDYA SAGAR ( ASSOCIATE PROFESSOR) Department of Electronics and Communication Engineering, VBIT

Logic, Words, and Integers

Code No: R Set No. 1

Introduction to Computer Architecture

Propositional Calculus. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson

BUILDING BLOCKS OF A BASIC MICROPROCESSOR. Part 1 PowerPoint Format of Lecture 3 of Book

1. Prove that if you have tri-state buffers and inverters, you can build any combinational logic circuit. [4]

register:a group of binary cells suitable for holding binary information flip-flops + gates

Honorary Professor Supercomputer Education and Research Centre Indian Institute of Science, Bangalore

HANSABA COLLEGE OF ENGINEERING & TECHNOLOGY (098) SUBJECT: DIGITAL ELECTRONICS ( ) Assignment

CS61C : Machine Structures

DIGITAL ELECTRONICS. Vayu Education of India

(Refer Slide Time: 00:01:53)

CONTENTS CHAPTER 1: NUMBER SYSTEM. Foreword...(vii) Preface... (ix) Acknowledgement... (xi) About the Author...(xxiii)

Propositional Calculus. Math Foundations of Computer Science

Arab Open University. Computer Organization and Architecture - T103

CAD4 The ALU Fall 2009 Assignment. Description

DE Solution Set QP Code : 00904

Binary Adders: Half Adders and Full Adders

Experiment 4 Boolean Functions Implementation

ELCT 501: Digital System Design

Computer Systems. Binary Representation. Binary Representation. Logical Computation: Boolean Algebra

CS 261 Fall Mike Lam, Professor. Logic Gates

Hours / 100 Marks Seat No.

Introduction to Boole algebra. Binary algebra

DLD VIDYA SAGAR P. potharajuvidyasagar.wordpress.com. Vignana Bharathi Institute of Technology UNIT 3 DLD P VIDYA SAGAR

This presentation will..

B.Tech II Year I Semester (R13) Regular Examinations December 2014 DIGITAL LOGIC DESIGN

Software and Hardware

EE292: Fundamentals of ECE

Chap.3 3. Chap reduces the complexity required to represent the schematic diagram of a circuit Library

Computer Architecture

Assignment (3-6) Boolean Algebra and Logic Simplification - General Questions

1 /8_ 2 /12 3 /12 4 /25 5 /12 6 /15 7 /16

VALLIAMMAI ENGINEERING COLLEGE. SRM Nagar, Kattankulathur DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING EC6302 DIGITAL ELECTRONICS

Department of Electrical Engineering McGill University ECSE 221 Introduction to Computer Engineering Assignment 2 Combinational Logic

University of Toronto Faculty of Applied Science and Engineering Edward S. Rogers Sr. Department of Electrical and Computer Engineering

Chapter 2. Boolean Expressions:

SYNERGY INSTITUTE OF ENGINEERING & TECHNOLOGY,DHENKANAL LECTURE NOTES ON DIGITAL ELECTRONICS CIRCUIT(SUBJECT CODE:PCEC4202)

MGU-BCA-205- Second Sem- Core VI- Fundamentals of Digital Systems- MCQ s. 2. Why the decimal number system is also called as positional number system?

Real Digital Problem Set #6

Transcription:

Henry Lin, Department of Electrical and Computer Engineering, California State University, Bakersfield Lecture 7 (Digital Logic) July 24 th, 2012 1

Digital vs Analog Digital signals are binary; analog signals are real-valued numbers 2

Integrated Circuits The building blocks of computers Designed for specialized functions Examples: the CPU, bus interface, memory management unit Transistors: primary components of Ics Motorola MPC 7400 PowerPC modules: 6.5 million transistors in less than in² 3

Transistors Boolean algebra: basis for computer logic design Transistors: means for implementing Boolean algebra Switches: on/off to represent the 0 s and 1 s of binary digital circuits Combined to form logic gates 4

Combinatorial logic Digital Circuits Results of an operation depend only on the present inputs to the operation Uses: perform arithmetic, control data movement, compare values for decision making Sequential logic Results depend on both the inputs to the operation and the result of the previous operation Uses: counter 5

Boolean Algebra Rules that govern constants and variables that can take on 2 values True/false; on/off; yes/no; 0/1 Boolean logic Rules for handling Boolean constants and variables 3 fundamental operations: AND, OR and NOT Truth Table: specifies results for all possible input combinations 6

Logic Functions Logical functions can be expressed in several ways: Truth table Logical expressions Graphical form 7

AND Boolean Operators Result TRUE if and only if both input 0 0 operands 0 are true C = A B INCLUSIVE-OR Result TRUE if any input operands are true C = A + B A B C 0 1 0 1 0 0 1 1 1 A B C 0 0 0 0 1 1 1 0 1 1 1 1 8

NOT Boolean Operators Result TRUE if single input value is FALSE C = A A C 0 1 1 0 9

Switching Circuits 10

AND Operator Similar Examples If the car is fueled AND the engine works, then the engine works, then the engine will start. AND means that both conditions must be true in order for the conclusion to be true. OR Operator If I have cash or a credit card, then I can pay the bill. OR works such that the output is true, if either of the two inputs is true. 11

Similar Examples XOR (Exclusive OR) Operator If gender A XOR gender B, then reproduction is possible. XOR works such that output is activated (equal to one) if both inputs are of a different value. 12

EXCLUSIVE-OR Boolean Operators Result TRUE if either A or B is TRUE but not both C = A B Can be derived from INCLUSIVE-OR, AND and NOT A xor B equals A or B but not both A and B A B = (A + B) ( A B ) A xor B = either A and not B or B and not A A B = (A B ) + ( B A ) 13

Boolean Algebra Operations Valid for INCLUSIVE-OR, AND, XOR Associative A + ( B + C ) = ( A + B ) + C Distributive A ( B + C ) = A B + A C Commutative A + B = B + A DeMorgan s Theorems A + B = A B A B = A + B 14

Gates and Combinatorial Logic Many computer functions defined in terms of Boolean equations Example: sum of 2 single binary digit numbers Truth table for sum Truth table for carry XOR AND A B C 0 0 0 0 1 1 1 0 1 1 1 0 A B C 0 0 0 0 1 0 1 0 0 1 1 1 15

Computer Implementation Gates or logical gates Integrated circuits constructed from transistor switches and other electronic components VLSI: very large-scale integration 16

Level of Integration An IC (a chip) Examples: Small-scale Integration (SSI): < 10 gates Medium-scale Integration (MSI): 10 ~ 100 gates Large-scale Integration (LSI): 100 ~ xk gates Very Large-scale Integration (VLSI): > xk gates VLSI Small size (compact size) Low cost Low power consumption High reliability High speed 17

Boolean Algebra Implementation Single type of gate appropriately combined 2 possibilities NAND gate: AND operation followed by a NOT operation NOR gate: INCLUSIVE-OR followed by a NOT operation Note: indicates a NOT operation 18

NAND gate Proving NAND gate is universal 19

NOR gate Proving NOR gate is universal 20

Gates with multiple inputs Graphic symbols and input-output signals for logic gates with multiple inputs 21

Multi-Input AND Gate AND gates can be built with any number of inputs Consider the symbol for the 4-input AND gate F is true only when all the inputs are true (1 s) 22

Multi-Input AND Gate Using 3 two-input AND gates, we could build the same 4-input AND gate. 23

Majority function Output is one whenever majority of inputs is 1. We use 3-input majority function. 24

Majority function 25

Practice Problem Find the output of the following circuit Answer: (x+y)y x+y (x+y)y y 26

Practice Problem Find the output of the following circuit x y x y x y Answer: 27

Practice Problem Write the circuits for the following Boolean algebraic expressions x x+y 28

Practice Problem Write the circuits for the following Boolean algebraic expressions x x+y x+y (x+y)x y 29

Logical Equivalence All three circuits implement F=AB function. 30

Logical Equivalence Proving logical equivalence of two circuits Derive the logical expression for the output of each circuit. 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 31

Logical Equivalence Derivation of logical expression from a circuit Trace from the input to output Write down intermediate logical expressions along the path. 32

Logical Equivalence 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 33

Boolean Algebra 34

Boolean Algebra 35

Boolean Algebra Proving logical equivalence: Boolean algebra method To prove that two logical functions F1 and F2 are equivalent Start with one function and apply Boolean laws to derive the other function Needs intuition as to which laws should be applied and when Practice helps Sometimes it may be convenient to reduce both functions to the same expression Example: F1=AB and F3=(A+B)(A+B)(A+B) are equivalent. 36

Logical Expression Simplification One method is algebraic manipulation Use Boolean laws to simplify the expression. Difficult to use Don t know if you have the simplified form 37

Algebraic Manipulation Majority function example A B C + A B C + A B C + A B C = Added extra 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 38

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

Selector or Multiplexer Switch input back and forth between inputs Logic circuits that make up a computer Are relatively simple but Look complicated because many circuits required 40

How to add binary numbers Consider adding two 1-bit binary numbers x and y 0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 10 Carry is x AND y Sum is x XOR y The circuit to compute this is called a half-adder. 41

Half-Adder 42

Using half adders We can then use a half-adder to compute the sum of two Boolean numbers. 43

How to fix this We need to create an adder that can take a carry bit as an additional input. Inputs: x, y, carry in Outputs: sum, carry out This is called a full adder. Will add x and y with a half-adder Will add the sum of that to the carry in What about the carry out? It s 1 if either (or both): X + y = 10 X + y = 01 and carry in - 1 44

Truth Table for Full Adder 45

Full Adder Handles possible carry from previous bit Half adder shown as block to simplify 2-bit adder contains 32 circuits Also called ripple adder because the carry ripples through 32 bits 46

Carry lookahead adders Ripple-carry adders can be slow Delay proportional to number of bits Carry lookahead adders Eliminate the delay of ripple-carry adders Carry-ins are generated independently C 0 = A 0 B 0 C 1 = A 0 B 0 A 1 + A 0 B 0 B 1 + A 1 B 1 Requires complex circuits Usually, a combination of carry lookahead and ripplecarry techniques are used 47

Sequential Logic Circuits Output depends on Input Previous state of the circuit Flip-flop: basic memory element State table: output for all combinations of input and previous states 48

Sequential Logic Circuits Main components of a sequential circuit 49

Clock Signal 50

Clock Signal Clock serves two distinct purposes Synchronization point Start of a cycle End of a cycle Intermediate point at which the clock signal changes levels Timing information Clock period, ON, and OFF periods Propagation delay Time required for the output to react to changes in the inputs 51

Clock Signal 52

Flip-Flop Types with State Tables 53

Register COPY Operation Uses both sequential and combinatorial logic 54

Steps in a LOAD Instruction 55

56