SlideShare ist ein Scribd-Unternehmen logo
1 von 36
DIGITAL SYSTEMS TCE1111
ECB2212-Digital Electronics
Numbering Systems
Ms.K.Indra Gandhi
Asst Prof (Sr.Gr) /ECE
DIGITAL SYSTEMS TCE1111
• If two input bits are not equal, its output is a 1. But if
two input bits are equal, its output is a 0.
• So exclusiveOR gate can be used as a 2bit Comparator.
2
DIGITAL SYSTEMS TCE1111
3
• In order to compare binary numbers containing two bits each,
an additional XOR gate is necessary
• 2 LSB of two numbers are compared by gate G1
• 2 MSB of two numbers are compared by gate G2
• 2 Inverters and 1 AND gate can be used
DIGITAL SYSTEMS TCE1111
4
Logic diagram for equality comparison of two 2-bit numbers..
XOR gate and inverter can be replaced by an XNOR symbol,
HOW?
DIGITAL SYSTEMS TCE1111
Contd...
• There are two different types of output relationship
between the two binary quantities;
• Equality output indicates that the two binary numbers
being compared is equal (A = B) and
• Inequality output that indicates which of the two binary
number being compared is the larger.
• That is, there is an output that indicates when A is
greater than B (A > B) and an output that indicates
when A is less than B (A < B).
5
DIGITAL SYSTEMS TCE1111
74LS85 (4bit magnitude comparator)
The 74LS85 compares two unsigned 4-bit binary
numbers , the unsigned numbers are A3, A2, A1, A0
and B3, B2, B1, B0.
6
Cascading
Inputs
Outputs
DIGITAL SYSTEMS TCE1111
It has three active-HIGH outputs
Start with most significant bit in each number to determine the
inequality of 4-bit binary numbers A and B
• Output A<B will be HIGH if A3=0, and B3=1
• Output A>B will be HIGH if A3=1, and B3=0
• If A3=0, and B3=0 or A3=1, and B3=1, then examine the next
lower order bit position for an inequality.Only when all bits of
A=B, output A=B will be HIGH
7
DIGITAL SYSTEMS TCE1111
8
The general procedure used in comparator:
• Start with the highest-order bits (MSB)
• When an inequality is found, the relationship of the 2
numbers is established, and any other inequalities in lower-
order positions must be ignored
• THE HIGHEST ORDER INDICATION MUST TAKE
PRECEDENCE
DIGITAL SYSTEMS TCE1111
9
Example: Determine the A=B, A>B, and A<B outputs for the input numbers shown on the 4-bit comparator as given below.
Solution: The number on the A inputs is 0110 and the number on the B
inputs is 0011. The A > B output is HIGH and the other outputs (A=B
and A<B) are LOW
DIGITAL SYSTEMS TCE1111
Contd...
• In addition, it also has three cascading inputs:
• These inputs provides a means for expanding the
comparison operation by cascading two or more 4bit
comparator.
• To expand the comparator, the A<B, A=B, and A>B
outputs of the lowerorder comparator are connected to
the corresponding cascading inputs of the next
higherorder comparator.
10
DIGITAL SYSTEMS TCE1111
Contd...
• The lowest-order comparator must have a HIGH on the
A=B, and LOWs on the A<B and A>B inputs as shown in next
slide.
• The comparator on the left is comparing the lower-order
8bit with the comparator on the right with higherorder
8bit .
• The outputs of the lowerorder bits are fed to the cascade
inputs of the comparator on the right, which is comparing
the high-order bits.
• The outputs of the high-order comparator are the final
outputs that indicate the result of the 8bit comparison.
11
DIGITAL SYSTEMS TCE1111
12
An 8-bit magnitude comparator using two 4-bit comparators.
DIGITAL SYSTEMS TCE1111
13
DIGITAL SYSTEMS TCE1111
14
DIGITAL SYSTEMS TCE1111
15
DIGITAL SYSTEMS TCE1111
16
DIGITAL SYSTEMS TCE1111
Example :
Determine the output for the following sets of
binary
numbers to the comparator inputs in figure below.
(a) 10 and 10 (b) 11 and 10
Solution
( a )The output is 1 (b) The output is 0
17
DIGITAL SYSTEMS TCE1111
CODE CONVERTERS
• A code converter is a logic circuit that changes data
presented in one type of binary code to another type of
binary code, such as BCD to binary, BCD to 7segment,
binary to BCD, BCD to XS3, binary to Gray code, and Gray
code to binary.
• We know that, two digit decimal values ranging from 00
to 99 can be represented in BCD by two 4bit code
groups.
18
DIGITAL SYSTEMS TCE1111
19
BCD-to-Binary Conversion
One method of BCD-to-Binary code conversion uses adder
circuits :
1. The value, or weight, of each bit in the BCD number is
represented by a binary number
2. All of the binary representations of the weights of bits that
are 1s in the BCD number are added
3. The result of this addition is the binary equivalent of the
BCD number
DIGITAL SYSTEMS TCE1111
Contd...
For example, 4610 is represented as
• The MSB has a weight of 10, and the LSB has a weight
of 1.
• So the most significant 4bit group represents 40, and
the least significant 4bit group represents 6 as in
Table.
20
DIGITAL SYSTEMS TCE1111
21
Weight Table
DIGITAL SYSTEMS TCE1111
The binary equivalent of each BCD bit is a binary number
representing the BCD bit weight
22
DIGITAL SYSTEMS TCE1111
The result from the addition of the binary representation for
the weights of all the 1s in the BCD number is the binary
number that corresponds to the BCD number.
23
DIGITAL SYSTEMS TCE1111
Example :
Convert the BCD equivalent of 26 to binary.
Solution
24
DIGITAL SYSTEMS TCE1111
FOUR BIT BINARY TO GRAY CODE CONVERTER –DESIGN (1)…
25
TRUTH TABLE:
MSB
0
+
1
+
1
+
0
+
1
0 1 0 1 1
Binary code
Gray code
INPUT ( BINARY) OUTPUTS (GRAY CODE)
B3 B2 B1 B0 G3 G2 G1 G0
0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 1
0 0 1 0 0 0 1 1
0 0 1 1 0 0 1 0
0 1 0 0 0 1 1 0
0 1 0 1 0 1 1 1
0 1 1 0 0 1 0 1
0 1 1 1 0 1 0 0
1 0 0 0 1 1 0 0
1 0 0 1 1 1 0 1
1 0 1 0 1 1 1 1
1 0 1 1 1 1 1 0
1 1 0 0 1 0 1 0
1 1 0 1 1 0 1 1
1 1 1 0 1 0 0 1
1 1 1 1 1 0 0 0
DIGITAL SYSTEMS TCE1111
FOUR BIT BINARY TO GRAY CODE CONVERTER –DESIGN (2)…
26
Simplification using K-maps:
DIGITAL SYSTEMS TCE1111
27
FOUR BIT BINARY TO GRAY CODE CONVERTER –DESIGN
(3)
Logic Diagram:
DIGITAL SYSTEMS TCE1111
FOUR BIT GRAY CODE TO BINARY CONVERTER –DESIGN (1)…
• Truth Table:
28
MSB
1
+
0
+
1
+
0
+
0
1 1 0 0 0
Gray code
Binary code
INPUT ( GRAY CODE) OUTPUTS (BINARY )
G3 G2 G1 G0 B3 B2 B1 B0
0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 1
0 0 1 0 0 0 1 1
0 0 1 1 0 0 1 0
0 1 0 0 0 1 1 1
0 1 0 1 0 1 1 0
0 1 1 0 0 1 0 0
0 1 1 1 0 1 0 1
1 0 0 0 1 1 1 1
1 0 0 1 1 1 1 0
1 0 1 0 1 1 0 0
1 0 1 1 1 1 0 1
1 1 0 0 1 0 0 0
1 1 0 1 1 0 0 1
1 1 1 0 1 0 1 1
1 1 1 1 1 0 1 0
DIGITAL SYSTEMS TCE1111
FOUR BIT GRAY CODE TO BINARY CONVERTER –DESIGN (2)…
29
Simplification using K-Maps:
DIGITAL SYSTEMS TCE1111
FOUR BIT GRAY CODE TO BINARY CONVERTER –DESIGN (3)…
30
Simplification using K-Maps:
DIGITAL SYSTEMS TCE1111
31
FOUR BIT GRAY CODE TO BINARY CONVERTER –DESIGN
(4)
Logic Diagram:
DIGITAL SYSTEMS TCE1111
32
Exercise
1. Convert the binary number 0101 to Gray code with XOR
gates
2. Convert the gray code 1011 to binary with XOR gates
Solution:
DIGITAL SYSTEMS TCE1111
BCD to XS 3 code converter- Design (1)...
33
TRUTH TABLE FOR BCD TO XS3 CODE CONVERTER:
Input ( Std BCD code) Output ( XS3 Code)
A B C D w x y z
0 0 0 0 0 0 1 1
0 0 0 1 0 1 0 0
0 0 1 0 0 1 0 1
0 0 1 1 0 1 1 0
0 1 0 0 0 1 1 1
0 1 0 1 1 0 0 0
0 1 1 0 1 0 0 1
0 1 1 1 1 0 1 0
1 0 0 0 1 0 1 1
1 0 0 1 1 1 0 0
1 0 1 0 X X X X
1 0 1 1 X X X X
1 1 0 1 X X X X
1 1 1 0 X X X X
1 1 1 1 X X X X
DIGITAL SYSTEMS TCE1111
BCD to XS 3 code converter- Design (2)...
34
K-maps for simplification and simplified Boolean expressions
DIGITAL SYSTEMS TCE1111
BCD to XS 3 code converter- Design (3)...
• After the manipulation of the Boolean
expressions for using common gates for two or
more outputs, logic expressions can be given by
z=D’
y=CD+C’D’ = (C+D)’
x= B’C + B’D + BC’D’ = B’(C+D) + BC’D’
w= A + BC + BD = A + B (C+D)
35
DIGITAL SYSTEMS TCE1111
BCD to XS 3 code converter- Design (4)
36

