Princess Sumaya University

Slides:



Advertisements
Similar presentations
ECE 2110: Introduction to Digital Systems Chapter 6 Combinational Logic Design Practices Encoders.
Advertisements

5.5 Encoders A encoder is a multiple-input, multiple-output logic circuit that converts coded inputs into coded outputs, where the input and output codes.
Give qualifications of instructors: DAP
Encoders Three-state devices Multiplexers
Logical Design.
Combinational Circuits
Functions and Functional Blocks
Princess Sumaya Univ. Computer Engineering Dept. د. بســام كحـالــه Dr. Bassam Kahhaleh.
Princess Sumaya University
Decoders/DeMUXs CS370 – Spring Decoder: single data input, n control inputs, 2 outputs control inputs (called select S) represent Binary index of.
1 KU College of Engineering Elec 204: Digital Systems Design Lecture 9 Programmable Configurations Read Only Memory (ROM) – –a fixed array of AND gates.
التصميم المنطقي Second Course
Overview Part 2 – Combinational Logic
CS 151 Digital Systems Design Lecture 17 Encoders and Decoders
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 3 – Combinational Logic Design Part 2 –
Section 10.3 Logic Gates.
Combinational Logic Building Blocks
DIGITAL SYSTEMS TCE OTHER COMBINATIONAL LOGIC CIRCUITS DECODERS ENCODERS.
ECE 301 – Digital Electronics Multiplexers and Demultiplexers (Lecture #12)
OTHER COMBINATIONAL LOGIC CIRCUITS WEEK 7 AND WEEK 8 (LECTURE 2 OF 3)
Any logic circuits can be transformed to an implementation where only NAND gates (and inverters) are used. The general approach to finding a NAND-gate.
CS 105 Digital Logic Design
Combinational Circuits
Combinational Logic Chapter 4.
Morgan Kaufmann Publishers
Top-down modular design
ECE 2110: Introduction to Digital Systems Chapter 6 Combinational Logic Design Practices Decoders.
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.
Digital Electronics.
Overview of Chapter 4 °Design digital circuit from specification °Digital inputs and outputs known Need to determine logic that can transform data °Start.
Combinational and Sequential Logic Circuits.
Decoders.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
Combinational Circuit – Arithmetic Circuit
MSI Devices M. Mano & C. Kime: Logic and Computer Design Fundamentals (Chapter 5) Dr. Costas Kyriacou and Dr. Konstantinos Tatas ACOE161 - Digital Logic.
CS2100 Computer Organisation MSI Components (AY2015/6 Semester 1)
Combinational Design, Part 3: Functional Blocks
Logical Circuit Design Week 6,7: Logic Design of Combinational Circuits Mentor Hamiti, MSc Office ,
CS 105 DIGITAL LOGIC DESIGN Chapter 4 Combinational Logic 1.
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.
1 Chapter 4 Combinational Logic Logic circuits for digital systems may be combinational or sequential. A combinational circuit consists of input variables,
Magnitude Comparator Dr. Ahmed Telba.
Digital Systems Section 11 Decoders and Encoders.
Module 11.  In Module 9, we have been introduced to the concept of combinational logic circuits through the examples of binary adders.  Meanwhile, in.
Digital Design Module 2 Decoder Amit Kumar AP SCSE, GU Greater Noida.
1 DLD Lecture 16 More Multiplexers, Encoders and Decoders.
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.
C OMBINATIONAL L OGIC D ESIGN 1 Eng.Maha AlGubali.
ACOE161 (Spring2007)MSI Devices1 Revision on MSI Devices M. Mano & C. Kime: Logic and Computer Design Fundamentals (Chapter 5)
MSI Circuits.
Chapter 3 Digital circuits. 3.1 Logic signals - Gates Binary system : (binary bits or digits) - 0 & 1 - LOW & HIGH - Negated and Asserted.
CS221: Digital Logic Design Combinational Circuits 3
Part 4 Combinational Logic.
Combinational Functions and Circuits
Combinational Logic Circuits
Lecture 4: Combinational Functions and Circuits
Computer Architecture CST 250
Reference: Chapter 3 Moris Mano 4th Edition
ECE 2110: Introduction to Digital Systems Chapter 6 Combinational Logic Design Practices Encoders.
NAND-ONLY LOGIC CIRCUITS
Chapter 6 Functions of Combinational Logic
Programmable Configurations
COE 202: Digital Logic Design Combinational Circuits Part 3
Multiplexers Anindya IE CSE.
Digital Systems Section 17 Decoders and Encoders.
Chapter-4 Combinational Logic
Digital System Design Combinational Logic
Presentation transcript:

Princess Sumaya University 4241 - Digital Logic Design 4241 Digital Logic Design Encoders and Decoders Chapter 4: Combinational Logic (Sections: 4.8, 4.9) Dr. Bassam Kahhaleh

Princess Sumaya University 4241 - Digital Logic Design Princess Sumaya University 4241 - Digital Logic Design 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 Dr. Bassam Kahhaleh

2-to-4 Binary Decoder F0 = X'Y' F1 = X'Y F2 = XY' F3 = XY X Y 2-to-4 Princess Sumaya University 4241 - Digital Logic Design 2-to-4 Binary Decoder F0 = X'Y' F1 = X'Y F2 = XY' F3 = XY X Y 2-to-4 Decoder X Y F0 F1 F2 F3 Note: Each output is a 2-variable minterm (X'Y', X'Y, XY' or XY)

3-to-8 Binary Decoder F1 = x'y'z x z y F0 = x'y'z' F2 = x'yz' Princess Sumaya University 4241 - Digital Logic Design 3-to-8 Binary Decoder F1 = x'y'z x z y F0 = x'y'z' F2 = x'yz' F3 = x'yz F5 = xy'z F4 = xy'z' F6 = xyz' F7 = xyz 3-to-8 Decoder X Y F0 F1 F2 F3 F4 F5 F6 F7 Z

Implementing Functions Using Decoders Princess Sumaya University 4241 - Digital Logic Design Implementing Functions Using Decoders Any n-variable logic function can be implemented using a single n-to-2n 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-2n 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 Princess Sumaya University 4241 - Digital Logic Design 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) 3-to-8 Decoder S2 S1 S0 x y z 1 2 3 4 5 6 7 S C

