ENGIN 112 Intro to Electrical and Computer Engineering

Similar documents
COMBINATIONAL LOGIC CIRCUITS. Dr. Mudathir A. Fagiri

ELCT201: DIGITAL LOGIC DESIGN

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

COMBINATIONAL LOGIC FUNCTIONS

Systems I: Computer Organization and Architecture

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

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

Digital Logic Design ENEE x. Lecture 14

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

Combinational Logic. By : Ali Mustafa

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

ECE 2300 Digital Logic & Computer Organization

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

CHAPTER1: Digital Logic Circuits Combination Circuits

Boolean Algebra, Gates and Circuits

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

University of Toronto Faculty of Applied Science and Engineering Final Examination

Chapter 3 Combinational Logic Design

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

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

MODULAR CIRCUITS CHAPTER 7

CHAPTER VI COMBINATIONAL LOGIC BUILDING BLOCKS

XI STANDARD [ COMPUTER SCIENCE ] 5 MARKS STUDY MATERIAL.

EEA051 - Digital Logic 數位邏輯 吳俊興高雄大學資訊工程學系. September 2004

Chapter 4: Designing Combinational Systems Uchechukwu Ofoegbu

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

Chapter 2 Boolean Algebra and Logic Gates

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

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

A B OUT_0 OUT_1 OUT_2 OUT_

Section 3: Combinational Logic Design. Department of Electrical Engineering, University of Waterloo. Combinational Logic

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

CSC9R6 Computer Design. Practical Digital Logic

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

Combinatorial Logic Design Principles

CHAPTER VI COMBINATIONAL LOGIC BUILDING BLOCKS

Software Engineering 2DA4. Slides 8: Multiplexors and More

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

Lecture 7: Logic design. Combinational logic circuits

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

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

Department of Electrical & Electronics EE-333 DIGITAL SYSTEMS

Review: Additional Boolean operations

Class Website:

Combinational Logic. Course Instructor Mohammed Abdul kader

211: Computer Architecture Summer 2016

COMBINATIONAL CIRCUITS

Fundamentals of Digital Design

to become literate in most common concepts and terminology of digital electronics

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

Chapter 3 Ctd: Combinational Functions and Circuits

Lecture 10: Synchronous Sequential Circuits Design

Slides for Lecture 19

Combina-onal Logic Chapter 4. Topics. Combina-on Circuit 10/13/10. EECE 256 Dr. Sidney Fels Steven Oldridge

Looking at a two binary digit sum shows what we need to extend addition to multiple binary digits.

Combinational Logic Design Combinational Functions and Circuits

Digital Logic and Design (Course Code: EE222) Lecture 19: Sequential Circuits Contd..

COE 202: Digital Logic Design Combinational Circuits Part 4. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:

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

EC-121 Digital Logic Design

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

CSE20: Discrete Mathematics for Computer Science. Lecture Unit 2: Boolan Functions, Logic Circuits, and Implication

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

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

Chapter 3 Combinational Logic Design

Chapter 2: Switching Algebra and Logic Circuits

Digital Circuit And Logic Design I. Lecture 4

Total Time = 90 Minutes, Total Marks = 100. Total /10 /25 /20 /10 /15 /20

CSE 140L Spring 2010 Lab 1 Assignment Due beginning of the class on 14 th April

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

COSC 243. Introduction to Logic And Combinatorial Logic. Lecture 4 - Introduction to Logic and Combinatorial Logic. COSC 243 (Computer Architecture)

Binary addition example worked out

Lecture 2 Review on Digital Logic (Part 1)

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

Sample Test Paper - I

Digital Logic: Boolean Algebra and Gates. Textbook Chapter 3

ENGIN 112 Intro to Electrical and Computer Engineering

3. Combinational Circuit Design

Lecture A: Logic Design and Gates

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

Philadelphia University Student Name: Student Number:

Applications. Smartphone, tablet, game controller, antilock brakes, microprocessor, Wires

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

Computer Science. 20. Combinational Circuits. Computer Science COMPUTER SCIENCE. Section

Building a Computer Adder

Experiment 7: Magnitude comparators

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

14:332:231 DIGITAL LOGIC DESIGN. Combinational Circuit Synthesis

Logic Design I (17.341) Fall Lecture Outline

Numbers & Arithmetic. Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University. See: P&H Chapter , 3.2, C.5 C.

CSE370 HW3 Solutions (Winter 2010)

Boolean Algebra and Logic Simplification

CprE 281: Digital Logic

Digital Techniques. Figure 1: Block diagram of digital computer. Processor or Arithmetic logic unit ALU. Control Unit. Storage or memory unit

Digital Electronics Circuits 2017

Floating Point Representation and Digital Logic. Lecture 11 CS301

DE58/DC58 LOGIC DESIGN DEC 2014

Computer organization

Boole Algebra and Logic Series

Sequential Logic Circuits

Transcription:

ENGIN 112 Intro to Electrical and Computer Engineering Lecture 17 Encoders and Decoders

Overview Binary decoders Converts an n-bit code to a single active output Can be developed using AND/OR gates Can be used to implement logic circuits. Binary encoders Converts one of 2 n inputs to an n-bit output Useful for compressing data Can be developed using AND/OR gates Both encoders and decoders are extensively used in digital systems

Binary Decoder Black box with n input lines and 2 n output lines Only one output is a 1 for any given input n inputs Binary Decoder 2 n outputs