Weitere ähnliche Inhalte

Ähnlich wie Comparators_and_Code_Convertersv.pptx.ppt

Digital fundamendals r001a
Digital fundamendals r001aDigital fundamendals r001a
Digital fundamendals r001aarunachalamr16
 
E4 unit 2 combitional circuits.pptx
E4 unit 2 combitional circuits.pptxE4 unit 2 combitional circuits.pptx
E4 unit 2 combitional circuits.pptxDeekshithSkandaM
 
CDS Fundamentals of digital communication system UNIT 1 AND 2.pdf
CDS Fundamentals of digital communication system UNIT 1 AND 2.pdfCDS Fundamentals of digital communication system UNIT 1 AND 2.pdf
CDS Fundamentals of digital communication system UNIT 1 AND 2.pdfshubhangisonawane6
 
W3 Chapter 2B Notes CCB1223 Digital Logic.pdf
W3 Chapter 2B Notes CCB1223 Digital Logic.pdfW3 Chapter 2B Notes CCB1223 Digital Logic.pdf
W3 Chapter 2B Notes CCB1223 Digital Logic.pdfMOHDZAMRIBINIBRAHIM1
 
combinational-circuit (1).ppt
combinational-circuit (1).pptcombinational-circuit (1).ppt
combinational-circuit (1).pptThanmayiKumar
 
