Title: CENG 241 Digital Design 1 Lecture 9
1CENG 241Digital Design 1Lecture 9
- Amirali Baniasadi
- amirali_at_ece.uvic.ca
2This Lecture
- Chapter 4 Decoders, Multiplexers
3Decoders
- A decoder converts binary information from n
input lines to a maximum of 2n output lines - Also known as n-to-m line decoders where mlt 2n
- Example 3-to-8 decoders.
4Decoders Truth Table
- X Y Z D0 D1 D2
D3 D4 D5 D6 D7 - 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
5Decoders AND implementation
6How to build bigger decoders?
We can combine two 3-to-8 decoders to build a
4-to-16 decoder.
Generates from 0000 to 0111
Generates from 1000 to 1111
7Combinational Logic implementation
- A decoder provides the 2n minterms of n input
variables. - Any function is can be expressed in sum of
minterms. - Use a decoder to make the minterms and an
external OR gate to make the sum. - Example consider a full adder.
- S(x,y,z) S(1,2,4,7)
- C(x,y,z) S (3,5,6,7)
8Combinational Logic implementation
9Multiplexers
- Multiplexer selects one binary input from many
selections - example 2-to-1 MUX
104-to-1 MUX
Directs 1 of the 4 inputs to the output
11Multi-bit selection logic
- Multiplexers can be combined with common
selection inputs to support multi-bit selection
logic
12Implementing Boolean functions w/ MUX
- General rules for implementing any Boolean
function with n variables - Use a multiplexer with n-1 selection inputs and 2
n-1 data inputs - List the truth table
- Apply the first n-1 variables to the selection
inputs of multiplexer - For each combination evaluate the output as a
function of the last variable. - The function can be 0, 1 the variable or the
complement of the variable.
13Implementing Boolean functions w/ MUX
14Implementing Boolean functions w/ MUX
15Decoder as Demultiplexer
- A decoder with enable can function as a
demultiplexer - A demultiplexer is a circuit that receives
information from a single line and directs it to
one of the 2n possible output lines. - E has a path to each of the four outputs. Ex. If
AB10 then D2E
16Summary
- Reading up to page 156
- HW 4 4-25,4-26,4-31,4-32,4-35
- Due Thursday June 14th.