1 Digital Logic Design Week 7 Decoders, encoders and multiplexers.

Slides:



Advertisements
Similar presentations
Functions of Combinational Logic
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
Princess Sumaya University
Modular Combinational Logic
Digital Logic Design Week 7 Encoders, Decoders, Multiplexers, Demuxes.
Combinational Circuits
EET 1131 Unit 8 Code Converters, Multiplexers, and Demultiplexers
COE 202: Digital Logic Design Combinational Circuits Part 3 Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office: Ahmad Almulhem, KFUPM.
Digital Fundamentals Floyd Chapter 6 Tenth Edition
OTHER COMBINATIONAL LOGIC CIRCUITS
DIGITAL SYSTEMS TCE OTHER COMBINATIONAL LOGIC CIRCUITS DECODERS ENCODERS.
ECE 331 – Digital System Design
ECE 301 – Digital Electronics Multiplexers and Demultiplexers (Lecture #12)
OTHER COMBINATIONAL LOGIC CIRCUITS WEEK 7 AND WEEK 8 (LECTURE 2 OF 3)
Digital Fundamentals with PLD Programming Floyd Chapter 8
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.
Top-down modular design
Combinational Logic Design
COE 202: Digital Logic Design Combinational Circuits Part 3 Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office: Ahmad Almulhem, KFUPM.
CS2100 Computer Organisation MSI Components (AY2015/6 Semester 1)
Functions of Combinational Logic
Combinational Logic By Taweesak Reungpeerakul
1 Adders & Subtractors Adders –An adder is a combinational logic circuit that performs the addition of 2 binary numbers (A & B) to generate the sum (S)
WEEK #9 FUNCTIONS OF COMBINATIONAL LOGIC (DECODERS & MUX EXPANSION)
1 Lecture #7 EGR 277 – Digital Logic Reading Assignment: Chapter 4 in Digital Design, 3 rd Edition by Mano Chapter 4 – Combinational Logic Circuits A)
Mux 2.1 Multiplexers and De-Multiplexers 2: ©Paul Godin Updated November 2007.
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
Morgan Kaufmann Publishers
Functions of Combinational Logic By Taweesak Reungpeerakul
CS 105 DIGITAL LOGIC DESIGN Chapter 4 Combinational Logic 1.
Summary Half-Adder pp302Basic rules of binary addition are performed by a half adder, which has two binary inputs (A and B) and two binary outputs (Carry.
CO UNIT-I. 2 Multiplexers: A multiplexer selects information from an input line and directs the information to an output line A typical multiplexer has.
Chapter Four Combinational Logic 1. Discrete quantities of information are represented in digital systems by binary codes. A binary code of n bits is.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
Magnitude Comparator A magnitude comparator is a combinational circuit that compares two numbers, A and B, and then determines their relative magnitudes.
Magnitude Comparator Dr. Ahmed Telba.
Multiplexers and De-Multiplexers
Digital Systems Section 11 Decoders and Encoders.
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.
ECE/CS 352 Digital System Fundamentals© T. Kaminski & C. Kime 1 ECE/CS 352 Digital Systems Fundamentals Spring 2001 Chapter 3 -Part 2 Tom Kaminski & Charles.
SYEN 3330 Digital SystemsJung H. Kim Chapter SYEN 3330 Digital Systems Chapter 4 -Part 1.
Company LOGO Edit your slogan here DKT 122/3 DIGITAL SYSTEM 1 WEEK #8 FUNCTIONS OF COMBINATIONAL LOGIC (ENCODER & DECODER, MUX & DEMUX)
MSI Combinational logic circuits
Digital Design Module 2 Decoder Amit Kumar AP SCSE, GU Greater Noida.
1 DLD Lecture 16 More Multiplexers, Encoders and Decoders.
A multiplexer (MUX) selects one data line from two or more input lines and routes data from the selected line to the output. The particular data line that.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
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.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
MSI Circuits.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
Multiplexer.
EKT 124 MUX AND DEMUX.
CS221: Digital Logic Design Combinational Circuits 3
Multiplexers and Demultiplexers,
Combinational Circuit Design
Digital Fundamentals Floyd Chapter 6 Tenth Edition
FUNCTION OF COMBINATIONAL LOGIC CIRCUIT
Chapter 6 Functions of Combinational Logic
COE 202: Digital Logic Design Combinational Circuits Part 3
Multiplexers Anindya IE CSE.
ECE 331 – Digital System Design
Digital System Design Combinational Logic
Arithmetic Circuits.
ECE2030 HW-6.
Presentation transcript:

1 Digital Logic Design Week 7 Decoders, encoders and multiplexers

2 Decoders Encoders Multiplexers Decoders, encoders and multiplexers

3 Decoders Decoder detects the presence of specific combinations of bits (code) at its input  Indicates presence of code by asserting outputs: active-HIGH or active-LOW Example: two simple decoders that detect the presence of the binary code 0011 A1A1 A0A0 A2A2 A3A3 X active-HIGH decoder for 0011 A1A1 A0A0 A2A2 A3A3 X active-LOW decoder for 0011 (LSB) (MSB)

4 A simple decoder What binary number does this decoder detect? Boolean expression for the decoder output? Active-LOW or active-HIGH output?

5 3-to-8 decoder inputs 3-to-8 decoder binary number detected  General decoders have n inputs and 2 n outputs – Precisely one output asserted for each unique bit pattern

6 Decoders with active-LOW outputs  Active-LOW outputs are indicated by “bubbles” on decoder outputs Inputs Outputs 4-to-16 decoder What are the decoder outputs for the inputs shown?

7 Decoders with enable input  Enable input is like an on/off switch for the decoder:  E=1: decoder functions “normally” → one output asserted  E=0: no outputs asserted inputs 2-to-4 decoder E (enable) outputs EA 1 A 0 D 0 D 1 D 2 D E=0E=1

8 Logisim simulation of 74x138

9 Decoder application #1 Input/output (I/O) devices exchange data with microprocessor via a shared data bus At most one I/O device uses data bus at any one time Each I/O device has: – unique “address” A 3 A 2 A 1 A 0 – active-LOW enable input (EN) A 3 A 2 A 1 A 0 inputs to 4-to-16 decoder Sixteen possible 4-bit I/O port addresses – 0000,0001,…,1111 – ports 0–6 (decimal) used here – ports 7–15 (decimal) unused

10 Decoder application #2  Recall: each decoder output corresponds to a minterm  To produce a sum of minterms expression, simply OR together the relevant decoder outputs! 3-to-8 decoder

11 Decoder application #2 A B C in C out S Example: Full-adder adds three bits: A, B and carry-in (C in )  Result is sum (S) and carry-out (C out )

12 Decoder-based implementation of full-adder Decoder outputs 1,2,4,7 Decoder outputs 3,5,6,7

13 Decoders Encoders Multiplexers Decoders, encoders and multiplexers

14 inputs 16-to-4 encoder outputs Encoders  Encoders perform “reverse” of decoder function  Assume only one input is asserted, then output is binary code for that input  Example: if D 7 is the only HIGH input, then A 3 A 2 A 1 A 0 = 0111  In general: input D k asserted → output is binary equivalent of decimal k

15 Encoder application: keypad encoding Keypad input 16-to-4 encoder Binary code representing key pressed What should an encoder do if multiple inputs are active? One answer: make the device a priority encoder respond to the highest-priority input that is active, and ignore any lower priority inputs

74x148 : priority encoder  Active-LOW inputs 0,1,2,…,7  7: highest priority  0: lowest priority  Coded output A 2 A 1 A 0  highest asserted input is  Active-LOW enable input EI  GS and EO outputs not important here

74x148 : priority encoder

18 Decoders Encoders Multiplexers Decoders, encoders and multiplexers

19 Multiplexers A multiplexer (MUX) routes data from one of the data inputs D 0, D 1, D 2, D 3 to the output Y Select inputs S 1 and S 0 determine which data input is chosen

20 Multiplexer – timing diagram

21 Multiplexer (MUX) Data input selected by S 1 S 0 is directed to output Y S 1 S 0 = 00 : Y = D 0 S 1 S 0 = 01 : Y = D 1 S 1 S 0 = 10 : Y = D 2 S 1 S 0 = 11 : Y = D 3 Y S 1 S 0 D0D0 D1D1 D2D2 D3D3 4-to-1 MUX

74x151 : 8-to-1 MUX

MUX application #1 When A 2 A 1 A 0 = 000, Y = D 0 → set D 0 = 0 When A 2 A 1 A 0 = 001, Y = D 1 → set D 1 = 1 Y S2S2 D0D0 D1D1 D2D2 D3D3 8-to-1 MUX D4D4 D5D5 D6D6 D7D7 S1S1 S0S0 A 2 A 1 A 0 Y D D D D D D D D 7 Use an 8-to-1 MUX to implement the Boolean function in the truth table below A2A1A0A2A1A0

MUX application #1 Data inputs tied LOW (= logic-0)  0,2,4,7 Data inputs tied HIGH (= logic-1)  1,3,5,6 Compare with truth table on previous page

MUX application #2 Time-division multiplexing (TDM) – Multiple bit-streams share access to channel by “taking turns” – Sub-channel #1 in time slot 1, sub-channel #2 in time slot 2, … TDM also used by second-generation (2G) mobile phones (GSM) to share access to radio spectrum Data input rate on each “sub-channel” is 64kbits/s High-speed channel data rate = 8×64 = 512 kbits/s

26 Demultiplexer (DEMUX) Data input is directed to the output line selected by S 1 S 0 S 1 S 0 = 00 : data input to D 0 S 1 S 0 = 01 : data input to D 1 S 1 S 0 = 10 : data input to D 2 S 1 S 0 = 11 : data input to D 3 Non-selected output lines have LOW levels Data input S 1 S 0 D0D0 D1D1 D2D2 D3D3 1-to-4 DEMUX

27 Demultiplexer – timing diagram

28 DEMUX = decoder with enable DS 1 S 0 D 0 D 1 D 2 D D=0D=1 D S 1 S 0 D0D0 D1D1 D2D2 D3D3 1-to-4 DEMUX 2-to-4 decoder E (enable)