Final Video PPT V_05 Final UNIT 3 part 2_DL and COA Programming.pptx
1. 1
DIGITAL LOGIC AND BASICS OF
COMPUTER ORGANIZATION
BCA
DIGITAL LOGIC AND BASICS OF
COMPUTER ORGANIZATION
2. 2
Unit 3: combinational circuits
1.0 Learning Outcome
1.1 Introduction
1.2 Multiplexer
1.3 Demultiplexer
1.4 Encoder
1.5 Decoder
1.6 Compartor
DIGITAL LOGIC AND BASICS OF COMPUTER ORGANIZATION
3. 3
Unit 3: combinational circuits
1.7 Summary
1.8 Glossary
1.9 Self-Assessment Questions
1.10 Exam Oriented Questions
1.11 Suggested Readings
DIGITAL LOGIC AND BASICS OF COMPUTER ORGANIZATION
4. 1.0 Learning Outcome
After studying this unit, students will be able to:
•Understand the working and internal logic of MUX,
DEMUX, encoders, decoders, and comparators.
•Design and implement data selection and
distribution using multiplexers and demultiplexers.
•Apply encoders and decoders for data compression
and expansion in digital systems.
DIGITAL LOGIC AND BASICS OF COMPUTER ORGANIZATION 4
5. 1.0 Learning Outcome (contd.)
After studying this unit, students will be able to:
•Perform binary comparisons using comparator
logic for control and decision-making.
•Use truth tables and logic expressions to analyze
and construct combinational circuits.
DIGITAL LOGIC AND BASICS OF COMPUTER ORGANIZATION
5
6. 1.1 Introduction
•Modern digital systems involve constant
decision-making, data routing, and conversion
between formats. To handle these operations, we
rely on efficient combinational circuits such as
multiplexers, demultiplexers, encoders,
decoders, and comparators.
•A multiplexer (MUX) selects one input from
many and routes it to a single output.
DIGITAL LOGIC AND BASICS OF COMPUTER ORGANIZATION 6
7. 1.1 Introduction
• A demultiplexer (DEMUX) performs the reverse,
sending one input to a selected output line.
• An encoder compresses data by converting multiple
inputs into a binary code.
• A decoder expands a binary input into multiple
outputs — often used in memory addressing or
displays.
• A comparator compares two binary numbers and
determines if one is greater, equal to, or less than the
other.
DIGITAL LOGIC AND BASICS OF COMPUTER ORGANIZATION 7
8. DIGITAL LOGIC AND BASICS OF COMPUTER ORGANIZATION
8
A multiplexer has
N control inputs
2N
data inputs
1 output
A multiplexer routes (or connects) the
selected data input to the output.
The value of the control inputs
determines the data input that is
selected.
1.2 Multiplexers
9. 9
1.2 Multiplexers
Z = A′.I0 + A.I1
Data
inputs
Control
input
DIGITAL LOGIC AND BASICS OF COMPUTER ORGANIZATION
10. 10
1.2 Multiplexers
Z = A′.B'.I0 + A'.B.I1 + A.B'.I2 + A.B.I3
A B F
0 0 I0
0 1 I1
1 0 I2
1 1 I3
MSB LSB
DIGITAL LOGIC AND BASICS OF COMPUTER ORGANIZATION
11. 11
1.3 Demultiplexers
A demultiplexer has
N control inputs
1 data input
2N
outputs
A demultiplexer routes (or connects) the data
input to the selected output.
The value of the control inputs determines
the output that is selected.
A demultiplexer performs the opposite function of
a multiplexer.
DIGITAL LOGIC AND BASICS OF COMPUTER ORGANIZATION
12. 12
Demultiplexers
A B W X Y Z
0 0 I 0 0 0
0 1 0 I 0 0
1 0 0 0 I 0
1 1 0 0 0 I
W = A'.B'.I
X = A.B'.I
Y = A'.B.I
Z = A.B.I
Out0
In
S1 S0
I
W
X
Y
Z
A B
Out1
Out2
Out3
DIGITAL LOGIC AND BASICS OF COMPUTER ORGANIZATION
13. 13
1.4 Encoders
An encoder has
2N
inputs
N outputs
An encoder outputs the binary value of the
selected (or active) input.
An encoder performs the inverse operation of
a decoder.
Issues
What if more than one input is active?
What if no inputs are active?
DIGITAL LOGIC AND BASICS OF COMPUTER ORGANIZATION
14. 14
1.4 Encoders
A B C D Y Z
0 0 0 1 0 0
0 0 1 0 0 1
0 1 0 0 1 0
1 0 0 0 1 1
D
Z
Y
I0
I1
C
B I2
I3
A
Out0
Out1
DIGITAL LOGIC AND BASICS OF COMPUTER ORGANIZATION
15. 15
Priority Encoders
If more than one input is active, the higher-order
input has priority over the lower-order input.
The higher value is encoded on the output
A valid indicator, d, is included to indicate whether
or not the output is valid.
Output is invalid when no inputs are active
d = 0
Output is valid when at least one input is
active
d = 1
DIGITAL LOGIC AND BASICS OF COMPUTER ORGANIZATION
16. 16
1.5 Decoders
A decoder has
N inputs
2N
outputs
A decoder selects one of 2N
outputs by
decoding the binary value on the N inputs.
The decoder generates all of the minterms of
the N input variables.
Exactly one output will be active for
each combination of the inputs.
DIGITAL LOGIC AND BASICS OF COMPUTER ORGANIZATION
17. 17
1.5 Decoders
A B W X Y Z
0 0 1 0 0 0
0 1 0 1 0 0
1 0 0 0 1 0
1 1 0 0 0 1
Active-high outputs
B
W
X
Y
Z
I0
I1
A
Out0
Out1
Out2
Out3
W = A'.B'
X = A.B'
Y = A'.B
Z = A.B
msb
DIGITAL LOGIC AND BASICS OF COMPUTER ORGANIZATION
18. DIGITAL LOGIC AND BASICS OF COMPUTER ORGANIZATION
18
• A comparator is a
combinational circuit
• Compares two binary numbers
(A and B)
• Produces outputs to indicate:
a) A > B
b) A = B
c) A < B
1.6 Comparator
19. DIGITAL LOGIC AND BASICS OF COMPUTER ORGANIZATION
19
• 1-bit Comparator
• Multi-bit Comparator (e.g., 2-bit, 4-bit,
8-bit)
• Cascadable Comparator (used to build
larger comparators)
1.6 Comparator
20. DIGITAL LOGIC AND BASICS OF COMPUTER ORGANIZATION
20
Inputs: A, B
Outputs:
•A > B = A · B
̅
•A = B = · + A · B
A
̅ B
̅
•A < B = · B
A
̅
A B A > B A = B A < B
0 0 0 1 0
0 1 0 0 1
1 0 1 0 0
1 1 0 1 0
21. 1.7 Summary(Contd.)
• Multiplexer (MUX): A data selector that forwards one of
many inputs to a single output line based on select inputs.
• Demultiplexer (DEMUX): A data distributor that sends a
single input to one of many outputs using control lines.
• Encoder: Converts active input lines into a binary code.
Priority encoders resolve conflicts when multiple inputs
are active.
DIGITAL LOGIC AND BASICS OF COMPUTER ORGANIZATION 21
22. 1.7 Summary(Contd.)
• Decoder: Translates binary inputs into uniquely activated
outputs; often used in display drivers and memory
addressing.
• Comparator: Compares binary numbers and generates
output signals for greater than, equal to, or less than
conditions.
DIGITAL LOGIC AND BASICS OF COMPUTER ORGANIZATION 22
23. 1.8 Glossary(Contd.)
DIGITAL LOGIC AND BASICS OF COMPUTER ORGANIZATION
23
Term Definition
MUX
Multiplexer – selects one of
many input lines and forwards it
to the output
DEMUX
Demultiplexer – routes one input
to one of many output lines
Encoder
Converts multiple input lines
into a smaller number of binary
outputs
Decoder
Converts binary inputs into
uniquely active outputs
24. 1.8 Glossary(Contd.)
DIGITAL LOGIC AND BASICS OF COMPUTER ORGANIZATION 24
Comparator
A circuit that compares two
binary numbers and outputs
their relationship
Select Lines
Control inputs that determine
the active input/output in
MUX/DEMUX
Priority Encoder
An encoder that assigns output
based on the highest-priority
active input
Cascading
Connecting smaller circuits
(like comparators) together for
larger operations
25. 1.9 Self-Assessment(Cont.)
•What is a multiplexer? How does a 4-to-1 multiplexer
work?
•Differentiate between a multiplexer and a demultiplexer
with examples.
•Write the truth table for a 3-to-8 decoder. How many
outputs does it have?
•What is the main function of an encoder? Why is a
priority encoder used?
DIGITAL LOGIC AND BASICS OF COMPUTER ORGANIZATION 25
26. 1.10 Exam-Oriented Questions
•Short Answer:
•What is the function of a multiplexer? Give a real-
world example.
•Write the truth table for a 2-to-4 decoder.
•Differentiate between encoder and decoder
DIGITAL LOGIC AND BASICS OF COMPUTER
ORGANIZATION
26
27. 1.10 Exam-Oriented Questions
•Explain the working of a 1-to-4 demultiplexer
with a logic diagram.
•Describe the operation of a priority encoder
with a suitable truth table and circuit.
•What is a 3-to-8 decoder? Explain how it is
used for memory address decoding.
DIGITAL LOGIC AND BASICS OF COMPUTER ORGANIZATION
27
28. 1.11 Suggested Readings
•"Digital Design" by M. Morris Mano – Pearson
Education
•"Digital Fundamentals" by Thomas L. Floyd –
Pearson
•"Modern Digital Electronics" by R. P. Jain –
McGraw Hill
DIGITAL LOGIC AND BASICS
OF COMPUTER 28