SlideShare a Scribd company logo
1 of 32
Digital Logic Design
Lecture 19
Announcements
β€’ Homework 6 due Thursday 11/6
β€’ Recitation quiz on Monday, 11/10
– Will cover material from lectures 18,19,20
β€’ Change in Instructor Office Hours:
– Tuesday 10am-11am
– Thursday 11am-12pm
Agenda
β€’ Last time:
– Binary Adders and Subtracters (5.1, 5.1.1)
– Carry Lookahead Adders (5.1.2, 5.1.3)
β€’ This time:
– Decimal Adders (5.2)
– Comparators (5.3)
– Decoders (5.4)
– Encoders (5.5)
– Multiplexers (5.6)
Decimal Adders
8421 weighted coding scheme or BCD Code
Decimal Digit BCD
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
Forbidden codes: 1010,
1011, 1100, 1101, 1110,
1111
Decimal Adder
β€’ Inputs: 𝐴3𝐴2𝐴1𝐴0, 𝐡3𝐡2𝐡1𝐡0, 𝐢𝑖𝑛 from
previous decade.
β€’ Output: πΆπ‘œπ‘’π‘‘ (carry to next decade),
𝑍3𝑍2𝑍1𝑍0.
β€’ Idea: Perform regular binary addition and
then apply a corrective procedure.
Comparing Binary and BCD Sums
Decimal Sum K π‘·πŸ‘ π‘·πŸ π‘·πŸ π‘·πŸŽ π‘ͺ𝒐𝒖𝒕 π’πŸ‘ π’πŸ π’πŸ π’πŸŽ
0-9
10 0 1 0 1 0 1 0 0 0 0
11 0 1 0 1 1 1 0 0 0 1
12 0 1 1 0 0 1 0 0 1 0
13 0 1 1 0 1 1 0 0 1 1
14 0 1 1 1 0 1 0 1 0 0
15 0 1 1 1 1 1 0 1 0 1
16 1 0 0 0 0 1 0 1 1 0
17 1 0 0 0 1 1 0 1 1 1
18 1 0 0 1 0 1 1 0 0 0
19 1 0 0 1 1 1 1 0 0 1
---------Same-----------
πΆπ‘œπ‘’π‘‘ is
set to 0
Decimal Adder
β€’ No correction needed when the decimal sum is
between 0-9.
β€’ Must apply a correction when the sum is
between 10-19.
β€’ Case 1:
– 16-19: K is set to 1. Add binary quantity 0110 to
𝑃3𝑃2𝑃1𝑃0.
– 10-15: 𝐾𝑃3𝑃2𝑃1𝑃0 are set to 01010, 01011, . . ,
01111. Need to add 6. Use a K-map to obtain a
Boolean expression to detect these six binary
combinations.
A single-decade BCD Adder
Comparators
β€’ Compare the magnitude of two binary
numbers for the purpose of establishing
whether one is greater than, equal to, or less
than the other.
β€’ A comparator makes use of a cascade
connection of identical subnetworks similar to
the case of the parallel adder.
Comparators
β€’ Consider two n-bit binary numbers:
𝐴 = π΄π‘›βˆ’1 β‹― π΄π‘–π΄π‘–βˆ’1 β‹― 𝐴1𝐴0
𝐡 = π΅π‘›βˆ’1 β‹― π΅π‘–π΅π‘–βˆ’1 β‹― 𝐡1𝐡0
β€’ Assume 𝐴𝑖, 𝐡𝑖 are entering the subnetwork
and that the binary numbers are analyzed
from right to left.
β€’ Subnetwork is called a 1-bit comparator.
Comparators
β€’ 3 conditions describing the relative
magnitudes of π΄π‘–βˆ’1 β‹― 𝐴1𝐴0, π΅π‘–βˆ’1 β‹― 𝐡1𝐡0
β€’ 𝐺𝑖 = 1 denotes π΄π‘–βˆ’1 β‹― 𝐴1𝐴0 > π΅π‘–βˆ’1 β‹― 𝐡1𝐡0
β€’ 𝐸𝑖 = 1 denotes π΄π‘–βˆ’1 β‹― 𝐴1𝐴0 = π΅π‘–βˆ’1 β‹― 𝐡1𝐡0
β€’ 𝐿𝑖 = 1 denotes π΄π‘–βˆ’1 β‹― 𝐴1𝐴0 < π΅π‘–βˆ’1 β‹― 𝐡1𝐡0
β€’ 1-bit comparator is a 5-input 3-output
network
Comparators
β€’ Rules:
– If 𝐴𝑖 = 0, 𝐡𝑖 = 1 then 𝐿𝑖 = 1
– If 𝐴𝑖 = 1, 𝐡𝑖 = 0 then 𝐺𝑖 = 1
– If 𝐴𝑖 = 𝐡𝑖 and πΏπ‘–βˆ’1 = 1 then 𝐿𝑖 = 1
– If 𝐴𝑖 = 𝐡𝑖 and πΊπ‘–βˆ’1 = 1 then 𝐺𝑖 = 1
– If 𝐴𝑖 = 𝐡𝑖 and πΈπ‘–βˆ’1 = 1 then 𝐸𝑖 = 1
β€’ Can use this to construct a truth table.
Comparators
β€’ Minimal Sum Boolean Expressions:
𝐺𝑖+1 = 𝐴𝑖𝐡𝑖 + 𝐴𝑖𝐺𝑖 + 𝐡𝑖𝐺𝑖
𝐸𝑖+1 = 𝐴𝑖𝐡𝑖𝐸𝑖 + 𝐴𝑖𝐡𝑖𝐸𝑖
𝐿𝑖+1 = 𝐴𝑖𝐡𝑖 + 𝐡𝑖𝐿𝑖 + 𝐴𝑖𝐿𝑖
Comparators
Comparators
Decoder
β€’ Digital information represented in some
binary form must be converted into some
alternate binary form.
β€’ 𝑛 to 2𝑛
-line decoder.
β€’ Only one of the 2𝑛
output lines responds, with
a logic-1, to a given input combination of
values on its 𝑛-input lines.
Realization
Logic Diagram
Truth Table
Symbol
Decoder
β€’ Input combinations can be regarded as binary
numbers with the consequences that the j-th
output line is at logic-1 for j = 0, 1, . . , 7 only
when input combination j is applied.
Other types of Decoders
β€’ Function-specific decoders with less than 2𝑛
outputs exist.
β€’ Example: Decoder with 4 inputs and 10
outputs in which a single responding output
line corresponds to a combination of the 8421
code.
β€’ Example: Four input, seven output decoder
that accepts the 4 bits of the 8421 code and is
used to drive a seven-segment display.
Logic Design Using Decoders
β€’ An 𝑛-to-2𝑛
line decoder is a minterm generator.
β€’ By using or-gates in conjunction with an 𝑛-to-2𝑛
line decoder, realizations of Boolean functions are
possible.
β€’ Do not correspond to minimal sum-of-products.
β€’ Are simple to produce. Particularly convenient
when several functions of the same variable have
to be realized.
Minterms using OR Gates
Minterms using NOR Gates
Implementing a Decoder using NAND
Logic Diagram
Truth Table
Symbol
Minterms using AND gates
𝑓1 = βˆ‘π‘š 0,2,6,7 , 𝑓2 = βˆ‘π‘š(3,5,6,7)
Decoders with an Enable Input
Logic Diagram
Truth Table
Symbol
Decoders with enable inputs
β€’ When disabled, all outputs of the decoder can either
be at logic-0 or logic-1.
β€’ Enable input provides the decoder with additional
flexibility. Idea: data is applied to the enable input.
β€’ Process is known as demultiplexing.
β€’ Enable inputs are useful when constructing larger
decoders from smaller decoders.
Data
π‘₯0π‘₯1𝐸
If π‘₯0 = 0, π‘₯1 = 0 then
data appears on line 𝑧0.
Constructing Larger Decoders
Encoders
β€’ Encoders provide for the conversion of binary
information from one form to another.
β€’ Encoders are essentially the inverse of
decoders.
β€’ 2𝑛
-to-𝑛-line encoder in which an assertive
logic value on one of its 2𝑛
-input lines causes
the corresponding binary code to appear at
the output lines.
Encoders
β€’ Equations for 8-to-3-line encoder:
𝑧0 = π‘₯1 + π‘₯3 + π‘₯5 + π‘₯7
𝑧1 = π‘₯2 + π‘₯3 + π‘₯6 + π‘₯7
𝑧2 = π‘₯4 + π‘₯5 + π‘₯6 + π‘₯7
β€’ In general, the Boolean expression for the output 𝑧𝑖 is the sum of each
input π‘₯𝑗 in which the binary representation of 𝑗 has a 1 in the 2𝑖
-bit
position.
Priority Encoder
β€’ The assumption that at most a single input to the
encoder is asserted at any time is significant in its
operation.
– Example: Both π‘₯3 (11) and π‘₯5 (101) are asserted.
What is the output?
– 111 π‘₯7
β€’ Priority Encoder:
– A priority scheme is assigned to the input lines so that
whenever more than one input line is asserted at any
time, the output is determined by the input line
having the highest priority.
Priority Encoder
The output is determined by the asserted input having the highest index.
π‘₯𝑖 has higher priority than π‘₯𝑗 if 𝑖 > 𝑗.
β€œValid” indicates that at least one input line is asserted.
This distinguishes the situation that no input line is asserted from when the
π‘₯0 input line is asserted, since in both cases 𝑧2𝑧1𝑧0 = 000.
lecture_19.pptx

