Lecture 2 Review on Digital Logic (Part 1)

Similar documents
CHAPTER1: Digital Logic Circuits Combination Circuits

Number System conversions

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

Logic Design. Chapter 2: Introduction to Logic Circuits

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

CHAPTER III BOOLEAN ALGEBRA

Chapter 2: Princess Sumaya Univ. Computer Engineering Dept.

UNIVERSITI TENAGA NASIONAL. College of Information Technology

Chapter 2 Combinational Logic Circuits

Chapter 2: Switching Algebra and Logic Circuits

CHAPTER III BOOLEAN ALGEBRA

Systems I: Computer Organization and Architecture

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

Digital Circuit And Logic Design I. Lecture 3

Chap 2. Combinational Logic Circuits

Combinational Logic. Review of Combinational Logic 1

CHAPTER 2 BOOLEAN ALGEBRA

211: Computer Architecture Summer 2016

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

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

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

EC-121 Digital Logic Design

MC9211 Computer Organization

Unit 2 Session - 6 Combinational Logic Circuits

Combinational Logic Fundamentals

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

EEE130 Digital Electronics I Lecture #4

This form sometimes used in logic circuit, example:

Chapter 2 Combinational Logic Circuits

Chapter 7 Logic Circuits

MODULAR CIRCUITS CHAPTER 7

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

Binary logic consists of binary variables and logical operations. The variables are

Signals and Systems Digital Logic System

Class Website:

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

LOGIC GATES. Basic Experiment and Design of Electronics. Ho Kyung Kim, Ph.D.

ELCT201: DIGITAL LOGIC DESIGN

Midterm Examination # 1 Wednesday, February 25, Duration of examination: 75 minutes

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

Chapter 2 Boolean Algebra and Logic Gates

Chapter 2: Boolean Algebra and Logic Gates

Review for Test 1 : Ch1 5

CPE100: Digital Logic Design I

Combinational Logic Design Principles

Ex: Boolean expression for majority function F = A'BC + AB'C + ABC ' + ABC.

DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING CS6201 DIGITAL PRINCIPLES AND SYSTEM DESIGN

Boolean Algebra & Logic Gates. By : Ali Mustafa

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

14:332:231 DIGITAL LOGIC DESIGN. Why Binary Number System?

CS 226: Digital Logic Design

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

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

Chapter 2 : Boolean Algebra and Logic Gates

Gate-Level Minimization

Chapter 2. Boolean Algebra and Logic Gates

Week-I. Combinational Logic & Circuits

UNIT 4 MINTERM AND MAXTERM EXPANSIONS

Administrative Notes. Chapter 2 <9>

Chapter 2 Boolean Algebra and Logic Gates

Digital Logic Design. Malik Najmus Siraj

Department of Electrical & Electronics EE-333 DIGITAL SYSTEMS

Cs302 Quiz for MID TERM Exam Solved

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

Chapter 2 Combinational logic

Fundamentals of Digital Design

ELCT201: DIGITAL LOGIC DESIGN

Boolean Algebra and Logic Simplification

Lecture A: Logic Design and Gates

KUMARAGURU COLLEGE OF TECHNOLOGY COIMBATORE

Boolean Algebra, Gates and Circuits

Chapter 2 Boolean Algebra and Logic Gates

UNIT 1. BOOLEAN ALGEBRA AND COMBINATIONAL CIRCUITS

ENG2410 Digital Design Combinational Logic Circuits

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

Functions. Computers take inputs and produce outputs, just like functions in math! Mathematical functions can be expressed in two ways:

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

BOOLEAN ALGEBRA TRUTH TABLE

Part 5: Digital Circuits

Logic Design Combinational Circuits. Digital Computer Design

ENGIN 112 Intro to Electrical and Computer Engineering

SAMPLE ANSWERS MARKER COPY

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

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

Digital Logic Design. Combinational Logic

Chapter 4. Combinational: Circuits with logic gates whose outputs depend on the present combination of the inputs. elements. Dr.

COMBINATIONAL LOGIC FUNCTIONS

CHAPTER 7. Exercises 17/ / /2 2 0

WEEK 2.1 BOOLEAN ALGEBRA

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

Solutions to Assignment No 5 Digital Techniques Fall 2007

L2: Combinational Logic Design (Construction and Boolean Algebra)

Sample Marking Scheme

Logic and Boolean algebra

Chapter 2 Combinational Logic Circuits

Review: Additional Boolean operations

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

Combinational Logic. By : Ali Mustafa

Logic. Combinational. inputs. outputs. the result. system can

Transcription:

Lecture 2 Review on Digital Logic (Part 1) Xuan Silvia Zhang Washington University in St. Louis http://classes.engineering.wustl.edu/ese461/

Grading Engagement 5% Review Quiz 10% Homework 10% Labs 40% Final Project 35% Policy: 90% or above A 80% - 89% B 65% - 79% C 45% - 64% D 44% or below F 2

3 Number Systems Decimal (radix r=10) digits 0-9 Binary (radix r=2) (1011.01) 2 = (. ) 10 Octal radix = 8 Hexadecimal each HEX digit can represent 4 bits (10011110.0101) 2 = (. ) 16 (11110010.0001) 2 = (. ) 16 (11010100.1111) 2 = (. ) 16

4 Base Conversion Convert the integer part Convert the fraction part Join the two results with a radix point Example: (325.64) 10 to (. ) 5 2*5^3 + 3*5^2 = 325 3*5^(-1) + 1*5^(-2) = 0.64 i = ir1 i A Bir2

Range of Numbers Integer (n-bit Number) 2 n different numbers Min: 0 Max: 2 n -1 Fraction (m-bit Number) Min: 0 Max: (2 m -1)/2 m 5

