SlideShare a Scribd company logo
1 of 31
Presentation Of Digital Logic Designed
Topic Of Presentation:
Code Converters & Parity Checker
Mansoor Bashir
Code Converters:
 Code is a symbolic representation of discrete information.
 A converter that changes coded information to a different
code system is called code converter.
 Numbers are usually coded in one form or another so as to
represent or use it as required. For instance, a number ‘nine’
is coded in decimal using symbol (9)d. Same is coded in
natural-binary as (1001)b.
 While digital computers all deal with binary numbers, there
are situations where in natural-binary representation of
numbers in in-convenient or in-efficient and some other
(binary) code must be used to process the numbers.
Code converters are also used to enhance data portability and tractability.
Portability means the information can be transported from location to location, such
as from your house to your friend’s house.
Tractability means the information can be easily managed, stored, used, etc.
For instance, if you have a comprehensive encyclopedia in paper book form at
home, and I have the same comprehensive encyclopedia in electronic book form on
a thumb drive; not only can I carry mine in my pocket whereas you cannot even lift
yours off the table, I can also do a word search more quickly than you can. Hence,
my encyclopedia is more tractable than yours.
Let’s discuss the conversion of various codes from
one form to other.
 Gray code to binary conversion
 Binary to gray code conversion
 DECIMAL TO BCD CODE CONVERTER
 BCD TO EXCESS-3 CODE CONVERTER
Binary To Gray Code conversion:
Binary to gray code conversion is a very simple process. There are several
steps to do this types of conversions. Steps given below elaborate on the idea
on this type of conversion.
(1) The M.S.B. of the gray code will be exactly equal to the first bit of the
given binary number.
(2) Now the second bit of the code will be exclusive-or of the first and second
bit of the given binary number, i.e if both the bits are same the result will be 0
and if they are different the result will be 1.
(3)The third bit of gray code will be equal to the exclusive-or of the second
and third bit of the given binary number. Thus the Binary to gray code
conversion goes on. One example given below can make your idea clear on
this type of conversion.
Explanation:
Thus the equivalent gray code is 01101. Now
concentrate on the example where the M.S.B. of
the binary is 0 so for it will be 0 for the most
significant gray bit. Next, the XOR of the first
and the second bit is done. The bits are different
so the resultant gray bit will be 1. Again move to
the next step, XOR of second and third bit is
again 1 as they are different. Next, XOR of third
and fourth bit is 0 as both the bits are same.
Lastly the XOR of fourth and fifth bit is 1 as they
are different. That is how the result of binary to
gray code conversion of 01001 is done whose
equivalent gray code is 01101.
Gray code to binary conversion :
Gray code to binary conversion is again very simple and easy process. Following
steps can make your idea clear on this type of conversions.
(1) The M.S.B of the binary number will be equal to the M.S.B of the given gray
code.
(2) Now if the second gray bit is 0 the second binary bit will be same as the
previous or the first bit. If the gray bit is 1 the second binary bit will alter. If it
was 1 it will be 0 and if it was 0 it will be 1.
(3) This step is continued for all the bits to do Gray code to binary conversion.
One example given below will make your idea clear.
Explanation:
The M.S.B of the binary will be 0 as the M.S.B of gray is 0.
Now move to the next gray bit. As it is 1 the previous binary bit will alter
i.e. it will be 1, thus the second binary bit will be 1. Next look at the third
bit of the gray code. It is again 1 thus the previous bit i.e. the second binary
bit will again alter and the third bit of the binary number will be 0. Now, 4th
bit of the given gray is 0 so the previous binary bit will be unchanged, i.e.
4th binary bit will be 0. Now again the 5th grey bit is 1 thus the previous
binary bit will alter, it will be 1 from 0. Therefore the equivalent Binary
number in case of gray code to binary conversion will be (01001)
DECIMAL TO BCD CODE CONVERTER
BCD TO EXCESS-3 CODE CONVERTER
DECIMAL TO BCD CODE CONVERTER Decimal
Numerals
Binary
Numerals
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
The BCD Code
Binary Coded Decimal (BCD)
code is used to represent decimal
digits in binary. BCD
code is a 4-bit binary code the
first 10 combinations represent
the decimal digits 0 to 9.
DECIMAL TO BCD CODE CONVERTER
The remaining six 4 bit
(Figure 1)combinations 1010, 1011, 1100,
1101, 1110 and 1111 are considered to be
invalid and do not exist.
Binary Numerals Excess-3
0000 0011
0001 0100
0010 0101
0011 0110
0100 0111
0101 1000
0110 1001
0111 1010
1000 1011
1001 1100
The Excess-3 BCD system is
formed by adding 0011 (3) to each
BCD value as in Table . For
example, the decimal number 7,
which is coded as 0111 in BCD, is
coded as 0111+0011=1010 in
Excess-3 BCD.
BCD TO EXCESS-3 CODE
CONVERTER
BCD Excess-3
In the Excess-3 BCD system, all
pair of numbers that add up to 9
add up to 1111:
0 + 9 = 0011 + 1100 = 1111
1 + 8 = 0100 + 1011 = 1111
2 + 7 = 0101 + 1010 = 1111
BCD TO EXCESS-3 CODE CONVERTER
Bit values may change from 1 to 0 or 0 to 1
due to noise.
An extra bit called parity bit is send with
message to make the total number of 1’s
either odd or even.
Application:
 Error detection and correction.