More Related Content

Similar to lecture_19.pptx

Digital fundamendals r001a
Digital fundamendals r001aDigital fundamendals r001a
Digital fundamendals r001aarunachalamr16
Β 
Finite word length effects
Finite word length effectsFinite word length effects
Finite word length effectsPeriyanayagiS
Β 
SESSION 2.ppt
SESSION 2.pptSESSION 2.ppt
SESSION 2.pptSaranya S
Β 
Combinational circuit
Combinational circuitCombinational circuit
Combinational circuitsabina deshar
Β 
data representation
 data representation data representation
data representationHaroon_007
Β 
STLD-Combinational logic design
STLD-Combinational  logic design STLD-Combinational  logic design
STLD-Combinational logic design Abhinay Potlabathini
Β 
Comparators_and_Code_Convertersv.pptx.ppt
Comparators_and_Code_Convertersv.pptx.pptComparators_and_Code_Convertersv.pptx.ppt
Comparators_and_Code_Convertersv.pptx.pptHardikGupta400524
Β 
Only floating point lecture 7 (1)
Only floating point lecture 7 (1)Only floating point lecture 7 (1)
Only floating point lecture 7 (1)talhashahid40
Β 
lecture_20.pptx
lecture_20.pptxlecture_20.pptx
lecture_20.pptxssuserf05323
Β 
12.Representation of signed binary numbers. Binary codes - BCD code, Gray co...
12.Representation of signed binary numbers.  Binary codes - BCD code, Gray co...12.Representation of signed binary numbers.  Binary codes - BCD code, Gray co...
12.Representation of signed binary numbers. Binary codes - BCD code, Gray co...JatinJatin30
Β 
Week 4-Number Systems.pptx
Week 4-Number Systems.pptxWeek 4-Number Systems.pptx
Week 4-Number Systems.pptxHamnaKhalid25
Β 