Complements Diminished Radix Complement of N defined as (r n -1)-N, with n = number of digits or bits 1 s complement for binary (radix = 2) Radix Complement defined as r n -N 2 s complement for binary Why subtraction as addition of complement if negative? 6

Binary Complement 1 s complement complement each individual bit (bitwise NOT) 2 s complement 1 s complement plus 1 alternative start from the least significant bit (LSB) copy all least significant 0 s copy the first 1 complement all bits thereafter 7

Subtraction with 2 s Complement For n-digit unsigned numbers M and N M N =? add 2 s complement of N to M M + (2 n N) = M N + 2 n Example carry 1 carry 0 8

Signed Binary Numbers To represent a sign (+ or -) need one more bit sign + magnitude signed-complements Positive numbers unchanged Negative numbers use one of the two methods # sign+ 1 s 2 s +2 010 010 010-2 110 101 110 +3 011 011 011-3 111 100 101 +0 000 000 000-0 100 111 000 9

2 s Complement Arithmetic Addition represent negative number by its 2 s complement add the number including the sign bits discard a carry out of the sign bits e.g. M + (-N) -> M + (2 n -N) Subtraction M N -> M + (2 n -N) form the complement of the subtrahend follow the rules for addition 10

Overflow Error occurs when out of range [-2 n-1, 2 n-1-1] carry-in into the sign bit different from the carry-out 11

12 Outline Number Representation Boolean Logic and Gates Combinational Logic

Binary Logic and Gates Basic logic operations AND: X Y OR: X+Y NOT: X or /X Truth table all possible input combinations CMOS as a switch 13

Boolean Algebra 9. Basic identities 1. X + 0 = X 2. X. 1 = X 3. X + 1 = 1 4. X. 0 = 0 5. X + X = X 6. X. X = X 7. 1 8. 0 X + X = X = X Involution Multiple Variables X. X = Existence 0 and 1 or operations with 0 and 1 Idempotence Existence complements Replace + by.,. by +, Dual 0 by 1 and 1 by 0 10. X + Y = Y + X 12. (X + Y) + Z = X + (Y + Z) 14. X (Y+ Z) = XY + XZ 16. X + Y X. Y = Commutative Associative Distributive DeMorgan s 11. XY YX = 13. (XY) Z X(Y Z ) = 15. X + YZ = (X + Y) (X + Z) 17. X. Y X + Y = 14

15 Boolean Algebra Other useful theorems XY + XY = Y Minimization Dual (X + Y)(X + Y) = Y X + XY = X X + XY = X + Y Absorption Simplification X(X + Y) = X X(X + Y) = XY XY + XZ + YZ = XY + XZ Consensus (X + Y)( X + Z)(Y + Z) = (X + Y)( X + Z)

Standard (Canonical) Forms For comparison of equality Correspondence to the truth table Sum of Products (SOP) sum of minterms Product of Sum (POS) product of maxterms Index Minterm Maxterm 0 (00) /x/ y x + y 1 (01) /x y x + /y 2 (10) x /y /x + y 3 (11) x y /x + /y Relationship between min and MAX term M = i m i m = i M i 16

Circuit Optimization Simplest implementation Cost criterion literal cost (L) gate input cost (G) gate input cost with NOTs (GN) Examples (all the same function): F = BD + AB C + AC D L = F = BD + AB C + AB D + ABC L = F = (A + B)(A + D)(B + C + D )( B + C + D)L = Which solution is best? 17

Karnaugh Maps (K-map) Simplify Boolean algebra Transfer truth table to 2D grid ordered in Gray code Human s pattern recognition capability don t cares race hazards 18

19 Other Gate Types A A B A B A B BUF NAND NOR XOR XNOR A B A B 0 0 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 1 0 1 0 1 1 1 0 0 0 1 IN EN Tri-State Buffer OUT= IN.EN OUT Truth Table EN IN OUT 0 X Hi-Z 1 0 0 1 1 1

CMOS NAND and NOR Gates 20

NAND Mapping Algorithm Replace ANDs and ORs.... Repeat until there is at most one inverter between a circuit input or driving NAND gate output the attached NAND gate inputs.. 21

NOR Mapping Algorithm Replace ANDs and ORs.... Repeat until there is at most one inverter between a circuit input or driving NOR gate output the attached NOR gate inputs.. 22

23 Construct AOI and OAI Gates AND-OR-INVERT (AOI) OR-AND-INVERT (OAI)

24 Outline Number Representation Boolean Logic and Gates Combinational Logic

Decoding n-bit to represent up to m=2 n elements convert n-bit input to m-bit output code n m 2 n n bits A 0 : : A n-1 n-2 n decoder D 0 D 1 : : D m-1 m-elements 2 n outputs correspond to minterms: D i = m i divide into smaller decoders 25

Arbitrary Combinational Logic Decoder and OR gates implement m functions of n variables SOP expressions one n-to-2 n line decoder m OR gates, one for each output 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 A B C 2 1 0 0 1 2 3 4 5 6 7 Indicate MSB, LSB F=Σm(3,5,6,7) F 26

Encoding Convert one-hot code to its position assume exactly one bit is 1 need to know its position Priority more than one input value is 1 27

28 Multiplexing Select data a set of n information inputs to select from a set of k control (select) lines to make selection a single output n 2 k inputs I 0 I 1 I 2 I 3 0 1 2 3 : : OUT I n-1 n-1 k-1.. 1 0 S k-1..s 1 S 0 k select lines

29 MUX Realization SOP Expression 2 k -1 OUT = Σ m i I i i=0 Transmission gates

30 Questions? Comments? Discussion?

Homework #1 Download problem sets from class website Due 09/07 (Wednesday) in class No grace period 31