Even & Odd Parity
Even Parity:
In even parity bit scheme, the parity bit is ‘0’ if there
are even number of 1s in the data stream and the parity bit
is ‘1’ if there are odd number of 1s in the data stream.
Odd Parity:
In odd parity bit scheme, the parity bit is ‘1’ if there
are even number of 1s in the data stream and the
parity bit is ‘0’ if there are odd number of 1s in the
data stream
01001001 0 1
Message Odd Parity Even Parity
01010101 0 1
Message Even Parity Odd Parity
Parity generator:
the circuit that generates the parity bit before
transmitting.
Even Parity Generator
Let us assume that a 3-bit message is to
be transmitted with an even parity bit.
Let the three inputs A, B and C are
applied to the circuits and output bit is
the parity bit P. The total number of 1s
must be even, to generate the even
parity bit P.
The figure below shows the truth table
of even parity generator in which 1 is
placed as parity bit in order to make all
1s as even when the number of 1s in
the truth table is odd.
The above expression can be
implemented by using two Ex-OR
gates. The logic diagram of even
parity generator with two Ex – OR
gates is shown below. The three bit
message along with the parity
generated by this circuit which is
transmitted to the receiving end
where parity checker circuit checks
whether any error is present or not.
To generate the even parity bit for a
4-bit data, three Ex-OR gates are
required to add the 4-bits and their
sum will be the parity bit.
Odd Parity Generator
Let us consider that the 3-bit data is
to be transmitted with an odd parity
bit. The three inputs are A, B and C
and P is the output parity bit. The
total number of bits must be odd in
order to generate the odd parity bit.
In the given truth table below, 1 is
placed in the parity bit in order to
make the total number of bits odd
when the total number of 1s in the
truth table is even.
The above Boolean expression can be
implemented by using one Ex-OR gate
and one Ex-NOR gate in order to
design a 3-bit odd parity generator.
The logic circuit of this generator is
shown in below figure , in which . two
inputs are applied at one Ex-OR gate,
and this Ex-OR output and third input
is applied to the Ex-NOR gate , to
produce the odd parity bit. It is also
possible to design this circuit by using
two Ex-OR gates and one NOT gate.
Parity checker:
The circuit that checks the
parity in the receiver.
Even Parity Checker
Consider that three input message along
with even parity bit is generated at the
transmitting end. These 4 bits are applied
as input to the parity checker circuit which
checks the possibility of error on the data.
Since the data is transmitted with even
parity, four bits received at circuit must
have an even number of 1s.
If any error occurs, the received message
consists of odd number of 1s.
The above logic expression for
the even parity checker can
be implemented by using
three Ex-OR gates as shown in
figure. If the received
message consists of five bits,
then one more Ex-OR gate is
required for the even parity
checking.
Odd Parity Checker
Consider that a three bit message along
with odd parity bit is transmitted at the
transmitting end. Odd parity checker
circuit receives these 4 bits and checks
whether any error are present in the
data.
If the total number of 1s in the data is
odd, then it indicates no error, whereas if
the total number of 1s is even then it
indicates the error since the data is
transmitted with odd parity at
transmitting end.
The expression for the odd
parity checker can be designed
by using three Ex-NOR gates as
shown below.
ANY QUESTIONS ?
MANY THANKS
FOR YOUR
ATTENTION

