CSE 140 Lecture 11 Standard Combinational Modules. CK Cheng and Diba Mirza CSE Dept. UC San Diego

Similar documents
CSE140: Components and Design Techniques for Digital Systems. Decoders, adders, comparators, multipliers and other ALU elements. Tajana Simunic Rosing

CS 140 Lecture 14 Standard Combinational Modules

COMBINATIONAL LOGIC CIRCUITS. Dr. Mudathir A. Fagiri

Unit 3 Session - 9 Data-Processing Circuits

CHAPTER VI COMBINATIONAL LOGIC BUILDING BLOCKS

CHAPTER VI COMBINATIONAL LOGIC BUILDING BLOCKS

MODULAR CIRCUITS CHAPTER 7

Digital Logic Design ENEE x. Lecture 14

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

CSE140: Components and Design Techniques for Digital Systems. Logic minimization algorithm summary. Instructor: Mohsen Imani UC San Diego

Combinational Logic. By : Ali Mustafa

Lecture 4: Four Input K-Maps

Combinational Logic Design Combinational Functions and Circuits

CSE 140: Components and Design Techniques for Digital Systems

Lecture 8: Sequential Networks and Finite State Machines

ELCT201: DIGITAL LOGIC DESIGN

CprE 281: Digital Logic

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

211: Computer Architecture Summer 2016

Function of Combinational Logic ENT263

IT T35 Digital system desigm y - ii /s - iii

Combinational Logic. Mantıksal Tasarım BBM231. section instructor: Ufuk Çelikcan

CSEE 3827: Fundamentals of Computer Systems. Combinational Circuits

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

ENGIN 112 Intro to Electrical and Computer Engineering

Digital System Design Combinational Logic. Assoc. Prof. Pradondet Nilagupta

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

CprE 281: Digital Logic

Appendix B. Review of Digital Logic. Baback Izadi Division of Engineering Programs

Arithmetic Circuits-2

3. Combinational Circuit Design

CMSC 313 Lecture 19 Homework 4 Questions Combinational Logic Components Programmable Logic Arrays Introduction to Circuit Simplification

Design of Combinational Logic

Adders, subtractors comparators, multipliers and other ALU elements

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

Combinational Logic. Lan-Da Van ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C.

Systems I: Computer Organization and Architecture

Philadelphia University Student Name: Student Number:

Combinational Logic. Lan-Da Van ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C.


Hardware Design I Chap. 4 Representative combinational logic

Digital Integrated Circuits A Design Perspective. Arithmetic Circuits. Jan M. Rabaey Anantha Chandrakasan Borivoje Nikolic.

COSC3330 Computer Architecture Lecture 2. Combinational Logic

Design of Sequential Circuits

Slides for Lecture 19

UNIT II COMBINATIONAL CIRCUITS:

Lecture 2 Review on Digital Logic (Part 1)

Computer Science. 19. Combinational Circuits. Computer Science COMPUTER SCIENCE. Section 6.1.

Adders, subtractors comparators, multipliers and other ALU elements

COMBINATIONAL LOGIC FUNCTIONS

Combinatorial RTL Components

Floating Point Representation and Digital Logic. Lecture 11 CS301

University of Toronto Faculty of Applied Science and Engineering Final Examination

We are here. Assembly Language. Processors Arithmetic Logic Units. Finite State Machines. Circuits Gates. Transistors

MODEL ANSWER SUMMER 17 EXAMINATION Subject Title: Principles of Digital Techniques

Sample Test Paper - I

ว ตถ ประสงค ของบทเร ยน

Logic Design Combinational Circuits. Digital Computer Design

Chapter 3 Ctd: Combinational Functions and Circuits

Chapter 4 (Lect 4) Encoders Multiplexers Three-State Gates More Verilog

ECE 2300 Digital Logic & Computer Organization

Unit 9. Multiplexers, Decoders, and Programmable Logic Devices. Unit 9 1

Logic and Computer Design Fundamentals. Chapter 8 Sequencing and Control

Digital Integrated Circuits A Design Perspective. Arithmetic Circuits. Jan M. Rabaey Anantha Chandrakasan Borivoje Nikolic.

A B D 1 Y D 2 D 3. Truth table for 4 to 1 MUX: A B Y 0 0 D D D D 3

DESIGN AND IMPLEMENTATION OF ENCODERS AND DECODERS. To design and implement encoders and decoders using logic gates.

