0% found this document useful (0 votes)
9 views12 pages

DSD - Lecture 3.1

Uploaded by

Jihad Al Amin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views12 pages

DSD - Lecture 3.1

Uploaded by

Jihad Al Amin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Digital System Design

Lecture - 3.1
Decoder
• A combinational circuit that converts binary information from n input
lines to a maximum of 2n unique output lines
• Called n-to-m line decoders where m<=2n
• Purpose is to generate the 2n (or less) minterms of n input variables
• Application: Binary to Octal Conversion (Input variables represent a
binary number, and output represents eight digits in the octal number
system)
• A 3-to-8 line decoder can be used to decode any 3-bit code to provide
8-outputs
• Example: 3:8, 2:4, 4:16 Decoder

Prepared By - Mohsena Ashraf 2


3-to-8 Decoder
Truth Table:
Block Diagram:

X
Y
Z

Prepared By - Mohsena Ashraf 3


3-to-8 Decoder (Contd.)
Circuit Diagram:

Practice Work:
Design a BCD-to-decimal
decoder with the help of
don’t care conditions.

Prepared By - Mohsena Ashraf 4


Implementation Using Decoder
Input Output
x y z S C
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1

Prepared By - Mohsena Ashraf 5


Implementation Using Decoder (Contd.)

Prepared By - Mohsena Ashraf 6


Encoder
• A combinational circuit that performs the reverse operation of
Decoder
• It encodes 2n input lines to n output lines
• Produces a binary code equivalent to the input
• Called m-to-n line encoders where m=2n
• Only one of the inputs become "high" (logic state "1") at a time.
• Application: Octal to Binary Conversion
• Example: 4:2, 8:3, 16:4 Encoder

Prepared By - Mohsena Ashraf 7


8-to-3 Encoder
Truth Table:

Block Diagram:

X
Y
Z

Prepared By - Mohsena Ashraf 8


8-to-3 Encoder (Contd.)
Circuit Diagram:

Practice Work:
Design a
Decimal-to-BCD
Encoder.

Prepared By - Mohsena Ashraf 9


Priority Encoder
• Encoder with priority function
• Multiple inputs may be true simultaneously
• Higher priority input gets the precedence
• Even if more than one input is ‘1’ at the same time, the output will be
the (binary) code corresponding to the input, which is having higher
priority

Prepared By - Mohsena Ashraf 10


Priority Encoder

Priority
(high to
low)
Y0

Y1

Prepared By - Mohsena Ashraf 11


Practice Problems
I. A combinational circuit is specified by the following three Boolean functions:
F1 (A, B, C) = Σ(2, 4, 7)
F2 (A, B, C) = Σ(0, 3)
F3 (A, B, C) = Σ(0, 2, 3, 4, 7)
Implement the circuit with a decoder constructed with NAND/AND gates. Minimize the
number of inputs in the external gates.

II. Implement a full adder with a decoder and NAND gates.

III. Design a combinational circuit that compares two 4-bit numbers to check if they are equal.
The circuit output is equal to 1 if two numbers are equal and 0 otherwise. Mention the
equation of the circuit.

Prepared By - Mohsena Ashraf 12

You might also like