SlideShare a Scribd company logo
Magnitude Comparator
A magnitude comparator is a combinational circuit that compares
two numbers, A and B, and then determines their relative magnitudes.
A > B
A = B
A < B
Algorithm Consider two numbers, A and B, with four digits each:
0
1
2
3
0
1
2
3
B
B
B
B
B
A
A
A
A
A


operation
AND
)
( 0
1
2
3 

 x
x
x
x
B
A
For equality to exist, all variables must be equal to 1:
i
x
3
2,
1,
0,
for
'
' 

 i
B
A
B
A
x i
i
i
i
i
1
or
0
if
1 



 B
A
B
A
xi
XNOR (note mistake p. 133)
Magnitude Comparator
To determine if A is greater than or less than B, we inspect the relative
magnitudes of significant digits.
If the two digits are equal, we compare the next lower significant pair
of digits. The comparison continues until a pair of unequal digits is
reached.
The sequential comparison can be expressed by:
0
'
0
1
2
3
1
'
1
2
3
2
'
2
3
3
'
3
'
0
0
1
2
3
'
1
1
2
3
'
2
2
3
'
3
3
)
(
)
(
B
A
x
x
x
B
A
x
x
B
A
x
B
A
B
A
B
A
x
x
x
B
A
x
x
B
A
x
B
A
B
A










Compare: 1
)
(
0101
and
1010 



 B
A
B
A
1
)
(
1010
and
0101 



 B
A
B
A
'
0
0
1
2
3
'
1
1
2
3
'
2
2
3
'
3
3 B
A
x
x
x
B
A
x
x
B
A
x
B
A 



0
1
2
3 x
x
x
x

0
'
0
1
2
3
1
'
1
2
3
2
'
2
3
3
'
3 B
A
x
x
x
B
A
x
x
B
A
x
B
A 



4-bit Magnitude Comparator
XNOR
DECODERS
A decoder is a combinational circuit that converts binary information
from n input lines to an 2n unique output lines.
Applications:
• Microprocessor memory system: selecting different banks of memory.
• Microprocessor I/O: Selecting different devices.
• Microprocessor instruction decoding: Enabling different functional
units.
• Memory: Decoding memory addresses (e.g. in ROM).
•
•
•
3-to-8-line DECODER
3-to-8-line DECODER Truth Table
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
Binary Inputs
Outputs
If the input corresponds to minterm mi then the decoder ouputi
will be the single asserted output.
2-to-4-line DECODER with Enable Input
Complemented outputs
The decoder is enabled when E = 0. The output whose value = 0 represents the
minterm is selected by inputs A and B.
The decoder is disabled when E = 1 D0 … D3 = 1
A Decoder with enable input is called a decoder/demultiplexer. Demultiplexer
receives information from a single line and directs it to the output lines.
A 4 x 16 DECODER
• When w = 0, the top decoder is enabled and the bottom is disabled.
Top decoder generates 8 minterms 0000 to 0111, while the bottom
decoder outputs are 0’s.
• When w = 1, the top decoder is disabled and the bottom is enabled.
Bottom decoder generates 8 minterms 1000 to 1111, while the top
decoder outputs are 0’s.
Combinational Logic (Full-Adder) using Decoder
)
7
,
4
,
2
,
1
(
)
,
,
( 

z
y
x
)
7
,
6
,
5
,
3
(
)
,
,
( 

z
y
x
MULTIPLEXERS/DATA SELECTORS
A multiplexer is a combinational circuit that selects one of many
input lines (2n) and steers it to its single output line. There
are (2n) and n selection lines whose bit combinations determine
which input is selected.
4-to-1LINE MULTIPLEXER DESIGN
1
0
In general, a 2n–to–1-line multiplexer is constructed from an
n–to 2n decoder by adding to it 2n lines, one to each AND gate.
QUADRUPLE 2-to-1LINE MULTIPLEXER
Function implementation using multiplexers
OR gates
are included
)
7
,
6
,
2
,
1
(
)
,
,
( 

z
y
x
F
Function with n variables and multiplexer with n – 1 selection
Input variables x, y: Selection lines, S1 and S0
Variable z: Date line 0
Data lines 1,2,3: 1
,
0
,
'
z
z
z’
0
1
y
x
Function implementation using 4x1multiplexer
Function implementation using 8x1multiplexer
)
15
,
14
,
13
,
12
,
11
,
4
,
3
,
1
(
)
,
,
,
( 

D
C
B
A
F
1. Complete the truth table from the SOP.
2. The first n – 1 variables in the table are applied to the
selection inputs of the multiplexer.
3. For each combination of the selection variables, we evaluate
the output as a function of the last variable.
4. Apply these values to the data input in proper order.
Function implementation using 8x1 MUX
note the order of input lines
Three State Gates
A three-state gate is a digital circuit that exhibits three states: 0, 1
and a high-impedance (high z state). The high impedance state
behaves as an open circuit.
Because of this feature (high z state), a large number of three-state
gate outputs can be connected to form a common line without
endangering load effects.
Multiplexers with Three State Gates
Note that the two output
connections can not be done
with other gates.
When EN = 0, decoder outputs are zero,
and the bus lines are in high z state.
When EN = 1, one of the three-state buffers
will be active depending on the binary value in
the select inputs of the decoder.

More Related Content

Similar to Magnitude Comparator

COA pptx.pptx
COA pptx.pptxCOA pptx.pptx
COA pptx.pptx
AviPatel398803
 
combinational_circuits
combinational_circuitscombinational_circuits
combinational_circuits
Bindu Madhavi
 
combinational_circuits
combinational_circuitscombinational_circuits
combinational_circuits
Bindu Madhavi
 
Lect 1 unit 2.pdf
Lect 1 unit 2.pdfLect 1 unit 2.pdf
Lect 1 unit 2.pdf
saijalvishwakarma12
 
Chapter 01 Basic Principles of Digital Systems
Chapter 01 Basic Principles of Digital SystemsChapter 01 Basic Principles of Digital Systems
Chapter 01 Basic Principles of Digital Systems
SSE_AndyLi
 
Digital Logic Design
Digital Logic Design Digital Logic Design
Digital Logic Design
Vaagdevi College of Engineering
 
digital logic circuits, digital component
 digital logic circuits, digital component digital logic circuits, digital component
digital logic circuits, digital component
Rai University
 
Communication system lec5
Communication system  lec5Communication system  lec5
Communication system lec5
ZareenRauf1
 
Chapter-04.pdf
Chapter-04.pdfChapter-04.pdf
Chapter-04.pdf
ssuserf7cd2b
 
Decoders
DecodersDecoders
Decoders
Pooja Dixit
 
SESSION 2.ppt
SESSION 2.pptSESSION 2.ppt
SESSION 2.ppt
Saranya S
 
Combinational Circuits.pptx
Combinational Circuits.pptxCombinational Circuits.pptx
Combinational Circuits.pptx
AshokRachapalli1
 
Mux decod pld2_vs2
Mux decod pld2_vs2Mux decod pld2_vs2
Mux decod pld2_vs2
WanNurdiana
 
Multiplexer demul
Multiplexer demulMultiplexer demul
Multiplexer demul
kitturashmikittu
 
Magnitude comparator
Magnitude comparatorMagnitude comparator
Magnitude comparator
Preet_patel
 
I semester Unit 4 combinational circuits.pptx
I semester Unit 4 combinational circuits.pptxI semester Unit 4 combinational circuits.pptx
I semester Unit 4 combinational circuits.pptx
Mayank Pandey
 
Decodder presentation by ibrar
Decodder presentation by ibrarDecodder presentation by ibrar
Decodder presentation by ibrar
ibrar562
 
Combinational and sequential logic
Combinational and sequential logicCombinational and sequential logic
Combinational and sequential logic
Deepak John
 
Digital 1 8
Digital 1 8Digital 1 8
Digital 1 8
Sayan Chakraborty
 
minimization technique.ppt
minimization technique.pptminimization technique.ppt
minimization technique.ppt
tahobah480
 

Similar to Magnitude Comparator (20)

COA pptx.pptx
COA pptx.pptxCOA pptx.pptx
COA pptx.pptx
 
combinational_circuits
combinational_circuitscombinational_circuits
combinational_circuits
 
combinational_circuits
combinational_circuitscombinational_circuits
combinational_circuits
 
Lect 1 unit 2.pdf
Lect 1 unit 2.pdfLect 1 unit 2.pdf
Lect 1 unit 2.pdf
 
Chapter 01 Basic Principles of Digital Systems
Chapter 01 Basic Principles of Digital SystemsChapter 01 Basic Principles of Digital Systems
Chapter 01 Basic Principles of Digital Systems
 
Digital Logic Design
Digital Logic Design Digital Logic Design
Digital Logic Design
 
digital logic circuits, digital component
 digital logic circuits, digital component digital logic circuits, digital component
digital logic circuits, digital component
 
Communication system lec5
Communication system  lec5Communication system  lec5
Communication system lec5
 
Chapter-04.pdf
Chapter-04.pdfChapter-04.pdf
Chapter-04.pdf
 
Decoders
DecodersDecoders
Decoders
 
SESSION 2.ppt
SESSION 2.pptSESSION 2.ppt
SESSION 2.ppt
 
Combinational Circuits.pptx
Combinational Circuits.pptxCombinational Circuits.pptx
Combinational Circuits.pptx
 
Mux decod pld2_vs2
Mux decod pld2_vs2Mux decod pld2_vs2
Mux decod pld2_vs2
 
Multiplexer demul
Multiplexer demulMultiplexer demul
Multiplexer demul
 
Magnitude comparator
Magnitude comparatorMagnitude comparator
Magnitude comparator
 
I semester Unit 4 combinational circuits.pptx
I semester Unit 4 combinational circuits.pptxI semester Unit 4 combinational circuits.pptx
I semester Unit 4 combinational circuits.pptx
 
Decodder presentation by ibrar
Decodder presentation by ibrarDecodder presentation by ibrar
Decodder presentation by ibrar
 
Combinational and sequential logic
Combinational and sequential logicCombinational and sequential logic
Combinational and sequential logic
 
Digital 1 8
Digital 1 8Digital 1 8
Digital 1 8
 
minimization technique.ppt
minimization technique.pptminimization technique.ppt
minimization technique.ppt
 

Recently uploaded

按照学校原版(SUT文凭证书)斯威本科技大学毕业证快速办理
按照学校原版(SUT文凭证书)斯威本科技大学毕业证快速办理按照学校原版(SUT文凭证书)斯威本科技大学毕业证快速办理
按照学校原版(SUT文凭证书)斯威本科技大学毕业证快速办理
1jtj7yul
 
按照学校原版(UVic文凭证书)维多利亚大学毕业证快速办理
按照学校原版(UVic文凭证书)维多利亚大学毕业证快速办理按照学校原版(UVic文凭证书)维多利亚大学毕业证快速办理
按照学校原版(UVic文凭证书)维多利亚大学毕业证快速办理
1jtj7yul
 
一比一原版(UQ文凭证书)昆士兰大学毕业证如何办理
一比一原版(UQ文凭证书)昆士兰大学毕业证如何办理一比一原版(UQ文凭证书)昆士兰大学毕业证如何办理
一比一原版(UQ文凭证书)昆士兰大学毕业证如何办理
xuqdabu
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
peuce
 
按照学校原版(AU文凭证书)英国阿伯丁大学毕业证快速办理
按照学校原版(AU文凭证书)英国阿伯丁大学毕业证快速办理按照学校原版(AU文凭证书)英国阿伯丁大学毕业证快速办理
按照学校原版(AU文凭证书)英国阿伯丁大学毕业证快速办理
ei8c4cba
 
一比一原版(Greenwich文凭证书)格林威治大学毕业证如何办理
一比一原版(Greenwich文凭证书)格林威治大学毕业证如何办理一比一原版(Greenwich文凭证书)格林威治大学毕业证如何办理
一比一原版(Greenwich文凭证书)格林威治大学毕业证如何办理
byfazef
 
一比一原版(UCSB毕业证)圣塔芭芭拉社区大学毕业证如何办理
一比一原版(UCSB毕业证)圣塔芭芭拉社区大学毕业证如何办理一比一原版(UCSB毕业证)圣塔芭芭拉社区大学毕业证如何办理
一比一原版(UCSB毕业证)圣塔芭芭拉社区大学毕业证如何办理
aozcue
 
按照学校原版(Adelaide文凭证书)阿德莱德大学毕业证快速办理
按照学校原版(Adelaide文凭证书)阿德莱德大学毕业证快速办理按照学校原版(Adelaide文凭证书)阿德莱德大学毕业证快速办理
按照学校原版(Adelaide文凭证书)阿德莱德大学毕业证快速办理
terpt4iu
 
按照学校原版(USD文凭证书)圣地亚哥大学毕业证快速办理
按照学校原版(USD文凭证书)圣地亚哥大学毕业证快速办理按照学校原版(USD文凭证书)圣地亚哥大学毕业证快速办理
按照学校原版(USD文凭证书)圣地亚哥大学毕业证快速办理
snfdnzl7
 
按照学校原版(UST文凭证书)圣托马斯大学毕业证快速办理
按照学校原版(UST文凭证书)圣托马斯大学毕业证快速办理按照学校原版(UST文凭证书)圣托马斯大学毕业证快速办理
按照学校原版(UST文凭证书)圣托马斯大学毕业证快速办理
zpc0z12
 
一比一原版(ANU文凭证书)澳大利亚国立大学毕业证如何办理
一比一原版(ANU文凭证书)澳大利亚国立大学毕业证如何办理一比一原版(ANU文凭证书)澳大利亚国立大学毕业证如何办理
一比一原版(ANU文凭证书)澳大利亚国立大学毕业证如何办理
nudduv
 
Production.pptxd dddddddddddddddddddddddddddddddddd
Production.pptxd ddddddddddddddddddddddddddddddddddProduction.pptxd dddddddddddddddddddddddddddddddddd
Production.pptxd dddddddddddddddddddddddddddddddddd
DanielOliver74
 
按照学校原版(Birmingham文凭证书)伯明翰大学|学院毕业证快速办理
按照学校原版(Birmingham文凭证书)伯明翰大学|学院毕业证快速办理按照学校原版(Birmingham文凭证书)伯明翰大学|学院毕业证快速办理
按照学校原版(Birmingham文凭证书)伯明翰大学|学院毕业证快速办理
6oo02s6l
 
一比一原版(UOL文凭证书)利物浦大学毕业证如何办理
一比一原版(UOL文凭证书)利物浦大学毕业证如何办理一比一原版(UOL文凭证书)利物浦大学毕业证如何办理
一比一原版(UOL文凭证书)利物浦大学毕业证如何办理
eydeofo
 
按照学校原版(UOL文凭证书)利物浦大学毕业证快速办理
按照学校原版(UOL文凭证书)利物浦大学毕业证快速办理按照学校原版(UOL文凭证书)利物浦大学毕业证快速办理
按照学校原版(UOL文凭证书)利物浦大学毕业证快速办理
terpt4iu
 
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
xuqdabu
 
按照学校原版(QU文凭证书)皇后大学毕业证快速办理
按照学校原版(QU文凭证书)皇后大学毕业证快速办理按照学校原版(QU文凭证书)皇后大学毕业证快速办理
按照学校原版(QU文凭证书)皇后大学毕业证快速办理
8db3cz8x
 
按照学校原版(Greenwich文凭证书)格林威治大学毕业证快速办理
按照学校原版(Greenwich文凭证书)格林威治大学毕业证快速办理按照学校原版(Greenwich文凭证书)格林威治大学毕业证快速办理
按照学校原版(Greenwich文凭证书)格林威治大学毕业证快速办理
yizxn4sx
 
LORRAINE ANDREI_LEQUIGAN_GOOGLE CALENDAR
LORRAINE ANDREI_LEQUIGAN_GOOGLE CALENDARLORRAINE ANDREI_LEQUIGAN_GOOGLE CALENDAR
LORRAINE ANDREI_LEQUIGAN_GOOGLE CALENDAR
lorraineandreiamcidl
 
加急办理美国南加州大学毕业证文凭毕业证原版一模一样
加急办理美国南加州大学毕业证文凭毕业证原版一模一样加急办理美国南加州大学毕业证文凭毕业证原版一模一样
加急办理美国南加州大学毕业证文凭毕业证原版一模一样
u0g33km
 

Recently uploaded (20)

按照学校原版(SUT文凭证书)斯威本科技大学毕业证快速办理
按照学校原版(SUT文凭证书)斯威本科技大学毕业证快速办理按照学校原版(SUT文凭证书)斯威本科技大学毕业证快速办理
按照学校原版(SUT文凭证书)斯威本科技大学毕业证快速办理
 
按照学校原版(UVic文凭证书)维多利亚大学毕业证快速办理
按照学校原版(UVic文凭证书)维多利亚大学毕业证快速办理按照学校原版(UVic文凭证书)维多利亚大学毕业证快速办理
按照学校原版(UVic文凭证书)维多利亚大学毕业证快速办理
 
一比一原版(UQ文凭证书)昆士兰大学毕业证如何办理
一比一原版(UQ文凭证书)昆士兰大学毕业证如何办理一比一原版(UQ文凭证书)昆士兰大学毕业证如何办理
一比一原版(UQ文凭证书)昆士兰大学毕业证如何办理
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
 
按照学校原版(AU文凭证书)英国阿伯丁大学毕业证快速办理
按照学校原版(AU文凭证书)英国阿伯丁大学毕业证快速办理按照学校原版(AU文凭证书)英国阿伯丁大学毕业证快速办理
按照学校原版(AU文凭证书)英国阿伯丁大学毕业证快速办理
 
一比一原版(Greenwich文凭证书)格林威治大学毕业证如何办理
一比一原版(Greenwich文凭证书)格林威治大学毕业证如何办理一比一原版(Greenwich文凭证书)格林威治大学毕业证如何办理
一比一原版(Greenwich文凭证书)格林威治大学毕业证如何办理
 
一比一原版(UCSB毕业证)圣塔芭芭拉社区大学毕业证如何办理
一比一原版(UCSB毕业证)圣塔芭芭拉社区大学毕业证如何办理一比一原版(UCSB毕业证)圣塔芭芭拉社区大学毕业证如何办理
一比一原版(UCSB毕业证)圣塔芭芭拉社区大学毕业证如何办理
 
按照学校原版(Adelaide文凭证书)阿德莱德大学毕业证快速办理
按照学校原版(Adelaide文凭证书)阿德莱德大学毕业证快速办理按照学校原版(Adelaide文凭证书)阿德莱德大学毕业证快速办理
按照学校原版(Adelaide文凭证书)阿德莱德大学毕业证快速办理
 
按照学校原版(USD文凭证书)圣地亚哥大学毕业证快速办理
按照学校原版(USD文凭证书)圣地亚哥大学毕业证快速办理按照学校原版(USD文凭证书)圣地亚哥大学毕业证快速办理
按照学校原版(USD文凭证书)圣地亚哥大学毕业证快速办理
 
按照学校原版(UST文凭证书)圣托马斯大学毕业证快速办理
按照学校原版(UST文凭证书)圣托马斯大学毕业证快速办理按照学校原版(UST文凭证书)圣托马斯大学毕业证快速办理
按照学校原版(UST文凭证书)圣托马斯大学毕业证快速办理
 
一比一原版(ANU文凭证书)澳大利亚国立大学毕业证如何办理
一比一原版(ANU文凭证书)澳大利亚国立大学毕业证如何办理一比一原版(ANU文凭证书)澳大利亚国立大学毕业证如何办理
一比一原版(ANU文凭证书)澳大利亚国立大学毕业证如何办理
 
Production.pptxd dddddddddddddddddddddddddddddddddd
Production.pptxd ddddddddddddddddddddddddddddddddddProduction.pptxd dddddddddddddddddddddddddddddddddd
Production.pptxd dddddddddddddddddddddddddddddddddd
 
按照学校原版(Birmingham文凭证书)伯明翰大学|学院毕业证快速办理
按照学校原版(Birmingham文凭证书)伯明翰大学|学院毕业证快速办理按照学校原版(Birmingham文凭证书)伯明翰大学|学院毕业证快速办理
按照学校原版(Birmingham文凭证书)伯明翰大学|学院毕业证快速办理
 
一比一原版(UOL文凭证书)利物浦大学毕业证如何办理
一比一原版(UOL文凭证书)利物浦大学毕业证如何办理一比一原版(UOL文凭证书)利物浦大学毕业证如何办理
一比一原版(UOL文凭证书)利物浦大学毕业证如何办理
 
按照学校原版(UOL文凭证书)利物浦大学毕业证快速办理
按照学校原版(UOL文凭证书)利物浦大学毕业证快速办理按照学校原版(UOL文凭证书)利物浦大学毕业证快速办理
按照学校原版(UOL文凭证书)利物浦大学毕业证快速办理
 
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
 
按照学校原版(QU文凭证书)皇后大学毕业证快速办理
按照学校原版(QU文凭证书)皇后大学毕业证快速办理按照学校原版(QU文凭证书)皇后大学毕业证快速办理
按照学校原版(QU文凭证书)皇后大学毕业证快速办理
 
按照学校原版(Greenwich文凭证书)格林威治大学毕业证快速办理
按照学校原版(Greenwich文凭证书)格林威治大学毕业证快速办理按照学校原版(Greenwich文凭证书)格林威治大学毕业证快速办理
按照学校原版(Greenwich文凭证书)格林威治大学毕业证快速办理
 
LORRAINE ANDREI_LEQUIGAN_GOOGLE CALENDAR
LORRAINE ANDREI_LEQUIGAN_GOOGLE CALENDARLORRAINE ANDREI_LEQUIGAN_GOOGLE CALENDAR
LORRAINE ANDREI_LEQUIGAN_GOOGLE CALENDAR
 
加急办理美国南加州大学毕业证文凭毕业证原版一模一样
加急办理美国南加州大学毕业证文凭毕业证原版一模一样加急办理美国南加州大学毕业证文凭毕业证原版一模一样
加急办理美国南加州大学毕业证文凭毕业证原版一模一样
 

Magnitude Comparator

  • 1. Magnitude Comparator A magnitude comparator is a combinational circuit that compares two numbers, A and B, and then determines their relative magnitudes. A > B A = B A < B Algorithm Consider two numbers, A and B, with four digits each: 0 1 2 3 0 1 2 3 B B B B B A A A A A   operation AND ) ( 0 1 2 3    x x x x B A For equality to exist, all variables must be equal to 1: i x 3 2, 1, 0, for ' '    i B A B A x i i i i i 1 or 0 if 1      B A B A xi XNOR (note mistake p. 133)
  • 2. Magnitude Comparator To determine if A is greater than or less than B, we inspect the relative magnitudes of significant digits. If the two digits are equal, we compare the next lower significant pair of digits. The comparison continues until a pair of unequal digits is reached. The sequential comparison can be expressed by: 0 ' 0 1 2 3 1 ' 1 2 3 2 ' 2 3 3 ' 3 ' 0 0 1 2 3 ' 1 1 2 3 ' 2 2 3 ' 3 3 ) ( ) ( B A x x x B A x x B A x B A B A B A x x x B A x x B A x B A B A           Compare: 1 ) ( 0101 and 1010      B A B A 1 ) ( 1010 and 0101      B A B A
  • 3. ' 0 0 1 2 3 ' 1 1 2 3 ' 2 2 3 ' 3 3 B A x x x B A x x B A x B A     0 1 2 3 x x x x  0 ' 0 1 2 3 1 ' 1 2 3 2 ' 2 3 3 ' 3 B A x x x B A x x B A x B A     4-bit Magnitude Comparator XNOR
  • 4. DECODERS A decoder is a combinational circuit that converts binary information from n input lines to an 2n unique output lines. Applications: • Microprocessor memory system: selecting different banks of memory. • Microprocessor I/O: Selecting different devices. • Microprocessor instruction decoding: Enabling different functional units. • Memory: Decoding memory addresses (e.g. in ROM). • • •
  • 6. 3-to-8-line DECODER Truth Table 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 Binary Inputs Outputs If the input corresponds to minterm mi then the decoder ouputi will be the single asserted output.
  • 7. 2-to-4-line DECODER with Enable Input Complemented outputs The decoder is enabled when E = 0. The output whose value = 0 represents the minterm is selected by inputs A and B. The decoder is disabled when E = 1 D0 … D3 = 1 A Decoder with enable input is called a decoder/demultiplexer. Demultiplexer receives information from a single line and directs it to the output lines.
  • 8. A 4 x 16 DECODER • When w = 0, the top decoder is enabled and the bottom is disabled. Top decoder generates 8 minterms 0000 to 0111, while the bottom decoder outputs are 0’s. • When w = 1, the top decoder is disabled and the bottom is enabled. Bottom decoder generates 8 minterms 1000 to 1111, while the top decoder outputs are 0’s.
  • 9. Combinational Logic (Full-Adder) using Decoder ) 7 , 4 , 2 , 1 ( ) , , (   z y x ) 7 , 6 , 5 , 3 ( ) , , (   z y x
  • 10. MULTIPLEXERS/DATA SELECTORS A multiplexer is a combinational circuit that selects one of many input lines (2n) and steers it to its single output line. There are (2n) and n selection lines whose bit combinations determine which input is selected.
  • 11. 4-to-1LINE MULTIPLEXER DESIGN 1 0 In general, a 2n–to–1-line multiplexer is constructed from an n–to 2n decoder by adding to it 2n lines, one to each AND gate.
  • 13. Function implementation using multiplexers OR gates are included ) 7 , 6 , 2 , 1 ( ) , , (   z y x F Function with n variables and multiplexer with n – 1 selection Input variables x, y: Selection lines, S1 and S0 Variable z: Date line 0 Data lines 1,2,3: 1 , 0 , ' z
  • 15. Function implementation using 8x1multiplexer ) 15 , 14 , 13 , 12 , 11 , 4 , 3 , 1 ( ) , , , (   D C B A F 1. Complete the truth table from the SOP. 2. The first n – 1 variables in the table are applied to the selection inputs of the multiplexer. 3. For each combination of the selection variables, we evaluate the output as a function of the last variable. 4. Apply these values to the data input in proper order.
  • 16. Function implementation using 8x1 MUX note the order of input lines
  • 17. Three State Gates A three-state gate is a digital circuit that exhibits three states: 0, 1 and a high-impedance (high z state). The high impedance state behaves as an open circuit. Because of this feature (high z state), a large number of three-state gate outputs can be connected to form a common line without endangering load effects.
  • 18. Multiplexers with Three State Gates Note that the two output connections can not be done with other gates. When EN = 0, decoder outputs are zero, and the bus lines are in high z state. When EN = 1, one of the three-state buffers will be active depending on the binary value in the select inputs of the decoder.