Boolean Algebra and Digital Logic 2009, University of Colombo School of Computing

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

Class Website:

CHAPTER1: Digital Logic Circuits Combination Circuits

SAU1A FUNDAMENTALS OF DIGITAL COMPUTERS

Lecture 22 Chapters 3 Logic Circuits Part 1

PG - TRB UNIT-X- DIGITAL ELECTRONICS. POLYTECHNIC-TRB MATERIALS

SIR C.R.REDDY COLLEGE OF ENGINEERING ELURU DIGITAL INTEGRATED CIRCUITS (DIC) LABORATORY MANUAL III / IV B.E. (ECE) : I - SEMESTER

CMSC 313 Lecture 18 Midterm Exam returned Assign Homework 3 Circuits for Addition Digital Logic Components Programmable Logic Arrays

CSE 140, Lecture 2 Combinational Logic CK Cheng CSE Dept. UC San Diego

Lecture 7: Logic design. Combinational logic circuits

Software Engineering 2DA4. Slides 8: Multiplexors and More

Chapter 3 Combinational Logic Design

CMSC 313 Lecture 19 Combinational Logic Components Programmable Logic Arrays Karnaugh Maps

Chapter 4: Combinational Logic Solutions to Problems: [1, 5, 9, 12, 19, 23, 30, 33]

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

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

Fundamentals of Digital Design

CMPEN 411 VLSI Digital Circuits Spring Lecture 21: Shifters, Decoders, Muxes

Combinational Logic. Jee-Hwan Ryu. School of Mechanical Engineering Korea University of Technology and Education

UNIT III Design of Combinational Logic Circuits. Department of Computer Science SRM UNIVERSITY

Philadelphia University Student Name: Student Number:

Digital Logic. CS211 Computer Architecture. l Topics. l Transistors (Design & Types) l Logic Gates. l Combinational Circuits.

DIGITAL TECHNICS. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute

KUMARAGURU COLLEGE OF TECHNOLOGY COIMBATORE

Introduction to Digital Logic Missouri S&T University CPE 2210 Multiplexers/Demultiplexers

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

Menu. 7-Segment LED. Misc. 7-Segment LED MSI Components >MUX >Adders Memory Devices >D-FF, RAM, ROM Computer/Microprocessor >GCPU

CMP 334: Seventh Class

Arithmetic Circuits-2

Digital Electronics Circuits 2017

Chapter 4: Designing Combinational Systems Uchechukwu Ofoegbu

Example: sending one bit of information across noisy channel. Effects of the noise: flip the bit with probability p.

XI STANDARD [ COMPUTER SCIENCE ] 5 MARKS STUDY MATERIAL.

Transcription:

CSE 4 Lecture Standard Combinational Modules CK Cheng and Diba Mirza CSE Dept. UC San Diego

Part III - Standard Combinational Modules (Harris: 2.8, 5) Signal Transport Decoder: Decode address Encoder: Encode address Multiplexer (Mux): Select data by address Demultiplexier (DeMux): Direct data by address Shifter: Shift bit location Data Operator Adder: Add two binary numbers Multiplier: Multiply two binary numbers 2

. Decoder Definition Logic Diagram Application (Universal Set) Tree of Decoders 3

iclicker: Decoder Definition A. A device that decodes B. An electronic device that converts signals from one form to another C. A machine that converts a coded text into ordinary language D. A device or program that translates encoded data into its original format E. All of the above 4

Decoder Definition: A digital module that converts a binary address to the assertion of the addressed device E (enable) I I I 2 2 n inputs n= 3 2 3 4 5 6 7 y y.. y 7 2 n outputs 2 3 = 8 n to 2 n decoder function: y i = if E= & (I 2, I, I ) = i y i = otherwise 5

Interconnect: Decoder, Encoder, Mux, DeMux Processors P Data Mux Arbiter Memory Bank Address Data P2 Address 2 Address k Pk Demux Mux Data k Address n n-m m 2 m Decoder Decoder: Decode the address to assert the addressed device Mux: Select the inputs according to the index addressed by the control signals 6

. Decoder: Definition PI Q: What is the output Y 3: of the 2:4 decoder for (A, A ) = (,)? A. (,,, ) B. (,,, ) C. (,,, ) D. (,,, ) A A 2:4 Decoder Y 3 Y 2 Y Y A A Y 3 Y 2 Y Y 7