2-to-44 Binary Decoder Truth Table: X Y F 0 F 1 F 2 F 3 0 0 1 0 0 0 0 1 0 1 0 0 1 0 0 0 1 0 1 1 0 0 0 1 F 0 = X'Y' F 1 = X'Y From truth table, circuit for 2x4 decoder is: Note: Each output is a 2- variable minterm (X'Y', X'Y, XY' or XY) F 2 = XY' F 3 = XY X Y 2-to-4 Decoder F0 F1 F2 F3 X Y

3-to-88 Binary Decoder Truth Table: x y z F 0 F 1 F 2 F 3 F 4 F 5 F 6 F 7 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 1 0 0 1 1 0 0 0 0 0 0 0 1 0 1 1 1 0 0 0 0 0 0 0 1 F 0 = x'y'z' F 1 = x'y'z F 2 = x'yz' F 3 = x'yz F 4 = xy'z' F 5 = xy'z F 6 = xyz' X Y Z 3-to-8 Decoder F0 F1 F2 F3 F4 F5 F6 x y z F 7 = xyz F7

Implementing Functions Using Decoders Any n-variable logic function can be implemented using a single n-to-2 n decoder to generate the minterms OR gate forms the sum. The output lines of the decoder corresponding to the minterms of the function are used as inputs to the or gate. Any combinational circuit with n inputs and m outputs can be implemented with an n-to-2 n decoder with m OR gates. Suitable when a circuit has many outputs, and each output function is expressed with few minterms.

Implementing Functions Using Decoders Example: Full adder S(x, y, z) = S (1,2,4,7) C(x, y, z) = S (3,5,6,7) x y z C S 0 0 0 0 0 0 0 1 0 1 0 1 0 0 1 0 1 1 1 0 1 0 0 0 1 1 0 1 1 0 1 1 0 1 0 1 1 1 1 1 x y z 3-to-8 Decoder S 2 S 1 S 0 0 1 2 3 4 5 6 7 S C

Standard MSI Binary Decoders Example 74138 (3-to-8 decoder) (a) Logic circuit. (b) Package pin configuration. (c) Function table.

Building a Binary Decoder with NAND Gates Start with a 2-bit decoder Add an enable signal (E) Note: use of NANDs if E = 0 only one 0 active!

Use two 3 to 8 decoders to make 4 to 16 decoder Enable can also be active high In this example, only one decoder can be active at a time. x, y, z effectively select output line for w

Encoders If the a decoder's output code has fewer bits than the input code, the device is usually called an encoder. e.g. 2 n -to-n The simplest encoder is a 2 n -to-n binary encoder One of 2 n inputs = 1 Output is an n-bit binary number 2 n inputs... Binary encoder... n outputs

8-to-33 Binary Encoder At any one time, only one input line has a value of 1. I 0 I 1 Inputs Outputs I 0 I 1 I 2 I 3 I 4 I 5 I 6 I 7 y 2 y 1 y 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 1 0 0 1 0 1 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 1 1 1 1 y 2 = I 4 + I 5 + I 6 + I 7 I 2 I 3 y 1 = I 2 + I 3 + I 6 + I 7 I 4 I 5 I 6 I 7 y 0 = I 1 + I 3 + I 5 + I 7

8-to-33 Priority Encoder What if more than one input line has a value of 1? Ignore lower priority inputs. Idle indicates that no input is a 1. Note that polarity of Idle is opposite from Table 4-8 in Mano Inputs Outputs I 0 I 1 I 2 I 3 I 4 I 5 I 6 I 7 y 2 y 1 y 0 Idle 0 0 0 0 0 0 0 0 x x x 1 1 0 0 0 0 0 0 0 0 0 0 0 X 1 0 0 0 0 0 0 0 0 1 0 X X 1 0 0 0 0 0 0 1 0 0 X X X 1 0 0 0 0 0 1 1 0 X X X X 1 0 0 0 1 0 0 0 X X X X X 1 0 0 1 0 1 0 X X X X X X 1 0 1 1 0 0 X X X X X X X 1 1 1 1 0

Priority Encoder (8 to 3 encoder) Assign priorities to the inputs When more than one input are asserted, the output generates the code of the input with the highest priority Priority Encoder : H7=I7 (Highest Priority) H6=I6.I7 H5=I5.I6.I7 H4=I4.I5.I6.I7 H3=I3.I4.I5.I6.I7 H2=I2.I3.I4.I5.I6.I7 I0 H1=I1. I2.I3.I4.I5.I6.I7 H0=I0.I1. I2.I3.I4.I5.I6.I7 I1 IDLE= I0.I1. I2.I3.I4.I5.I6.I7 Encoder Y0 = I1 + I3 + I5 + I7 Y1 = I2 + I3 + I6 + I7 Y2 = I4 + I5 + I6 + I7 I2 I3 I4 I5 I6 I7 Priority Circuit I0 I1 I2 I3 I4 I5 I6 I7 H0 H1 H2 H3 H4 H5 H6 H7 IDLE Priority encoder Binary encoder I0 I1 I2 I3 I4 I5 I6 I7 Y0 Y1 Y2 Y0 Y1 Y2 IDLE

Encoder Application (Monitoring Unit) Encoder identifies the requester and encodes the value Controller accepts digital inputs. Alarm Signal Contoller Response Machine 1 Machine 2 Encoder Machine Code Controller Action Machine n

Summary Decoder allows for generation of a single binary output from an input binary code For an n-input binary decoder there are 2 n outputs Decoders are widely used in storage devices (e.g. memories) We will discuss these in a few weeks Encoders all for data compression Priority encoders rank inputs and encode the highest priority input Next time: storage elements!