Standard MSI Binary Decoders Example Princess Sumaya University 4241 - Digital Logic Design 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 Princess Sumaya University 4241 - Digital Logic Design Princess Sumaya University 4241 - Digital Logic Design Building a Binary Decoder with NAND Gates Start with a 2-bit decoder Add an enable signal (E) Note: use of NANDs only one 0 active! if E = 0 Dr. Bassam Kahhaleh

Use two 3 to 8 decoders to make 4 to 16 decoder Princess Sumaya University 4241 - Digital Logic Design Princess Sumaya University 4241 - Digital Logic Design 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 Dr. Bassam Kahhaleh

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

8-to-3 Binary Encoder At any one time, only Princess Sumaya University 4241 - Digital Logic Design 8-to-3 Binary Encoder Inputs Outputs I 1 2 3 4 5 6 7 y2 y1 y0 At any one time, only one input line has a value of 1. 1 1 1 1 1 1 1 1 1 1 I0 I1 I2 I3 I4 I5 I6 I7 y0 = I1 + I3 + I5 + I7 y1 = I2 + I3 + I6 + I7 y2 = I4 + I5 + I6 + I7

Princess Sumaya University 4241 - Digital Logic Design 8-to-3 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 1 2 3 4 5 6 7 y2 y1 y0 Idle x x 1 0 0 X 1 0

Priority Encoder (8 to 3 Encoder) Princess Sumaya University 4241 - Digital Logic Design Princess Sumaya University 4241 - Digital Logic Design 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’ H1=I1. I2’.I3’.I4’.I5’.I6’.I7’ H0=I0.I1’. I2’.I3’.I4’.I5’.I6’.I7’ 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 Y1 Y2 Y0 IDLE I1 I2 I3 I4 I5 I6 I0 I7 Binary encoder Priority Circuit H1 H2 H3 H4 H5 H6 H0 H7 Priority Encoder Dr. Bassam Kahhaleh

Encoder Application (Monitoring Unit) Princess Sumaya University 4241 - Digital Logic Design Princess Sumaya University 4241 - Digital Logic Design Encoder Application (Monitoring Unit) Encoder identifies the requester and encodes the value Controller accepts digital inputs. Encoder Controller Machine Code Machine 1 Machine 2 Machine n Alarm Signal Contoller Response Action Dr. Bassam Kahhaleh

Princess Sumaya University 4241 - Digital Logic Design Princess Sumaya University 4241 - Digital Logic Design Homework Mano 4-27 4-28 Design a 3-bit binary-to-seven-segment decoder using only a 3-to-8 line decoder and OR gates. Label the inputs x, y, and z (with z being the least significant bit) and label the outputs a, b, c, d, e, f, and g (with standard assignment of these outputs to the display segments; see p. 162 of Mano). The decoder of the previous problem can also be implemented using seven 4x1 multiplexers (one for each segment) and some inverters. Design the circuit for segment "a" using a 4x1 multiplexer and any necessary inverters. Dr. Bassam Kahhaleh

Princess Sumaya University 4241 - Digital Logic Design Princess Sumaya University 4241 - Digital Logic Design Summary Decoders allow for generation of a single binary output from an input binary code For an n-input binary decoder there are 2n outputs Decoders are widely used in storage devices (e.g. memories) We will discuss these in a few weeks Encoders can be used for data compression Priority encoders rank inputs and encode the highest priority input Dr. Bassam Kahhaleh