Digital electronics & microprocessor Batu- s y computer engineering- arvind p...
Digital electronics & microprocessor Batu- s y computer engineering- arvind p...Digital electronics & microprocessor Batu- s y computer engineering- arvind p...
Digital electronics & microprocessor Batu- s y computer engineering- arvind p...ARVIND PANDE
 
Unit 1 data representation and computer arithmetic
Unit 1  data representation and computer arithmeticUnit 1  data representation and computer arithmetic
Unit 1 data representation and computer arithmeticAmrutaMehata
 
Chapter 2_Number system (EEEg4302).pdf
Chapter 2_Number system (EEEg4302).pdfChapter 2_Number system (EEEg4302).pdf
Chapter 2_Number system (EEEg4302).pdfTamiratDejene1
 
digital logic circuits, digital component floting and fixed point
 digital logic circuits, digital component floting and fixed point digital logic circuits, digital component floting and fixed point
digital logic circuits, digital component floting and fixed pointRai University
 
21EC201– Digital Principles and system design.pptx
21EC201– Digital Principles and system design.pptx21EC201– Digital Principles and system design.pptx
21EC201– Digital Principles and system design.pptxGobinathAECEJRF1101
 
data representation
 data representation data representation
data representationHaroon_007
 

Ähnlich wie Comparators_and_Code_Convertersv.pptx.ppt (20)