. Decoder: Definition N inputs, 2 N outputs One-hot outputs: only one output HIGH at once A A E= E 2:4 Decoder Y 3 Y 2 Y Y A A Y 3 Y 2 Y Y 8

Decoder: Logic Diagram E Output Expression: y i = E m i I I I 2 I I I 2 y y y = if E= & (I 2, I, I )=(,,).. I I I 2 y 7 y 7 = if E= & (I 2, I, I )=(,,) 9

Decoder Application: universal set {Decoder, OR} Example: Implement the following functions with a 3-input decoder and OR gates. i) f (a,b,c) = Σm(,2,4) ii) f 2 (a,b,c) = Σm(2,3), iii) f 3 (a,b,c) = Σm(,5,6)

Decoder Application: universal set {Decoder, OR} Example: Implement functions i) f (a,b,c) = Σm(,2,4) ii) f 2 (a,b,c) = Σm(2,3), iii) f 3 (a,b,c) = Σm(,5,6) with a 3-input decoder and OR gates. E= y y 2 y 4 f c b a y I y 2 I 3. 4. 5 I 2 6 7 y 7 y 2 y 3 f 2 y y 5 y 6 f 3

Decoders OR minterms A B E= 2:4 Decoder Minterm AB AB AB AB Y = AB + AB = A B Y 2

Tree of Decoders Implement a 4-2 4 decoder with 3-2 3 decoders. d c b y I y 2 I 3 4 5 I 2 6 7 y 7 a y 8 I y 9 2 I 3 4 5 I 2 6 7 y 5 3

Tree of Decoders Implement a 6-2 6 decoder with 3-2 3 decoders. E E y I 2, I, I D y 7 I 5, I 4, I 3 I 2, I, I D y 8 y 5 y 56 I 2, I, I D7 y 63 4

PI Q: A four variable switching function f(a,b,c,d) can be implemented using which of the following? A. :2 decoders and OR gates B. 2:4 decoders and OR gates C. 3:8 decoders and OR gates D. None of the above E. All of the above 5

2. Encoder Definition (What is it?) Logic Diagram (How is it realized?) Priority Encoder (Special type of encoder) 6

iclicker: Definition of Encoder A. Any program, circuit or algorithm which encodes B. In digital audio technology, an encoder is a program that converts an audio WAV file into an MP3 file C. A device that convert a message from plain text into code D. A circuit that is used to convert between digital video and analog video E. All of the above 7

2. Encoder: Definition En 8 inputs 3 outputs I I 7 2 3 4 5 6 7 A 2 y y y 2 At most one I i =. (y n-,.., y ) = i if I i = & En = (y n-,.., y ) = otherwise. A = if En = and one i s.t. I i = A = otherwise. 8

Encoder Definition: A digital module that converts the assertion of a device to the binary address of the device. E I 2 n - I y n- y I I 7 2 3 4 5 6 7 E y y y 2 A 8 inputs A 3 outputs 2 Encoder Description: At most one I i =. (y n-,.., y ) = i if I i = & E = (y n-,.., y ) = otherwise. A = if E = and one i s.t. I i = A = otherwise. 9

Encoder: Logic Diagram En En y y I I 3 I 5 I 7 En I 2 I 3 I 6 I 7 En y 2 I 4 I 5 I 6 I 7 I I. I 6 I 7 A 2

Priority Encoder: E I y 2 I 3 3 y Eo Gs 2

Priority Encoder: Definition Description: Input (I 2 n -,, I ), Output (y n-,,, y ) E (y n-,,, y ) = i if I i = & E = & I k = for all k > i (high bit priority) or for all k< i (low bit priority). I 2 3 4 5 6 7 2 y y y 2 E o = if E = & I i = for all i, G s = if E = & i s.t. I i =. (G s is like A, and E o tells us if enable is true or not). E I 7 Eo Gs 22

Priority Encoder: Implement a 32-input priority encoder w/ 8 input priority encoders (high bit priority). E I 3-24 y 32, y 3, y 3 Eo Gs I 25-6 y 22, y 2, y 2 Eo Gs I 5-8 y 2, y, y Eo Gs I 7- y 2, y, y Eo Gs 23

Multiplexer Definition Logic Diagram Application 24

