Chapter 3 Decoder and Encoder Digital Logic Design III

Slides:



Advertisements
Similar presentations
Princess Sumaya University
Advertisements

Functions and Functional Blocks
Decoders/DeMUXs CS370 – Spring Decoder: single data input, n control inputs, 2 outputs control inputs (called select S) represent Binary index of.
Overview Part 2 – Combinational Logic
CPEN Digital System Design
COE 202: Digital Logic Design Combinational Circuits Part 3 Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office: Ahmad Almulhem, KFUPM.
CS 151 Digital Systems Design Lecture 17 Encoders and Decoders
CS 140 Lecture 13 Combinational Standard Modules Professor CK Cheng CSE Dept. UC San Diego 1.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 3 – Combinational Logic Design Part 2 –
Combinational Logic Building Blocks
DIGITAL SYSTEMS TCE OTHER COMBINATIONAL LOGIC CIRCUITS DECODERS ENCODERS.
ECE 331 – Digital System Design
ECE 301 – Digital Electronics Multiplexers and Demultiplexers (Lecture #12)
Multiplexer MUX. 2 Multiplexer Multiplexer (Selector)  2 n data inputs,  n control inputs,  1 output  Used to connect 2 n points to a single point.
Chapter2 Digital Components Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2009.
ETE Digital Electronics Multiplexers, Decoders and Encoders [Lecture:10] Instructor: Sajib Roy Lecturer, ETE, ULAB.
Combinational Circuits
Combinational Circuits
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Logic and Computer Design.
Combinational Logic Chapter 4.
9/15/09 - L15 Decoders, Multiplexers Copyright Joanne DeGroat, ECE, OSU1 Decoders and Multiplexers.
Morgan Kaufmann Publishers
Outline Decoder Encoder Mux. Decoder Accepts a value and decodes it Output corresponds to value of n inputs Consists of: Inputs (n) Outputs (2 n, numbered.
CS 151: Digital Design Chapter 3 3-8: Encoding. CS 151 Encoding Encoding - the opposite of decoding - the conversion of a maximum of 2 n input code to.
Combinational Logic Design
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 3 – Combinational Logic Design Part 2 –
Combinational and Sequential Logic Circuits.
Combinational Circuit – Arithmetic Circuit
Chapter 3 Combinational Design Digital Logic Design III
Combinational Circuits
CS2100 Computer Organisation MSI Components (AY2015/6 Semester 1)
WEEK #9 FUNCTIONS OF COMBINATIONAL LOGIC (DECODERS & MUX EXPANSION)
Boolean Algebra and Logic Gates 1 Computer Engineering (Logic Circuits) Lec. # 8 (Combinational Logic Circuit) Dr. Tamer Samy Gaafar Dept. of Computer.
Combinational Design, Part 3: Functional Blocks
Logical Circuit Design Week 6,7: Logic Design of Combinational Circuits Mentor Hamiti, MSc Office ,
Kuliah Rangkaian Digital Kuliah 6: Blok Pembangun Logika Kombinasional Teknik Komputer Universitas Gunadarma.
Multiplexers and Demultiplexers, and Encoders and Decoders
(Combinational Logic Circuit)
Morgan Kaufmann Publishers
COE 202: Digital Logic Design Combinational Circuits Part 3
CSE 140 Lecture 12 Combinational Standard Modules CK Cheng CSE Dept. UC San Diego 1.
Decoders, Encoders, Multiplexers
CS151 Introduction to Digital Design
Chap 2. Combinational Logic Circuits
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 7 Dr. Shi Dept. of Electrical and Computer Engineering.
Chapter Four Combinational Logic 1. Discrete quantities of information are represented in digital systems by binary codes. A binary code of n bits is.
Chapter Four Combinational Logic 1. C OMBINATIONAL C IRCUITS It consists of input variables, logic gates and output variables. Output is function of input.
Digital Systems Section 11 Decoders and Encoders.
Combinational Circuit Design. Digital Circuits Combinational CircuitsSequential Circuits Output is determined by current values of inputs only. Output.
Chapter 3: Combinational Functions and Circuits 3-5 to 3-7: Decoders
DIGITAL LOGIC DESIGN & COMPUTER ARCHTECTURE
Digital System Design Multiplexers and Demultiplexers, and Encoders and Decoders.
CS151 Introduction to Digital Design Chapter 3: Combinational Logic Design 3-5 Combinational Functional Blocks 3-6 Rudimentary Logic Functions 3-7 Decoding.
SYEN 3330 Digital SystemsJung H. Kim Chapter SYEN 3330 Digital Systems Chapter 4 -Part 1.
ECE 2110: Introduction to Digital Systems Chapter 6 Combinational Logic Design Practices Multiplexers.
Digital Design Lecture 8 Combinatorial Logic (Continued)
1 DLD Lecture 16 More Multiplexers, Encoders and Decoders.
CSE 140 Lecture 13 Combinational Standard Modules Professor CK Cheng CSE Dept. UC San Diego 1.
Chapter4: Combinational Logic Part 4 Originally By Reham S. Al-Majed Imam Muhammad Bin Saud University.
CSE 140 Lecture 12 Combinational Standard Modules CK Cheng CSE Dept. UC San Diego 1.
Decoders Zhijian John Wang. What are they? Overview of a decoder A device that reverses the process of an encoder Convert information from one format.
UNIT 9 MULTIPLEXERS, DECODERS, AND PROGRAMMABLE LOGIC DEVICES
MSI Circuits.
CS221: Digital Logic Design Combinational Circuits 3
Combinational Functions and Circuits
Lecture 4: Combinational Functions and Circuits
Reference: Chapter 3 Moris Mano 4th Edition
Digital System Design Combinational Logic
Presentation transcript:

Chapter 3 Decoder and Encoder Digital Logic Design III وزارة التعليم العالي والبحث العلمي جامعة الكوفة - كلية التربية – قسم علوم الحاسوب Digital Logic Design III Chapter 3 Decoder and Encoder Dr. Wissam Hasan Mahdi Alagele e-mail:wisam.alageeli@uokufa.edu.iq http://edu-clg.kufauniv.com/staff/Mr.Wesam

Decoder definition Decoding is the conversion of an n-bit input code to an m-bit output code with n ≤ m ≤ 2n, such that each valid code work produces a unique output code. Decoding is performed by a logic circuit called a decoder.

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

Decoders A decoder has N inputs 2N outputs A decoder selects one of 2N outputs by decoding the binary value on the N inputs. The decoder generates all of the minterms of the N input variables. Exactly one output will be active for each combination of the inputs. What does “active” mean?

Princess Sumaya University 4241 - Digital Logic Design Decoders Extract “Information” from the code Binary Decoder Example: 2-bit Binary Number Only one lamp will turn on 1 2 3 Binary Decoder x1 x0 1 Dr. Bassam Kahhaleh

n-to-m-line decoders Circuit has n inputs and m outputs and m ≤ 2n Start with n=1 and m=2 This a 1-to-2 Line decoder – exactly one of the output lines will be active.

Princess Sumaya University 4241 - Digital Logic Design Decoders A decoder when n=2 and m=4 A 2-to-4 line decoder Note that only one output is ever active Binary Decoder I1 I0 y3 y2 y1 y0 I1 I0 Y3 Y2 Y1 Y0 0 0 0 0 0 1 0 1 0 0 1 0 1 0 0 1 0 0 1 1 1 0 0 0 Dr. Bassam Kahhaleh

Truth Table, 3-to-8 Decoder Notice they are minterms

Schematic

Multi-Level 3-to-8

Princess Sumaya University 4241 - Digital Logic Design Decoders 3-to-8 Line Decoder Binary Decoder I2 I1 I0 Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 Dr. Bassam Kahhaleh

Enable Enable is a common input to logic functions See it in memories and today’s logic blocks

2-to-4 with Enable

Princess Sumaya University 4241 - Digital Logic Design Decoders “Enable” Control Binary Decoder I1 I0 E Y3 Y2 Y1 Y0 E I1 I0 Y3 Y2 Y1 Y0 x x 0 0 0 0 1 0 0 0 0 0 1 0 1 0 0 1 0 1 0 0 1 0 0 1 1 1 0 0 0 Dr. Bassam Kahhaleh

Enable Used for Expansion

Princess Sumaya University 4241 - Digital Logic Design Decoders Expansion I2 I1 I0 I2 I1 I0 Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 1 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 1 0 0 1 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 Binary Decoder I0 I1 E Y3 Y2 Y1 Y0 Y7 Y6 Y5 Y4 Dr. Bassam Kahhaleh

Princess Sumaya University 4241 - Digital Logic Design Decoders Active-High / Active-Low I1 I0 Y3 Y2 Y1 Y0 0 0 0 0 0 1 0 1 0 0 1 0 1 0 0 1 0 0 1 1 1 0 0 0 I1 I0 Y3 Y2 Y1 Y0 0 0 1 1 1 0 0 1 1 1 0 1 1 0 1 0 1 1 1 1 0 1 1 1 Binary Decoder I1 I0 Y3 Y2 Y1 Y0 Binary Decoder I1 I0 Y3 Y2 Y1 Y0 Dr. Bassam Kahhaleh

Implementation Using Decoders Princess Sumaya University 4241 - Digital Logic Design Implementation Using Decoders Each output is a minterm All minterms are produced Sum the required minterms Example: Full Adder S(x, y, z) = ∑(1, 2, 4, 7) C(x, y, z) = ∑(3, 5, 6, 7) I2 I1 I0 Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 Binary Decoder x y z S C Dr. Bassam Kahhaleh

Implementation Using Decoders Princess Sumaya University 4241 - Digital Logic Design Implementation Using Decoders I2 I1 I0 Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 Binary Decoder x y z S C I2 I1 I0 Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 Binary Decoder x y z S C Dr. Bassam Kahhaleh

Encoders An encoder has 2N inputs N outputs An encoder outputs the binary value of the selected (or active) input. An encoder performs the inverse operation of a decoder. Issues What if more than one input is active? What if no inputs are active?

Princess Sumaya University 4241 - Digital Logic Design Encoders Put “Information” into code Binary Encoder Example: 4-to-2 Binary Encoder Only one switch should be activated at a time 1 2 3 Binary Encoder y1 y0 x1 x2 x3 x3 x2 x1 y1 y0 0 0 0 0 0 0 0 1 0 1 0 1 0 1 0 1 0 0 1 1 Dr. Bassam Kahhaleh

Princess Sumaya University 4241 - Digital Logic Design Encoders Octal-to-Binary Encoder (8-to-3) Binary Encoder Y2 Y1 Y0 I7 I6 I5 I4 I3 I2 I1 I0 I7 I6 I5 I4 I3 I2 I1 I0 Y2 Y1 Y0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 1 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 1 1 1 Dr. Bassam Kahhaleh

Encoder / Decoder Pairs Princess Sumaya University 4241 - Digital Logic Design Encoder / Decoder Pairs Binary Encoder Binary Decoder Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 7 7 I7 I6 I5 I4 I3 I2 I1 I0 6 6 5 5 Y2 Y1 Y0 I2 I1 I0 4 4 3 3 2 2 1 1 Dr. Bassam Kahhaleh

Princess Sumaya University 4241 - Digital Logic Design Multiplexers S1 S0 Y 0 0 I0 0 1 I1 1 0 I2 1 1 I3 MUX Y I0 I1 I2 I3 S1 S0 Dr. Bassam Kahhaleh

Princess Sumaya University 4241 - Digital Logic Design Multiplexers 2-to-1 MUX 4-to-1 MUX MUX Y I0 I1 S MUX Y I0 I1 I2 I3 S1 S0 Dr. Bassam Kahhaleh

Princess Sumaya University 4241 - Digital Logic Design Multiplexers Quad 2-to-1 MUX x3 x2 x1 x0 MUX Y I0 I1 S y3 y2 y1 y0 MUX A3 A2 A1 A0 S E Y3 Y2 Y1 Y0 B3 B2 B1 B0 S Dr. Bassam Kahhaleh

Princess Sumaya University 4241 - Digital Logic Design Multiplexers Quad 2-to-1 MUX MUX A3 A2 A1 A0 S E Y3 Y2 Y1 Y0 B3 B2 B1 B0 Extra Buffers Dr. Bassam Kahhaleh

Implementation Using Multiplexers Princess Sumaya University 4241 - Digital Logic Design Implementation Using Multiplexers Example F(x, y) = ∑(0, 1, 3) x y F 0 0 1 0 1 1 0 1 1 MUX Y I0 I1 I2 I3 S1 S0 1 F x y Dr. Bassam Kahhaleh

Implementation Using Multiplexers Princess Sumaya University 4241 - Digital Logic Design Implementation Using Multiplexers Example F(x, y, z) = ∑(1, 2, 6, 7) MUX Y I0 I1 I2 I3 I4 I5 I6 I7 S2 S1 S0 1 x y z F 0 0 0 0 0 1 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 F x y z Dr. Bassam Kahhaleh

Implementation Using Multiplexers Princess Sumaya University 4241 - Digital Logic Design Implementation Using Multiplexers Example F(x, y, z) = ∑(1, 2, 6, 7) x y z F 0 0 0 0 0 1 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 MUX Y I0 I1 I2 I3 S1 S0 z F = z F z F = z 1 F = 0 x y F = 1 Dr. Bassam Kahhaleh

Implementation Using Multiplexers Princess Sumaya University 4241 - Digital Logic Design Implementation Using Multiplexers Example F(A, B, C, D) = ∑(1, 3, 4, 11, 12, 13, 14, 15) A B C D F 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 MUX Y I0 I1 I2 I3 I4 I5 I6 I7 S2 S1 S0 D F = D D F = D D F = D F F = 0 D F = 0 1 F = D 1 F = 1 F = 1 A B C Dr. Bassam Kahhaleh

Multiplexer Expansion Princess Sumaya University 4241 - Digital Logic Design Multiplexer Expansion 8-to-1 MUX using Dual 4-to-1 MUX Y I0 I1 I2 I3 I4 I5 I6 I7 S2 S1 S0 MUX Y I0 I1 I2 I3 S1 S0 MUX Y I0 I1 S MUX Y I0 I1 I2 I3 S1 S0 1 0 0 Dr. Bassam Kahhaleh

Princess Sumaya University 4241 - Digital Logic Design DeMultiplexers DeMUX I Y3 Y2 Y1 Y0 S1 S0 S1 S0 Y3 Y2 Y1 Y0 0 0 I 0 1 1 0 1 1 Dr. Bassam Kahhaleh

Multiplexer / DeMultiplexer Pairs Princess Sumaya University 4241 - Digital Logic Design Multiplexer / DeMultiplexer Pairs MUX DeMUX Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 7 7 I7 I6 I5 I4 I3 I2 I1 I0 6 6 5 5 4 4 Y I 3 3 2 2 1 1 S2 S1 S0 S2 S1 S0 Synchronize x2 x1 x0 y2 y1 y0 Dr. Bassam Kahhaleh

DeMultiplexers / Decoders Princess Sumaya University 4241 - Digital Logic Design DeMultiplexers / Decoders DeMUX I Y3 Y2 Y1 Y0 S1 S0 Binary Decoder I1 I0 E Y3 Y2 Y1 Y0 E I1 I0 Y3 Y2 Y1 Y0 x x 0 0 0 0 1 0 0 0 0 0 1 0 1 0 0 1 0 1 0 0 1 0 0 1 1 1 0 0 0 S1 S0 Y3 Y2 Y1 Y0 0 0 I 0 1 1 0 1 1 Dr. Bassam Kahhaleh

Princess Sumaya University 4241 - Digital Logic Design Three-State Gates Tri-State Buffer Tri-State Inverter C A Y 0 x Hi-Z 1 0 1 1 1 A Y C A Y C Dr. Bassam Kahhaleh

Princess Sumaya University 4241 - Digital Logic Design Three-State Gates C D Y 0 0 Hi-Z 0 1 B 1 0 A 1 1 ? A Y C B Not Allowed D A C B A if C = 1 B if C = 0 Y= Dr. Bassam Kahhaleh

Princess Sumaya University 4241 - Digital Logic Design Three-State Gates I3 I2 Y I1 I0 Binary Decoder Y3 Y2 Y1 Y0 S1 I1 I0 E S0 E Dr. Bassam Kahhaleh