Digital fundamendals r001a
Digital fundamendals r001aDigital fundamendals r001a
Digital fundamendals r001a
 
E4 unit 2 combitional circuits.pptx
E4 unit 2 combitional circuits.pptxE4 unit 2 combitional circuits.pptx
E4 unit 2 combitional circuits.pptx
 
CDS Fundamentals of digital communication system UNIT 1 AND 2.pdf
CDS Fundamentals of digital communication system UNIT 1 AND 2.pdfCDS Fundamentals of digital communication system UNIT 1 AND 2.pdf
CDS Fundamentals of digital communication system UNIT 1 AND 2.pdf
 
W3 Chapter 2B Notes CCB1223 Digital Logic.pdf
W3 Chapter 2B Notes CCB1223 Digital Logic.pdfW3 Chapter 2B Notes CCB1223 Digital Logic.pdf
W3 Chapter 2B Notes CCB1223 Digital Logic.pdf
 
Alu1
Alu1Alu1
Alu1
 
Chapter-04.pdf
Chapter-04.pdfChapter-04.pdf
Chapter-04.pdf
 
The decoder
The decoderThe decoder
The decoder
 
combinational-circuit (1).ppt
combinational-circuit (1).pptcombinational-circuit (1).ppt
combinational-circuit (1).ppt
 
Digital electronics & microprocessor Batu- s y computer engineering- arvind p...
Digital electronics & microprocessor Batu- s y computer engineering- arvind p...Digital electronics & microprocessor Batu- s y computer engineering- arvind p...
Digital electronics & microprocessor Batu- s y computer engineering- arvind p...
 
Unit 1 data representation and computer arithmetic
Unit 1  data representation and computer arithmeticUnit 1  data representation and computer arithmetic
Unit 1 data representation and computer arithmetic
 
BCDCONVERTER.pptx
BCDCONVERTER.pptxBCDCONVERTER.pptx
BCDCONVERTER.pptx
 
lecture_19.pptx
lecture_19.pptxlecture_19.pptx
lecture_19.pptx
 
Number Systems.ppt
Number Systems.pptNumber Systems.ppt
Number Systems.ppt
 
Chapter 2_Number system (EEEg4302).pdf
Chapter 2_Number system (EEEg4302).pdfChapter 2_Number system (EEEg4302).pdf
Chapter 2_Number system (EEEg4302).pdf
 
digital logic circuits, digital component floting and fixed point
 digital logic circuits, digital component floting and fixed point digital logic circuits, digital component floting and fixed point
digital logic circuits, digital component floting and fixed point
 
21EC201– Digital Principles and system design.pptx
21EC201– Digital Principles and system design.pptx21EC201– Digital Principles and system design.pptx
21EC201– Digital Principles and system design.pptx
 
Number system
Number systemNumber system
Number system
 
Number_Systems (2).ppt
Number_Systems (2).pptNumber_Systems (2).ppt
Number_Systems (2).ppt
 
data representation
 data representation data representation
data representation
 
Cit 1101 lec 02
Cit 1101 lec 02Cit 1101 lec 02
Cit 1101 lec 02
 

Kürzlich hochgeladen

Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxcallscotland1987
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 

Kürzlich hochgeladen (20)

Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 

