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.

Slides:



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

Give qualifications of instructors: DAP
Princess Sumaya University
Overview Part 2 – Combinational Logic Functions and functional blocks
Combinational Circuits
Functions and Functional Blocks
Henry Hexmoor1 C hapter 4 Henry Hexmoor-- SIUC Rudimentary Logic functions: Value fixing Transferring Inverting.
Code Converters, Multiplexers and Demultiplexers
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
Overview Functions and functional blocks Rudimentary logic functions
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 3 – Combinational Logic Design Part 2 –
DIGITAL SYSTEMS TCE OTHER COMBINATIONAL LOGIC CIRCUITS WEEK 7 AND WEEK 8 (LECTURE 1 OF 3) COMPARATORS CODE CONVERTERS.
ECE 331 – Digital System Design Logic Circuit Design (Lecture #7)
EE2174: Digital Logic and Lab
DIGITAL SYSTEMS TCE OTHER COMBINATIONAL LOGIC CIRCUITS DECODERS ENCODERS.
Chapter 3 Combinational Logic Design
COE 202: Digital Logic Design Combinational Circuits Part 4
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.
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.
Combinational Logic Design
Outline Analysis of Combinational Circuits Signed Number Arithmetic
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 3 – Combinational Logic Design Part 2 –
Decoders.
Combinational Circuit – Arithmetic Circuit
COE 202: Digital Logic Design Combinational Circuits Part 3 Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office: Ahmad Almulhem, KFUPM.
COE 202: Digital Logic Design Combinational Circuits Part 4
Combinational Design, Part 3: Functional Blocks
Logical Circuit Design Week 6,7: Logic Design of Combinational Circuits Mentor Hamiti, MSc Office ,
Functions of Combinational Logic By Taweesak Reungpeerakul
CS 151  What does the full truth table look like? InputsOutputs D3D3 D2D2 D1D1 D0D0 A1A1 A0A0 V 0000XX
Decoders, Encoders, Multiplexers
CS 105 DIGITAL LOGIC DESIGN Chapter 4 Combinational Logic 1.
CS151 Introduction to Digital Design
Lecture 11 Combinational Design Procedure
EKT 124 / 3 DIGITAL ELEKTRONIC 1
Combinational Circuits by Dr. Amin Danial Asham. References  Digital Design 5 th Edition, Morris Mano.
Chapter Four Combinational Logic 1. Discrete quantities of information are represented in digital systems by binary codes. A binary code of n bits is.
1 Chapter 4 Combinational Logic Logic circuits for digital systems may be combinational or sequential. A combinational circuit consists of input variables,
1 CS 151: Digital Design Chapter 3: Combinational Logic Design 3-1Design Procedure CS 151: Digital Design.
1 Fundamentals of Computer Science Combinational Circuits.
Digital Systems Section 11 Decoders and Encoders.
Chapter 3: Combinational Functions and Circuits 3-5 to 3-7: Decoders
Module 11.  In Module 9, we have been introduced to the concept of combinational logic circuits through the examples of binary adders.  Meanwhile, in.
ECE 301 – Digital Electronics Logic Circuit Design (Lecture #9)
MSI Combinational logic circuits
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.
Logic Design (CE1111 ) Lecture 4 (Chapter 4) Combinational Logic Prepared by Dr. Lamiaa Elshenawy 1.
Decoders A decoder is a logic circuit that detects the presence of a specific combination of bits at its input. Two simple decoders that detect the presence.
ACOE161 (Spring2007)MSI Devices1 Revision on MSI Devices M. Mano & C. Kime: Logic and Computer Design Fundamentals (Chapter 5)
MSI Circuits.
Chapter 3 Combinational Logic Design II
Overview Part 2 – Combinational Logic Functions and functional blocks
CS221: Digital Logic Design Combinational Circuits 3
Reference: Chapter 3 Moris Mano 4th Edition
FIGURE 4.1 Block diagram of combinational circuit
COE 202: Digital Logic Design Combinational Circuits Part 3
Ch 4. Combinational logic
Multiplexers Anindya IE CSE.
شبکه آموزشی پژوهشی ایران - مادسیج
Overview Functions and functional blocks Rudimentary logic functions
Chapter-4 Combinational Logic
Digital System Design Combinational Logic
Presentation transcript:

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 an n-bit output code such that each valid code word produces a unique output code. Circuits that perform encoding are called encoders. An encoder has 2 n (or fewer) input lines and n output lines which generate the binary code corresponding to the input values Typically, an encoder converts a code containing exactly one bit that is 1 to a binary code corresponding to the position in which the 1 appears.

CS 151 Encoder Example-1 Octal-to Binary Encoder 1. Specifications:  Inputs: the 8 octal digits D 0 -D 7  Output: the 3-bit binary code corresponding to the input octal digit.  Assumptions: Only one input has a value of 1 at any time. 2. Truth table: A 2 = D 4 +D 5 +D 6 +D 7 A 1 = D 2 +D 3 +D 6 +D 7 A 0 =D 1 +D 3 +D 5 +D 7 The encoder can be implemented with 3 OR gates.

CS 151 Encoder Example-2 A decimal-to-BCD encoder  Inputs: 10 bits corresponding to decimal digits 0 through 9, (D 0, …, D 9 )  Outputs: 4 bits with BCD codes  Function: If input bit D i is a 1, then the output (A 3, A 2, A 1, A 0 ) is the BCD code for i, The truth table could be formed, but alternatively, the equations for each of the four outputs can be obtained directly.

CS 151 Encoder Example-2 (continued) Input D i is a term in equation A j if bit A j is 1 in the binary value for i. Equations: A 3 = D 8 + D 9 A 2 = D 4 + D 5 + D 6 + D 7 A 1 = D 2 + D 3 + D 6 + D 7 A 0 = D 1 + D 3 + D 5 + D 7 + D 9 F 1 = D 6 + D 7 can be extracted from A 2 and A 1 Is there any cost saving?

CS 151 Priority Encoder Problem 1: If more than one input value is 1, then the encoder just designed does not work. (E.g. if D 3 and D 6 are both 1, what is the output?) Solution: One encoder that can accept all possible combinations of input values and produce a meaningful result is a priority encoder. Priority encoders establish an input priority to ensure that only one input is encoded. Among the 1s that appear, it selects the most significant input position containing a 1 and responds with the corresponding binary code for that position.

CS 151 Priority Encoder Problem 2: When all inputs are equal to 0, an output of all 0’s is generated- but this is the same output for D 0 ??? Solution: Provide one more output (v) to indicate that at least one input is equal to 1.

CS 151 Priority Encoder Example Priority encoder with 4 inputs (D 3, D 2, D 1, D 0 ) - highest priority to most significant 1 present - Code outputs A2, A1, A0 and V where V indicates at least one 1 present. Xs in input part of table represent 0 or 1; thus table entries correspond to product terms instead of minterms. The column on the left shows that all 16 minterms are present in the product terms in the table. No. of Min- terms/Row inputsoutputs D3D2D1D0A1A0V 10000XX X XX101 81XXX111 X’s in output represent don’t cares Condensed truth table A 1 = D 3 ’D 2 + D 3 A 0 = D 3 ’D 2 ’D 1 + D 3 V = D 0 + D 1 + D 2 + D 3

CS 151 What does the full truth table look like? InputsOutputs D3D3 D2D2 D1D1 D0D0 A1A1 A0A0 V 0000XX D 0 =X D 1 =X D 0 =X D 2 =X D 1 =X D 0 =X Priority Encoder Example

CS 151 Priority Encoder Example A 1 = D 3 ’D 2 + D 3 A 0 = D 3 ’D 2 ’D 1 + D 3 V = D 0 + D 1 + D 2 + D 3

CS 151 Priority Encoder Example A 0 = D 3 + D 1 D 2 ’ A 1 = D 2 + D 3 V = D 0 + D 1 + D 2 + D 3

CS 151 In Class Exercise (Problem 4-11) Derive the truth table of a BCD-to-binary priority encoder. Where the highest priority is assigned to the least index among BCD inputs.