3. Mux (Multiplexer) Definition: A digital module that selects one of data inputs according to the binary address of the selector. D 2 n - -D (Data input) E y Description If E = y = D i where i = (S n-,.., S ) Else y = S n-, (Selector) 25

iclicker: Multiplexer Definition A. A device that interleaves two or more activities B. A communications device that combines several signals for transmission over a single medium C. A logic circuit that sends one of several inputs out over a single output channel. D. The circuit that uses a common communications channel for sending two or more messages or signals. E. All of the above 26

Multiplexer (Mux): Definition Selects between one of N inputs to connect to the output. log 2 N-bit select input control input Example: S 2: Mux D D Y S D D Y S Y D D 27

PI Q: What is the output of the following MUX? A. B. C. Can t say E = y S= 28

Multiplexer Definition: Example En D D D 2 D 3 2 3 y S S y S S 29

Multiplexer: Logic Diagram Logic gates Sum-of-products form Y D D S Y = D S + D S Tristates For an N-input mux, use N tristates Turn on exactly one to select the appropriate input S D D Y S D D Y 3

Multiplexer Application Mux for a Boolean function with truth table as input A B Y Y = AB A B Y 3

Multiplexer: Application Y = AB A B Y A Y A B B Y 32

Multiplexer Application: universal set {Mux} Example : Given f (a,b,c) = Σm (,,7) + Σd(2), implement with an 8-input Mux. Id a b c f 2-3 4 5 6 7 33

Multiplexer Application: universal set {Mux} Example : Given f (a,b,c) = Σm (,,7) + Σd(2), implement with an 8-input Mux. Id a b c f 2-3 4 5 6 7 2 3 4 5 6 7 En S 2 S S a b c y 34

Example 2: Given f (a,b,c) = Σm (,,7) + Σd(2), implement with 4-input Muxes. E a b c = c = D (c) D (c) = D (c) = D 2 (c) = D 3 (c) = 2 3 y S S a b 35

Example 2: Given f (a,b,c) = Σm (,,7) + Σd(2), implement with 4-input Muxes. E a b c = - c = D (c) D (c) = D (c) = D 2 (c) = D 3 (c) =c c 2 3 S S y a b 36

Example 3: Given f (a,b,c) = Σm (,,7) + Σd(2), implement with 2- input Muxes. a D (b,c) - D (b,c) D (b,c) E y a 37

Example 3: Given f (a,b,c) = Σm (,,7) + Σd(2), implement with 2- input Muxes. a D (b,c) - D (b,c) D (b,c) E D (b,c) = b - D (b,c) = bc b D (b,c) y c b c b a 38

Example 3: Given f (a,b,c) = Σm (,,7) + Σd(2), implement with 2- input Muxes. D (b,c) b c = c = l () = l (c) = c E b y a 39

Example 3: Given f (a,b,c) = Σm (,,7) + Σd(2), implement with 2- input Muxes. D (b,c) b c = c = E l () = l (c) = c E b y c a b 4

4. Demultiplexers E x Control Input 4

4. Demultiplexers E y i = x if i = (S n-,.., S ) & E= y i = otherwise x y 2 n- -y S(n-,) Control Input 42

Shifters Logical shifter: shifts value to left or right and fills empty spaces with s Ex: >> 2 = Ex: << 2 = Arithmetic shifter: same as logical shifter, but on right shift, fills empty spaces with the old most significant bit (msb). Ex: >>> 2 = Ex: <<< 2 = Rotator: rotates bits in a circle, such that bits shifted off one end are shifted into the other end Ex: ROR 2 = Ex: ROL 2 = 43

Shifter x n x n- x x - s d s d E y i = x i- if E =, s =, and d = L = x i+ if E =, s =, and d = R = x i if E =, s = = if E = yn- y x i+ x i x i- Can be implemented with a mux s d 3 2 E yi

Shifter Design A 3 A 2 A A shamt : 2 S : Y 3 shamt : 2 S : Y 2 4 4 A 3: >> Y 3: S : Y S : Y 45

Barrel Shifter shift x s O or shift s O or 2 shift s 2 O or 4 shift y

Shifters as Multipliers and Dividers A left shift by N bits multiplies a number by 2 N Ex: << 2 = ( 2 2 = 4) Ex: << 2 = (-3 2 2 = -2) The arithmetic right shift by N divides a number by 2 N Ex: >>> 2 = (8 2 2 = 2) Ex: >>> 2 = (-6 2 2 = -4) 47