Comparators_and_Code_Convertersv.pptx.ppt

  • 1. DIGITAL SYSTEMS TCE1111 ECB2212-Digital Electronics Numbering Systems Ms.K.Indra Gandhi Asst Prof (Sr.Gr) /ECE
  • 2. DIGITAL SYSTEMS TCE1111 • If two input bits are not equal, its output is a 1. But if two input bits are equal, its output is a 0. • So exclusiveOR gate can be used as a 2bit Comparator. 2
  • 3. DIGITAL SYSTEMS TCE1111 3 • In order to compare binary numbers containing two bits each, an additional XOR gate is necessary • 2 LSB of two numbers are compared by gate G1 • 2 MSB of two numbers are compared by gate G2 • 2 Inverters and 1 AND gate can be used
  • 4. DIGITAL SYSTEMS TCE1111 4 Logic diagram for equality comparison of two 2-bit numbers.. XOR gate and inverter can be replaced by an XNOR symbol, HOW?
  • 5. DIGITAL SYSTEMS TCE1111 Contd... • There are two different types of output relationship between the two binary quantities; • Equality output indicates that the two binary numbers being compared is equal (A = B) and • Inequality output that indicates which of the two binary number being compared is the larger. • That is, there is an output that indicates when A is greater than B (A > B) and an output that indicates when A is less than B (A < B). 5
  • 6. DIGITAL SYSTEMS TCE1111 74LS85 (4bit magnitude comparator) The 74LS85 compares two unsigned 4-bit binary numbers , the unsigned numbers are A3, A2, A1, A0 and B3, B2, B1, B0. 6 Cascading Inputs Outputs
  • 7. DIGITAL SYSTEMS TCE1111 It has three active-HIGH outputs Start with most significant bit in each number to determine the inequality of 4-bit binary numbers A and B • Output A<B will be HIGH if A3=0, and B3=1 • Output A>B will be HIGH if A3=1, and B3=0 • If A3=0, and B3=0 or A3=1, and B3=1, then examine the next lower order bit position for an inequality.Only when all bits of A=B, output A=B will be HIGH 7
  • 8. DIGITAL SYSTEMS TCE1111 8 The general procedure used in comparator: • Start with the highest-order bits (MSB) • When an inequality is found, the relationship of the 2 numbers is established, and any other inequalities in lower- order positions must be ignored • THE HIGHEST ORDER INDICATION MUST TAKE PRECEDENCE
  • 9. DIGITAL SYSTEMS TCE1111 9 Example: Determine the A=B, A>B, and A<B outputs for the input numbers shown on the 4-bit comparator as given below. Solution: The number on the A inputs is 0110 and the number on the B inputs is 0011. The A > B output is HIGH and the other outputs (A=B and A<B) are LOW
  • 10. DIGITAL SYSTEMS TCE1111 Contd... • In addition, it also has three cascading inputs: • These inputs provides a means for expanding the comparison operation by cascading two or more 4bit comparator. • To expand the comparator, the A<B, A=B, and A>B outputs of the lowerorder comparator are connected to the corresponding cascading inputs of the next higherorder comparator. 10
  • 11. DIGITAL SYSTEMS TCE1111 Contd... • The lowest-order comparator must have a HIGH on the A=B, and LOWs on the A<B and A>B inputs as shown in next slide. • The comparator on the left is comparing the lower-order 8bit with the comparator on the right with higherorder 8bit . • The outputs of the lowerorder bits are fed to the cascade inputs of the comparator on the right, which is comparing the high-order bits. • The outputs of the high-order comparator are the final outputs that indicate the result of the 8bit comparison. 11
  • 12. DIGITAL SYSTEMS TCE1111 12 An 8-bit magnitude comparator using two 4-bit comparators.
  • 17. DIGITAL SYSTEMS TCE1111 Example : Determine the output for the following sets of binary numbers to the comparator inputs in figure below. (a) 10 and 10 (b) 11 and 10 Solution ( a )The output is 1 (b) The output is 0 17
  • 18. DIGITAL SYSTEMS TCE1111 CODE CONVERTERS • A code converter is a logic circuit that changes data presented in one type of binary code to another type of binary code, such as BCD to binary, BCD to 7segment, binary to BCD, BCD to XS3, binary to Gray code, and Gray code to binary. • We know that, two digit decimal values ranging from 00 to 99 can be represented in BCD by two 4bit code groups. 18
  • 19. DIGITAL SYSTEMS TCE1111 19 BCD-to-Binary Conversion One method of BCD-to-Binary code conversion uses adder circuits : 1. The value, or weight, of each bit in the BCD number is represented by a binary number 2. All of the binary representations of the weights of bits that are 1s in the BCD number are added 3. The result of this addition is the binary equivalent of the BCD number
  • 20. DIGITAL SYSTEMS TCE1111 Contd... For example, 4610 is represented as • The MSB has a weight of 10, and the LSB has a weight of 1. • So the most significant 4bit group represents 40, and the least significant 4bit group represents 6 as in Table. 20
  • 22. DIGITAL SYSTEMS TCE1111 The binary equivalent of each BCD bit is a binary number representing the BCD bit weight 22
  • 23. DIGITAL SYSTEMS TCE1111 The result from the addition of the binary representation for the weights of all the 1s in the BCD number is the binary number that corresponds to the BCD number. 23
  • 24. DIGITAL SYSTEMS TCE1111 Example : Convert the BCD equivalent of 26 to binary. Solution 24
  • 25. DIGITAL SYSTEMS TCE1111 FOUR BIT BINARY TO GRAY CODE CONVERTER –DESIGN (1)… 25 TRUTH TABLE: MSB 0 + 1 + 1 + 0 + 1 0 1 0 1 1 Binary code Gray code INPUT ( BINARY) OUTPUTS (GRAY CODE) B3 B2 B1 B0 G3 G2 G1 G0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 1 1 0 0 1 1 0 0 1 0 0 1 0 0 0 1 1 0 0 1 0 1 0 1 1 1 0 1 1 0 0 1 0 1 0 1 1 1 0 1 0 0 1 0 0 0 1 1 0 0 1 0 0 1 1 1 0 1 1 0 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 0 0 1 0 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 0 0 1 1 1 1 1 1 0 0 0
  • 26. DIGITAL SYSTEMS TCE1111 FOUR BIT BINARY TO GRAY CODE CONVERTER –DESIGN (2)… 26 Simplification using K-maps:
  • 27. DIGITAL SYSTEMS TCE1111 27 FOUR BIT BINARY TO GRAY CODE CONVERTER –DESIGN (3) Logic Diagram:
  • 28. DIGITAL SYSTEMS TCE1111 FOUR BIT GRAY CODE TO BINARY CONVERTER –DESIGN (1)… • Truth Table: 28 MSB 1 + 0 + 1 + 0 + 0 1 1 0 0 0 Gray code Binary code INPUT ( GRAY CODE) OUTPUTS (BINARY ) G3 G2 G1 G0 B3 B2 B1 B0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 1 1 0 0 1 1 0 0 1 0 0 1 0 0 0 1 1 1 0 1 0 1 0 1 1 0 0 1 1 0 0 1 0 0 0 1 1 1 0 1 0 1 1 0 0 0 1 1 1 1 1 0 0 1 1 1 1 0 1 0 1 0 1 1 0 0 1 0 1 1 1 1 0 1 1 1 0 0 1 0 0 0 1 1 0 1 1 0 0 1 1 1 1 0 1 0 1 1 1 1 1 1 1 0 1 0
  • 29. DIGITAL SYSTEMS TCE1111 FOUR BIT GRAY CODE TO BINARY CONVERTER –DESIGN (2)… 29 Simplification using K-Maps:
  • 30. DIGITAL SYSTEMS TCE1111 FOUR BIT GRAY CODE TO BINARY CONVERTER –DESIGN (3)… 30 Simplification using K-Maps:
  • 31. DIGITAL SYSTEMS TCE1111 31 FOUR BIT GRAY CODE TO BINARY CONVERTER –DESIGN (4) Logic Diagram:
  • 32. DIGITAL SYSTEMS TCE1111 32 Exercise 1. Convert the binary number 0101 to Gray code with XOR gates 2. Convert the gray code 1011 to binary with XOR gates Solution:
  • 33. DIGITAL SYSTEMS TCE1111 BCD to XS 3 code converter- Design (1)... 33 TRUTH TABLE FOR BCD TO XS3 CODE CONVERTER: Input ( Std BCD code) Output ( XS3 Code) A B C D w x y z 0 0 0 0 0 0 1 1 0 0 0 1 0 1 0 0 0 0 1 0 0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 0 0 1 1 1 0 1 0 1 1 0 0 0 0 1 1 0 1 0 0 1 0 1 1 1 1 0 1 0 1 0 0 0 1 0 1 1 1 0 0 1 1 1 0 0 1 0 1 0 X X X X 1 0 1 1 X X X X 1 1 0 1 X X X X 1 1 1 0 X X X X 1 1 1 1 X X X X
  • 34. DIGITAL SYSTEMS TCE1111 BCD to XS 3 code converter- Design (2)... 34 K-maps for simplification and simplified Boolean expressions
  • 35. DIGITAL SYSTEMS TCE1111 BCD to XS 3 code converter- Design (3)... • After the manipulation of the Boolean expressions for using common gates for two or more outputs, logic expressions can be given by z=D’ y=CD+C’D’ = (C+D)’ x= B’C + B’D + BC’D’ = B’(C+D) + BC’D’ w= A + BC + BD = A + B (C+D) 35
  • 36. DIGITAL SYSTEMS TCE1111 BCD to XS 3 code converter- Design (4) 36