Similar to lecture_19.pptx (20)

Digital fundamendals r001a
Digital fundamendals r001aDigital fundamendals r001a
Digital fundamendals r001a
Β 
Digital Logic
Digital LogicDigital Logic
Digital Logic
Β 
Finite word length effects
Finite word length effectsFinite word length effects
Finite word length effects
Β 
Lecture 2 ns
Lecture 2 nsLecture 2 ns
Lecture 2 ns
Β 
12117188.ppt
12117188.ppt12117188.ppt
12117188.ppt
Β 
12117188.ppt
12117188.ppt12117188.ppt
12117188.ppt
Β 
SESSION 2.ppt
SESSION 2.pptSESSION 2.ppt
SESSION 2.ppt
Β 
Combinational circuit
Combinational circuitCombinational circuit
Combinational circuit
Β 
data representation
 data representation data representation
data representation
Β 
Number Systems.ppt
Number Systems.pptNumber Systems.ppt
Number Systems.ppt
Β 
STLD-Combinational logic design
STLD-Combinational  logic design STLD-Combinational  logic design
STLD-Combinational logic design
Β 
Comparators_and_Code_Convertersv.pptx.ppt
Comparators_and_Code_Convertersv.pptx.pptComparators_and_Code_Convertersv.pptx.ppt
Comparators_and_Code_Convertersv.pptx.ppt
Β 
DCF-Combinational circuit
DCF-Combinational circuitDCF-Combinational circuit
DCF-Combinational circuit
Β 
Only floating point lecture 7 (1)
Only floating point lecture 7 (1)Only floating point lecture 7 (1)
Only floating point lecture 7 (1)
Β 
lecture_20.pptx
lecture_20.pptxlecture_20.pptx
lecture_20.pptx
Β 
lecture_20.pptx
lecture_20.pptxlecture_20.pptx
lecture_20.pptx
Β 
12.Representation of signed binary numbers. Binary codes - BCD code, Gray co...
12.Representation of signed binary numbers.  Binary codes - BCD code, Gray co...12.Representation of signed binary numbers.  Binary codes - BCD code, Gray co...
12.Representation of signed binary numbers. Binary codes - BCD code, Gray co...
Β 
Week 4-Number Systems.pptx
Week 4-Number Systems.pptxWeek 4-Number Systems.pptx
Week 4-Number Systems.pptx
Β 
Alu1
Alu1Alu1
Alu1
Β 
Lect 1 unit 2.pdf
Lect 1 unit 2.pdfLect 1 unit 2.pdf
Lect 1 unit 2.pdf
Β 