More Related Content

What's hot (20)

Parity generator & checker
Parity generator & checkerParity generator & checker
Parity generator & checker
 
Encoder
EncoderEncoder
Encoder
 
Code conversion
Code conversionCode conversion
Code conversion
 
(D/A) and (A/D)conversion
(D/A) and (A/D)conversion(D/A) and (A/D)conversion
(D/A) and (A/D)conversion
 
BCD,GRAY and EXCESS 3 codes
BCD,GRAY and EXCESS 3 codesBCD,GRAY and EXCESS 3 codes
BCD,GRAY and EXCESS 3 codes
 
Binary codes
Binary codesBinary codes
Binary codes
 
Encoders
EncodersEncoders
Encoders
 
Dlc{binary to gray code conversion} ppt
Dlc{binary to gray code conversion} pptDlc{binary to gray code conversion} ppt
Dlc{binary to gray code conversion} ppt
 
Decoders
DecodersDecoders
Decoders
 
Bcd
BcdBcd
Bcd
 
Decoders-Digital Electronics
Decoders-Digital ElectronicsDecoders-Digital Electronics
Decoders-Digital Electronics
 
Presentation on JFET
Presentation on JFETPresentation on JFET
Presentation on JFET
 
Combinational circuits
Combinational circuits Combinational circuits
Combinational circuits
 
13 Boolean Algebra
13 Boolean Algebra13 Boolean Algebra
13 Boolean Algebra
 
Decoders
DecodersDecoders
Decoders
 
Registers and counters
Registers and counters Registers and counters
Registers and counters
 
Registers
RegistersRegisters
Registers
 
Decoder Full Presentation
Decoder Full Presentation Decoder Full Presentation
Decoder Full Presentation
 
What is a decoder and 2 to 4 DECODER
What is a decoder and 2 to 4 DECODERWhat is a decoder and 2 to 4 DECODER
What is a decoder and 2 to 4 DECODER
 
Encoders and decoders
Encoders and decodersEncoders and decoders
Encoders and decoders
 

Similar to Code Converters & Parity Checker

review of number systems and codes
review of number systems and codesreview of number systems and codes
review of number systems and codessrinu247
 
Introduction of number system
Introduction of number systemIntroduction of number system
Introduction of number systemAswiniT3
 
Introduction to number system
Introduction to number systemIntroduction to number system
Introduction to number systemAswiniT3
 
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
 
Manoch1raw 160512091436
Manoch1raw 160512091436Manoch1raw 160512091436
Manoch1raw 160512091436marangburu42
 
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
 
Error detection and correction codes
Error detection and correction codesError detection and correction codes
Error detection and correction codesGargiKhanna1
 
04 chapter03 02_numbers_systems_student_version_fa16
04 chapter03 02_numbers_systems_student_version_fa1604 chapter03 02_numbers_systems_student_version_fa16
04 chapter03 02_numbers_systems_student_version_fa16John Todora
 
Code conversions.pptx415.pptx
Code conversions.pptx415.pptxCode conversions.pptx415.pptx
Code conversions.pptx415.pptxMariaJoseph591921
 
Data representation
Data representationData representation
Data representationManish Kumar
 
Digital Logic BCA TU Chapter 2.2
Digital Logic BCA TU Chapter 2.2Digital Logic BCA TU Chapter 2.2
Digital Logic BCA TU Chapter 2.2ISMT College
 
5_2019_01_03!03_33_00_PM.pptx
5_2019_01_03!03_33_00_PM.pptx5_2019_01_03!03_33_00_PM.pptx
5_2019_01_03!03_33_00_PM.pptxAbijahRoseline1
 
