PDF Digital - Decoder Encoder PDF
PDF Digital - Decoder Encoder PDF
Overview
Design Procedure
Code Converters
Binary Decoders
Expansion
Circuit implementation
Binary Encoders
Priority Encoders
Apr-
Combinational Circuit Design
Apr-
Design Procedure
Apr-
Design Example
Apr-
More Examples - Code
Converters
Code Converters transform/convert
information from one code to another:
BCD-to-Excess-3 Code Converter
Useful in some cases for digital arithmetic
BCD-to-Seven-Segment Converter
Used to display numeric info on 7 segment
displays
30- 6
Apr-
BCD-to-Excess-3 Code
Converter
Design a circuit that converts a binary-coded-
decimal (BCD) codeword to its corresponding
excess-3 codeword.
Excess-3 code: Given a decimal digit n, its
corresponding excess-3 codeword (n+3)2
Example:
n=5 n+3=8 1000excess-3
n=0 n+3=3 0011excess-3
We need 4 input variables (A,B,C,D) and 4
output functions W(A,B,C,D), X(A,B,C,D),
Y(A,B,C,D), and Z(A,B,C,D).
Apr-
Maps for BCD-to-Excess-3 Code Converter
The K-
K-maps for are constructed using the don't care terms
Apr-
BCD-to-Excess-3 Converter
(cont.)
Apr-
Another Code Converter Example:
BCD-to-Seven-Segment Converter
Seven-segment display:
7 LEDs (light emitting diodes), each one
controlled by an input a
1 means on, 0 means off
f b
Display digit 3? g
Set a, b, c, d, g to 1
Set e, f to 0 e c
d
30- Chapter 3-ii: Combinational Logic Design (3.4 - 3.6) 11
Apr-
BCD-to-Seven-Segment
Converter
Input is a 4-bit BCD code 4 inputs (w, x,
y, z).
Output is a 7-bit code (a,b,c,d,e,f,g) that
allows for the decimal equivalent to be
displayed. a
Example: f g b
Input: 0000BCD
Output: 1111110 e c
(a=b=c=d=e=f=1, g=0)
d
30- Chapter 3-ii: Combinational Logic Design (3.4 - 3.6) 12
Apr-
BCD-to-Seven-Segment (cont.)
Truth Table
Apr-
Decoders
Apr-
Decoders (cont.)
Apr-
2-to-4 Decoder
Apr-
2-to-4 Active Low Decoder
Apr-
3-to-8 Decoder
address
data
30- Chapter 3-ii: Combinational
Logic Design (3.4 - 3.6)
18
Apr-
3-to-8 Decoder (cont.)
Apr-
Implementing Boolean functions
using decoders
Any combinational circuit can be constructed using
decoders and OR gates! Why?
Here is an example:
Implement a full adder circuit with a decoder and
two OR gates.
Recall full adder equations, and let X, Y, and Z be
the inputs:
S(X,Y,Z) = X+Y+Z = m(1,2,4,7)
C (X,Y,Z) = m(3, 5, 6, 7).
Since there are 3 inputs and a total of 8 minterms,
we need a 3-to-8 decoder.
30- Chapter 3-ii: Combinational
Logic Design (3.4 - 3.6)
20
Apr-
Implementing a Binary Adder
Using a Decoder
S(X,Y,Z) = m(1,2,4,7)
C(X,Y,Z) = m(3,5,6,7)
Apr-
Decoder Expansions
Apr-
3-to-8 decoder using two 2-to-4
decoders
Apr-
4-input tree decoder
Apr-
Encoders
Apr-
Encoders (cont.)
Apr-
Encoder Example
Example: 8-to-3 binary encoder (octal-to-binary)
A0 = D1 + D3 + D5 + D7
A1 = D2 + D3 + D6 + D7
A2 = D4 + D5 + D6 + D7
30- Chapter 3-ii: Combinational
Logic Design (3.4 - 3.6)
27
Apr-
Encoder Example (cont.)
Apr-
Simple Encoder Design Issues
Apr-
Priority Encoders
Apr-
Example: 4
4--to
to--2 Priority Encoder
Truth Table
Apr-
4-to-2 Priority Encoder (cont.)
Apr-
Example: 4-
4-to
to-
-2 Priority Encoder
K-Maps
Apr-
Example: 4
4--to
to--2 Priority Encoder
Logic Diagram
Apr-
8-to-3 Priority Encoder
Apr-
A Matrix of switches = Keypad
C0 C1 C2 C3
1 2 3 F R0
4 5 6 E R1
7 8 9 D R2
0 A B C R3
Apr-
Keypad Decoder IC - Encoder
COL.
4-bit
4-bit
Binary
1 2 3 F
(encoded)
4 5 6 E ROW
4-bit
7 8 9 D
0 A B C
Apr-
Priority Interrupt
Encoder Schematic
Device B Req(1:0)
Device C
Device D
IntRq
Apr-
Priority Encoding -
Interrupt Requests
Interrupting Device
A B C D Req (1:0) IntRq
0 0 0 0 00 0
0 0 0 1 00 1
0 0 1 0 01 1
0 0 1 1 01 1
0 1 0 0 10 1
Exercise: Complete this table?
30- Chapter 3-ii: Combinational
Logic Design (3.4 - 3.6)
39
Apr-