Recently uploaded

Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
Β 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
Β 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
Β 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
Β 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
Β 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
Β 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
Β 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
Β 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
Β 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAbhinavSharma374939
Β 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
Β 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
Β 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
Β 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
Β 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
Β 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
Β 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
Β 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
Β 

Recently uploaded (20)

Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Β 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
Β 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Β 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Β 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
Β 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
Β 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
Β 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
Β 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
Β 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog Converter
Β 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
Β 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
Β 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Β 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
Β 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
Β 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
Β 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Β 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
Β 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
Β 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
Β 

lecture_19.pptx

  • 2. Announcements β€’ Homework 6 due Thursday 11/6 β€’ Recitation quiz on Monday, 11/10 – Will cover material from lectures 18,19,20 β€’ Change in Instructor Office Hours: – Tuesday 10am-11am – Thursday 11am-12pm
  • 3. Agenda β€’ Last time: – Binary Adders and Subtracters (5.1, 5.1.1) – Carry Lookahead Adders (5.1.2, 5.1.3) β€’ This time: – Decimal Adders (5.2) – Comparators (5.3) – Decoders (5.4) – Encoders (5.5) – Multiplexers (5.6)
  • 4. Decimal Adders 8421 weighted coding scheme or BCD Code Decimal Digit BCD 0 0000 1 0001 2 0010 3 0011 4 0100 5 0101 6 0110 7 0111 8 1000 9 1001 Forbidden codes: 1010, 1011, 1100, 1101, 1110, 1111
  • 5. Decimal Adder β€’ Inputs: 𝐴3𝐴2𝐴1𝐴0, 𝐡3𝐡2𝐡1𝐡0, 𝐢𝑖𝑛 from previous decade. β€’ Output: πΆπ‘œπ‘’π‘‘ (carry to next decade), 𝑍3𝑍2𝑍1𝑍0. β€’ Idea: Perform regular binary addition and then apply a corrective procedure.
  • 6. Comparing Binary and BCD Sums Decimal Sum K π‘·πŸ‘ π‘·πŸ π‘·πŸ π‘·πŸŽ π‘ͺ𝒐𝒖𝒕 π’πŸ‘ π’πŸ π’πŸ π’πŸŽ 0-9 10 0 1 0 1 0 1 0 0 0 0 11 0 1 0 1 1 1 0 0 0 1 12 0 1 1 0 0 1 0 0 1 0 13 0 1 1 0 1 1 0 0 1 1 14 0 1 1 1 0 1 0 1 0 0 15 0 1 1 1 1 1 0 1 0 1 16 1 0 0 0 0 1 0 1 1 0 17 1 0 0 0 1 1 0 1 1 1 18 1 0 0 1 0 1 1 0 0 0 19 1 0 0 1 1 1 1 0 0 1 ---------Same----------- πΆπ‘œπ‘’π‘‘ is set to 0
  • 7. Decimal Adder β€’ No correction needed when the decimal sum is between 0-9. β€’ Must apply a correction when the sum is between 10-19. β€’ Case 1: – 16-19: K is set to 1. Add binary quantity 0110 to 𝑃3𝑃2𝑃1𝑃0. – 10-15: 𝐾𝑃3𝑃2𝑃1𝑃0 are set to 01010, 01011, . . , 01111. Need to add 6. Use a K-map to obtain a Boolean expression to detect these six binary combinations.
  • 9. Comparators β€’ Compare the magnitude of two binary numbers for the purpose of establishing whether one is greater than, equal to, or less than the other. β€’ A comparator makes use of a cascade connection of identical subnetworks similar to the case of the parallel adder.
  • 10. Comparators β€’ Consider two n-bit binary numbers: 𝐴 = π΄π‘›βˆ’1 β‹― π΄π‘–π΄π‘–βˆ’1 β‹― 𝐴1𝐴0 𝐡 = π΅π‘›βˆ’1 β‹― π΅π‘–π΅π‘–βˆ’1 β‹― 𝐡1𝐡0 β€’ Assume 𝐴𝑖, 𝐡𝑖 are entering the subnetwork and that the binary numbers are analyzed from right to left. β€’ Subnetwork is called a 1-bit comparator.
  • 11. Comparators β€’ 3 conditions describing the relative magnitudes of π΄π‘–βˆ’1 β‹― 𝐴1𝐴0, π΅π‘–βˆ’1 β‹― 𝐡1𝐡0 β€’ 𝐺𝑖 = 1 denotes π΄π‘–βˆ’1 β‹― 𝐴1𝐴0 > π΅π‘–βˆ’1 β‹― 𝐡1𝐡0 β€’ 𝐸𝑖 = 1 denotes π΄π‘–βˆ’1 β‹― 𝐴1𝐴0 = π΅π‘–βˆ’1 β‹― 𝐡1𝐡0 β€’ 𝐿𝑖 = 1 denotes π΄π‘–βˆ’1 β‹― 𝐴1𝐴0 < π΅π‘–βˆ’1 β‹― 𝐡1𝐡0 β€’ 1-bit comparator is a 5-input 3-output network
  • 12. Comparators β€’ Rules: – If 𝐴𝑖 = 0, 𝐡𝑖 = 1 then 𝐿𝑖 = 1 – If 𝐴𝑖 = 1, 𝐡𝑖 = 0 then 𝐺𝑖 = 1 – If 𝐴𝑖 = 𝐡𝑖 and πΏπ‘–βˆ’1 = 1 then 𝐿𝑖 = 1 – If 𝐴𝑖 = 𝐡𝑖 and πΊπ‘–βˆ’1 = 1 then 𝐺𝑖 = 1 – If 𝐴𝑖 = 𝐡𝑖 and πΈπ‘–βˆ’1 = 1 then 𝐸𝑖 = 1 β€’ Can use this to construct a truth table.
  • 13. Comparators β€’ Minimal Sum Boolean Expressions: 𝐺𝑖+1 = 𝐴𝑖𝐡𝑖 + 𝐴𝑖𝐺𝑖 + 𝐡𝑖𝐺𝑖 𝐸𝑖+1 = 𝐴𝑖𝐡𝑖𝐸𝑖 + 𝐴𝑖𝐡𝑖𝐸𝑖 𝐿𝑖+1 = 𝐴𝑖𝐡𝑖 + 𝐡𝑖𝐿𝑖 + 𝐴𝑖𝐿𝑖
  • 16. Decoder β€’ Digital information represented in some binary form must be converted into some alternate binary form. β€’ 𝑛 to 2𝑛 -line decoder. β€’ Only one of the 2𝑛 output lines responds, with a logic-1, to a given input combination of values on its 𝑛-input lines.
  • 18. Decoder β€’ Input combinations can be regarded as binary numbers with the consequences that the j-th output line is at logic-1 for j = 0, 1, . . , 7 only when input combination j is applied.
  • 19. Other types of Decoders β€’ Function-specific decoders with less than 2𝑛 outputs exist. β€’ Example: Decoder with 4 inputs and 10 outputs in which a single responding output line corresponds to a combination of the 8421 code. β€’ Example: Four input, seven output decoder that accepts the 4 bits of the 8421 code and is used to drive a seven-segment display.
  • 20. Logic Design Using Decoders β€’ An 𝑛-to-2𝑛 line decoder is a minterm generator. β€’ By using or-gates in conjunction with an 𝑛-to-2𝑛 line decoder, realizations of Boolean functions are possible. β€’ Do not correspond to minimal sum-of-products. β€’ Are simple to produce. Particularly convenient when several functions of the same variable have to be realized.
  • 23. Implementing a Decoder using NAND Logic Diagram Truth Table Symbol
  • 24. Minterms using AND gates 𝑓1 = βˆ‘π‘š 0,2,6,7 , 𝑓2 = βˆ‘π‘š(3,5,6,7)
  • 25. Decoders with an Enable Input Logic Diagram Truth Table Symbol
  • 26. Decoders with enable inputs β€’ When disabled, all outputs of the decoder can either be at logic-0 or logic-1. β€’ Enable input provides the decoder with additional flexibility. Idea: data is applied to the enable input. β€’ Process is known as demultiplexing. β€’ Enable inputs are useful when constructing larger decoders from smaller decoders. Data π‘₯0π‘₯1𝐸 If π‘₯0 = 0, π‘₯1 = 0 then data appears on line 𝑧0.
  • 28. Encoders β€’ Encoders provide for the conversion of binary information from one form to another. β€’ Encoders are essentially the inverse of decoders. β€’ 2𝑛 -to-𝑛-line encoder in which an assertive logic value on one of its 2𝑛 -input lines causes the corresponding binary code to appear at the output lines.
  • 29. Encoders β€’ Equations for 8-to-3-line encoder: 𝑧0 = π‘₯1 + π‘₯3 + π‘₯5 + π‘₯7 𝑧1 = π‘₯2 + π‘₯3 + π‘₯6 + π‘₯7 𝑧2 = π‘₯4 + π‘₯5 + π‘₯6 + π‘₯7 β€’ In general, the Boolean expression for the output 𝑧𝑖 is the sum of each input π‘₯𝑗 in which the binary representation of 𝑗 has a 1 in the 2𝑖 -bit position.
  • 30. Priority Encoder β€’ The assumption that at most a single input to the encoder is asserted at any time is significant in its operation. – Example: Both π‘₯3 (11) and π‘₯5 (101) are asserted. What is the output? – 111 π‘₯7 β€’ Priority Encoder: – A priority scheme is assigned to the input lines so that whenever more than one input line is asserted at any time, the output is determined by the input line having the highest priority.
  • 31. Priority Encoder The output is determined by the asserted input having the highest index. π‘₯𝑖 has higher priority than π‘₯𝑗 if 𝑖 > 𝑗. β€œValid” indicates that at least one input line is asserted. This distinguishes the situation that no input line is asserted from when the π‘₯0 input line is asserted, since in both cases 𝑧2𝑧1𝑧0 = 000.