Lecture_Computer_Codes.ppt
Lecture_Computer_Codes.pptLecture_Computer_Codes.ppt
Lecture_Computer_Codes.pptMarlonMagtibay2
 

Similar to Code Converters & Parity Checker (20)

review of number systems and codes
review of number systems and codesreview of number systems and codes
review of number systems and codes
 
Introduction of number system
Introduction of number systemIntroduction of number system
Introduction of number system
 
Introduction to number system
Introduction to number systemIntroduction to number system
Introduction to number system
 
Bcd with access 3
Bcd with access 3Bcd with access 3
Bcd with access 3
 
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
 
crc_checksum.pdf
crc_checksum.pdfcrc_checksum.pdf
crc_checksum.pdf
 
9123497.ppt
9123497.ppt9123497.ppt
9123497.ppt
 
Binary codes
Binary codesBinary codes
Binary codes
 
binarycodes.pdf
binarycodes.pdfbinarycodes.pdf
binarycodes.pdf
 
Manoch1raw 160512091436
Manoch1raw 160512091436Manoch1raw 160512091436
Manoch1raw 160512091436
 
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...
 
Error detection and correction codes
Error detection and correction codesError detection and correction codes
Error detection and correction codes
 
04 chapter03 02_numbers_systems_student_version_fa16
04 chapter03 02_numbers_systems_student_version_fa1604 chapter03 02_numbers_systems_student_version_fa16
04 chapter03 02_numbers_systems_student_version_fa16
 
Code conversions.pptx415.pptx
Code conversions.pptx415.pptxCode conversions.pptx415.pptx
Code conversions.pptx415.pptx
 
Data representation
Data representationData representation
Data representation
 
1.1.1 BINARY SYSTEM
1.1.1 BINARY SYSTEM1.1.1 BINARY SYSTEM
1.1.1 BINARY SYSTEM
 
Digital electronics
Digital electronicsDigital electronics
Digital electronics
 
Digital Logic BCA TU Chapter 2.2
Digital Logic BCA TU Chapter 2.2Digital Logic BCA TU Chapter 2.2
Digital Logic BCA TU Chapter 2.2
 
5_2019_01_03!03_33_00_PM.pptx
5_2019_01_03!03_33_00_PM.pptx5_2019_01_03!03_33_00_PM.pptx
5_2019_01_03!03_33_00_PM.pptx
 
Lecture_Computer_Codes.ppt
Lecture_Computer_Codes.pptLecture_Computer_Codes.ppt
Lecture_Computer_Codes.ppt
 

More from .AIR UNIVERSITY ISLAMABAD

More from .AIR UNIVERSITY ISLAMABAD (6)

Risk Assessment
Risk AssessmentRisk Assessment
Risk Assessment
 
Dining philosopher
Dining philosopherDining philosopher
Dining philosopher
 
Mission ,Vision statement, and strategies of Unicef
Mission ,Vision statement, and strategies of UnicefMission ,Vision statement, and strategies of Unicef
Mission ,Vision statement, and strategies of Unicef
 
Pipelining & All Hazards Solution
Pipelining  & All Hazards SolutionPipelining  & All Hazards Solution
Pipelining & All Hazards Solution
 
Project Management System
Project Management SystemProject Management System
Project Management System
 
Interfacing With High Level Programming Language
Interfacing With High Level Programming Language Interfacing With High Level Programming Language
Interfacing With High Level Programming Language
 

Recently uploaded

APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
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
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZTE
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
 
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
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and usesDevarapalliHaritha
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 

Recently uploaded (20)

★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
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
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
 
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
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and uses
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
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
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 

Code Converters & Parity Checker

  • 1.
  • 2. Presentation Of Digital Logic Designed Topic Of Presentation: Code Converters & Parity Checker
  • 4. Code Converters:  Code is a symbolic representation of discrete information.  A converter that changes coded information to a different code system is called code converter.  Numbers are usually coded in one form or another so as to represent or use it as required. For instance, a number ‘nine’ is coded in decimal using symbol (9)d. Same is coded in natural-binary as (1001)b.  While digital computers all deal with binary numbers, there are situations where in natural-binary representation of numbers in in-convenient or in-efficient and some other (binary) code must be used to process the numbers.
  • 5. Code converters are also used to enhance data portability and tractability. Portability means the information can be transported from location to location, such as from your house to your friend’s house. Tractability means the information can be easily managed, stored, used, etc. For instance, if you have a comprehensive encyclopedia in paper book form at home, and I have the same comprehensive encyclopedia in electronic book form on a thumb drive; not only can I carry mine in my pocket whereas you cannot even lift yours off the table, I can also do a word search more quickly than you can. Hence, my encyclopedia is more tractable than yours.
  • 6. Let’s discuss the conversion of various codes from one form to other.  Gray code to binary conversion  Binary to gray code conversion  DECIMAL TO BCD CODE CONVERTER  BCD TO EXCESS-3 CODE CONVERTER
  • 7. Binary To Gray Code conversion: Binary to gray code conversion is a very simple process. There are several steps to do this types of conversions. Steps given below elaborate on the idea on this type of conversion. (1) The M.S.B. of the gray code will be exactly equal to the first bit of the given binary number. (2) Now the second bit of the code will be exclusive-or of the first and second bit of the given binary number, i.e if both the bits are same the result will be 0 and if they are different the result will be 1. (3)The third bit of gray code will be equal to the exclusive-or of the second and third bit of the given binary number. Thus the Binary to gray code conversion goes on. One example given below can make your idea clear on this type of conversion.
  • 8. Explanation: Thus the equivalent gray code is 01101. Now concentrate on the example where the M.S.B. of the binary is 0 so for it will be 0 for the most significant gray bit. Next, the XOR of the first and the second bit is done. The bits are different so the resultant gray bit will be 1. Again move to the next step, XOR of second and third bit is again 1 as they are different. Next, XOR of third and fourth bit is 0 as both the bits are same. Lastly the XOR of fourth and fifth bit is 1 as they are different. That is how the result of binary to gray code conversion of 01001 is done whose equivalent gray code is 01101.
  • 9. Gray code to binary conversion : Gray code to binary conversion is again very simple and easy process. Following steps can make your idea clear on this type of conversions. (1) The M.S.B of the binary number will be equal to the M.S.B of the given gray code. (2) Now if the second gray bit is 0 the second binary bit will be same as the previous or the first bit. If the gray bit is 1 the second binary bit will alter. If it was 1 it will be 0 and if it was 0 it will be 1. (3) This step is continued for all the bits to do Gray code to binary conversion. One example given below will make your idea clear.
  • 10. Explanation: The M.S.B of the binary will be 0 as the M.S.B of gray is 0. Now move to the next gray bit. As it is 1 the previous binary bit will alter i.e. it will be 1, thus the second binary bit will be 1. Next look at the third bit of the gray code. It is again 1 thus the previous bit i.e. the second binary bit will again alter and the third bit of the binary number will be 0. Now, 4th bit of the given gray is 0 so the previous binary bit will be unchanged, i.e. 4th binary bit will be 0. Now again the 5th grey bit is 1 thus the previous binary bit will alter, it will be 1 from 0. Therefore the equivalent Binary number in case of gray code to binary conversion will be (01001)
  • 11. DECIMAL TO BCD CODE CONVERTER BCD TO EXCESS-3 CODE CONVERTER
  • 12. DECIMAL TO BCD CODE CONVERTER Decimal Numerals Binary Numerals 0 0000 1 0001 2 0010 3 0011 4 0100 5 0101 6 0110 7 0111 8 1000 9 1001 The BCD Code Binary Coded Decimal (BCD) code is used to represent decimal digits in binary. BCD code is a 4-bit binary code the first 10 combinations represent the decimal digits 0 to 9.
  • 13. DECIMAL TO BCD CODE CONVERTER The remaining six 4 bit (Figure 1)combinations 1010, 1011, 1100, 1101, 1110 and 1111 are considered to be invalid and do not exist.
  • 14. Binary Numerals Excess-3 0000 0011 0001 0100 0010 0101 0011 0110 0100 0111 0101 1000 0110 1001 0111 1010 1000 1011 1001 1100 The Excess-3 BCD system is formed by adding 0011 (3) to each BCD value as in Table . For example, the decimal number 7, which is coded as 0111 in BCD, is coded as 0111+0011=1010 in Excess-3 BCD. BCD TO EXCESS-3 CODE CONVERTER BCD Excess-3
  • 15. In the Excess-3 BCD system, all pair of numbers that add up to 9 add up to 1111: 0 + 9 = 0011 + 1100 = 1111 1 + 8 = 0100 + 1011 = 1111 2 + 7 = 0101 + 1010 = 1111 BCD TO EXCESS-3 CODE CONVERTER
  • 16.
  • 17. Bit values may change from 1 to 0 or 0 to 1 due to noise. An extra bit called parity bit is send with message to make the total number of 1’s either odd or even. Application:  Error detection and correction.
  • 18. Even & Odd Parity Even Parity: In even parity bit scheme, the parity bit is ‘0’ if there are even number of 1s in the data stream and the parity bit is ‘1’ if there are odd number of 1s in the data stream. Odd Parity: In odd parity bit scheme, the parity bit is ‘1’ if there are even number of 1s in the data stream and the parity bit is ‘0’ if there are odd number of 1s in the data stream
  • 19. 01001001 0 1 Message Odd Parity Even Parity 01010101 0 1 Message Even Parity Odd Parity
  • 20. Parity generator: the circuit that generates the parity bit before transmitting.
  • 21. Even Parity Generator Let us assume that a 3-bit message is to be transmitted with an even parity bit. Let the three inputs A, B and C are applied to the circuits and output bit is the parity bit P. The total number of 1s must be even, to generate the even parity bit P. The figure below shows the truth table of even parity generator in which 1 is placed as parity bit in order to make all 1s as even when the number of 1s in the truth table is odd.
  • 22. The above expression can be implemented by using two Ex-OR gates. The logic diagram of even parity generator with two Ex – OR gates is shown below. The three bit message along with the parity generated by this circuit which is transmitted to the receiving end where parity checker circuit checks whether any error is present or not. To generate the even parity bit for a 4-bit data, three Ex-OR gates are required to add the 4-bits and their sum will be the parity bit.
  • 23. Odd Parity Generator Let us consider that the 3-bit data is to be transmitted with an odd parity bit. The three inputs are A, B and C and P is the output parity bit. The total number of bits must be odd in order to generate the odd parity bit. In the given truth table below, 1 is placed in the parity bit in order to make the total number of bits odd when the total number of 1s in the truth table is even.
  • 24. The above Boolean expression can be implemented by using one Ex-OR gate and one Ex-NOR gate in order to design a 3-bit odd parity generator. The logic circuit of this generator is shown in below figure , in which . two inputs are applied at one Ex-OR gate, and this Ex-OR output and third input is applied to the Ex-NOR gate , to produce the odd parity bit. It is also possible to design this circuit by using two Ex-OR gates and one NOT gate.
  • 25. Parity checker: The circuit that checks the parity in the receiver.
  • 26. Even Parity Checker Consider that three input message along with even parity bit is generated at the transmitting end. These 4 bits are applied as input to the parity checker circuit which checks the possibility of error on the data. Since the data is transmitted with even parity, four bits received at circuit must have an even number of 1s. If any error occurs, the received message consists of odd number of 1s.
  • 27. The above logic expression for the even parity checker can be implemented by using three Ex-OR gates as shown in figure. If the received message consists of five bits, then one more Ex-OR gate is required for the even parity checking.
  • 28. Odd Parity Checker Consider that a three bit message along with odd parity bit is transmitted at the transmitting end. Odd parity checker circuit receives these 4 bits and checks whether any error are present in the data. If the total number of 1s in the data is odd, then it indicates no error, whereas if the total number of 1s is even then it indicates the error since the data is transmitted with odd parity at transmitting end.
  • 29. The expression for the odd parity checker can be designed by using three Ex-NOR gates as shown below.