SlideShare a Scribd company logo
Binary Coded Decimal
BCD or Binary Coded Decimal is a number system or code which has the
binary numbers or digits to represent a decimal number.
A decimal number contains 10 digits (0-9). Now the equivalent binary numbers
can be found out of these 10 decimal numbers.
In case of BCD the binary number formed by four binary digits, will be the
equivalent code for the given decimal digits.
In BCD we can use the binary number from 0000-1001 only, which are the
decimal equivalent from 0-9 respectively.
Suppose if a number have single decimal digit then it’s equivalent Binary
Coded Decimal will be the respective four binary digits of that decimal
number and if the number contains two decimal digits then it’s equivalent
BCD will be the respective eight binary of the given decimal number. Four
for the first decimal digit and next four for the second decimal digit.
It may be cleared from an example. Let, (12)10 be the decimal number whose
equivalent Binary coded decimal will be 00010010. Four bits from L.S.B is
binary equivalent of 2 and next four is the binary equivalent of 1.
Decimal number Binary number Binary Coded Decimal(BCD)
0 0000 0000
1 0001 0001
2 0010 0010
3 0011 0011
4 0100 0100
5 0101 0101
6 0110 0110
7 0111 0111
8 1000 1000
9 1001 1001
10 1010 0001 0000
11 1011 0001 0001
12 1100 0001 0010
13 1101 0001 0011
14 1110 0001 0100
15 1111 0001 0101
BCD Addition
• BCD arithmetic operations for the numbers.
• BCD is a numerical code which has several rules for
addition.
• The rules are given below in three steps with an example
to make the idea of BCD Addition clear.
1. At first the given number are to be added using the
rule of binary. For example,
2. In second step we have to judge the result of
addition.
• Here two cases are shown to describe the rules of BCD
Addition.
• In case 1 the result of addition of two binary number is
greater than 9, which is not valid for BCD number. But the
result of addition in case 2 is less than 9, which is valid for
BCD numbers.
• If the result of addition is greater than 9 and if a carry bit is
present in the result then it is invalid and we have to add 6
whose binary equivalent is (0110)2 to the result of addition.
• Then the resultant that we would get will be a valid binary
coded number. In case 1 the result was (1111)2, which is
greater than 9 so we have to add 6 or (0110)2 to it.
• As you can see the result is valid in BCD. But in case 2 the
result was already valid BCD, so there is no need to add 6.
This is how BCD Addition could be.
BCD Subtraction
• There are several methods of BCD Subtraction.
• BCD subtraction can be done by 1’s compliment method and 9’s
compliment method or 10’s compliment method.
• Among all these methods 9’s compliment method or 10’s compliment
method is the most easiest.
• We will clear our idea on both the methods of BCD Subtraction .
Method of BCD Subtraction : 1
• In 1st method we will do BCD Subtraction by 1’s compliment method.
• There are several steps for this method shown below. They are:-
1. At first 1’s compliment of the subtrahend is done.
2. Then the complimented subtrahend is added to the other
number from which the subtraction is to be done. This is called adder 1.
• Now in BCD Subtraction there is a term ‘EAC(end-around-carry)’ .If there is
a carry i.e if EAC=1 the result of the subtraction is +ve and if EAC = 0 then
the result is –ve . A table shown below gives the rules of EAC.
• In the final result if any carry bit occurs the it will be ignored. Examples
given below would make the idea clear of BCD Subtraction.
carry of individual groups EAC = 1 EAC = 0
1
Transfer real result of adder 1
and add 0000 in adder 2
Transfer 1’s compliment result
of adder 1 and add 1010 in
adder 2
0
Transfer real result of adder 1
and add 1010 in adder 2
Transfer 1’s compliment result
of adder 1 and add 0000 to
adder 2
Example: - 1
•In this example 0010 0001 0110 is subtracted from 0101 0100
0001. At first 1’s compliment of the subtrahend is done, which
is 1101 1110 1001 and is added to 0101 0100 0001. This step is
called adder 1.
•Now after addition if any carry occurs then it will be added
to the next group of numbers towards MSB. Then EAC will be
examined. Here, EAC = 1. So the result of addition is positive
and true result of adder 1 will be transferred to adder 2.
•Now notice from LSB. There are three groups of four bit
numbers. 1010 is added 1011 which is the first group of
numbers because it do not have any carry. The result of the
addition is the final answer.
•Carry 1 will be ignored as it is from the rule.
•Now move to the next group of numbers. 0000 is added to
0010 and gives the result 0010. It is the final result again.
•Now again move to the next group here 0000 is also added to
0011 to give the final result 0011.
•You may have noticed that in this two groups 0000 is added,
because result of first adder do not contain any carry. Thus the
results of the adder 2 is the final result of BCD Subtraction.
Method of BCD Subtraction : 2
• In 2nd method we will do BCD subtraction in 9’s compliment method. Here
the method is very simple. At first the decimal equivalent of the given
Binary Coded Decimal codes are found out.
• Then the 9’s compliment of the subtrahend is done and then that result is
added to the number from which the subtraction is to be done.
• If there is any carry bit then the carry bit may be added to the result of the
subtraction.
• Idea may be cleared from an example given below. Let ( 0101 0001) − (0010
0001) be the given subtraction. As we can see 51 and 21 are the decimal
value of the given BCD codes. Then the 9’s compliment of the subtrahend is
done i.e 99 − 21 = 78.
• This complimented value is added with the 51. i.e 51 + 78= 129.
•In this result the MSB i.e 1 is the carry.
This carry will be added to 29. Therefore
29 + 1 = 30, which is the final answer of
BCD Subtraction.
•The decimal result will be changed into
BCD codes to get the result in BCD.
Therefore from the example we can
conclude the final result of BCD
Subtraction i.e (0101 0001)BCD − (0010
0001)BCD = (0011 0000)BCD

More Related Content

What's hot

Lecture 3
Lecture 3Lecture 3
Lecture 3
Chamila Fernando
 
Binary Codes and Number System
Binary Codes and Number SystemBinary Codes and Number System
Binary Codes and Number System
Debarati Das
 
Binary Arithmetic
Binary ArithmeticBinary Arithmetic
Binary Arithmetic
Meenakshi Paul
 
Digital logic mohammed salim ch2
Digital logic mohammed salim ch2Digital logic mohammed salim ch2
Digital logic mohammed salim ch2
Asst Lect Mohammed Salim
 
Number system arithmetic
Number system arithmetic Number system arithmetic
Number system arithmetic
renatus katundu
 
Number system and codes
Number system and codesNumber system and codes
Number system and codes
Abhiraj Bohra
 
binary arithmetic rules
binary arithmetic rulesbinary arithmetic rules
binary arithmetic rules
student
 
Integer Representation
Integer RepresentationInteger Representation
Integer Representationgavhays
 
Representation of Integers
Representation of IntegersRepresentation of Integers
Representation of Integers
Susantha Herath
 
2s complement arithmetic
2s complement arithmetic2s complement arithmetic
2s complement arithmetic
Sanjay Saluth
 
Representation of Real Numbers
Representation of Real NumbersRepresentation of Real Numbers
Representation of Real Numbers
Forrester High School
 
Representation of Negative Numbers
Representation of Negative NumbersRepresentation of Negative Numbers
Representation of Negative Numbers
Forrester High School
 
Chapter 7 rohith
Chapter 7 rohithChapter 7 rohith
Chapter 7 rohith
Rohith Shivashankar
 
Quick tutorial on IEEE 754 FLOATING POINT representation
Quick tutorial on IEEE 754 FLOATING POINT representationQuick tutorial on IEEE 754 FLOATING POINT representation
Quick tutorial on IEEE 754 FLOATING POINT representation
Ritu Ranjan Shrivastwa
 
Floating point representation
Floating point representationFloating point representation
Floating point representation
missstevenson01
 
Introduction to number system
Introduction to number systemIntroduction to number system
Introduction to number system
AswiniT3
 
FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arith...
FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arith...FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arith...
FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arith...
Arti Parab Academics
 
Decimal to binary number
Decimal to binary numberDecimal to binary number
Decimal to binary numberguestd8696a
 

What's hot (20)

Lecture 3
Lecture 3Lecture 3
Lecture 3
 
Binary Codes and Number System
Binary Codes and Number SystemBinary Codes and Number System
Binary Codes and Number System
 
Binary Arithmetic
Binary ArithmeticBinary Arithmetic
Binary Arithmetic
 
Binary arithmetic
Binary arithmeticBinary arithmetic
Binary arithmetic
 
Digital logic mohammed salim ch2
Digital logic mohammed salim ch2Digital logic mohammed salim ch2
Digital logic mohammed salim ch2
 
Number system arithmetic
Number system arithmetic Number system arithmetic
Number system arithmetic
 
Number system and codes
Number system and codesNumber system and codes
Number system and codes
 
binary arithmetic rules
binary arithmetic rulesbinary arithmetic rules
binary arithmetic rules
 
Integer Representation
Integer RepresentationInteger Representation
Integer Representation
 
Representation of Integers
Representation of IntegersRepresentation of Integers
Representation of Integers
 
2s complement arithmetic
2s complement arithmetic2s complement arithmetic
2s complement arithmetic
 
2's complement
2's complement2's complement
2's complement
 
Representation of Real Numbers
Representation of Real NumbersRepresentation of Real Numbers
Representation of Real Numbers
 
Representation of Negative Numbers
Representation of Negative NumbersRepresentation of Negative Numbers
Representation of Negative Numbers
 
Chapter 7 rohith
Chapter 7 rohithChapter 7 rohith
Chapter 7 rohith
 
Quick tutorial on IEEE 754 FLOATING POINT representation
Quick tutorial on IEEE 754 FLOATING POINT representationQuick tutorial on IEEE 754 FLOATING POINT representation
Quick tutorial on IEEE 754 FLOATING POINT representation
 
Floating point representation
Floating point representationFloating point representation
Floating point representation
 
Introduction to number system
Introduction to number systemIntroduction to number system
Introduction to number system
 
FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arith...
FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arith...FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arith...
FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arith...
 
Decimal to binary number
Decimal to binary numberDecimal to binary number
Decimal to binary number
 

Similar to Binary coded decimal r004

Bcd
BcdBcd
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
AmrutaMehata
 
De boolean algebra
De boolean algebraDe boolean algebra
De boolean algebra
VinodKataria5
 
DLD_PPT_0.pptx
DLD_PPT_0.pptxDLD_PPT_0.pptx
DLD_PPT_0.pptx
ECENAAC2
 
IARE_DLD_PPT_0.pdf
IARE_DLD_PPT_0.pdfIARE_DLD_PPT_0.pdf
IARE_DLD_PPT_0.pdf
nirbhay singh
 
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
shubhangisonawane6
 
Introduction of number system
Introduction of number systemIntroduction of number system
Introduction of number system
AswiniT3
 
ch2.pdf
ch2.pdfch2.pdf
Number codes students
Number codes studentsNumber codes students
What is bcd number system
What is bcd number systemWhat is bcd number system
What is bcd number system
Muhammad Shahid
 
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
AbijahRoseline1
 
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
MOHDZAMRIBINIBRAHIM1
 
B sc3 unit 2 number system
B sc3  unit 2 number systemB sc3  unit 2 number system
B sc3 unit 2 number system
MahiboobAliMulla
 
B sc ii sem unit 2(a) ns
B sc ii sem  unit 2(a) nsB sc ii sem  unit 2(a) ns
B sc ii sem unit 2(a) ns
MahiboobAliMulla
 
Number system in Digital Electronics
Number system in Digital ElectronicsNumber system in Digital Electronics
Number system in Digital Electronics
Janki Shah
 
Number codes
Number codesNumber codes
uyuyuy.pdf
uyuyuy.pdfuyuyuy.pdf
uyuyuy.pdf
MariaJoseph591921
 
Unit-1 (DLD) Lecture 2.pptx
Unit-1 (DLD) Lecture 2.pptxUnit-1 (DLD) Lecture 2.pptx
Unit-1 (DLD) Lecture 2.pptx
BunnyYadav7
 
Chapter 2_Number system (EEEg4302).pdf
Chapter 2_Number system (EEEg4302).pdfChapter 2_Number system (EEEg4302).pdf
Chapter 2_Number system (EEEg4302).pdf
TamiratDejene1
 
3.Fixed-Floating Point.ppt
3.Fixed-Floating Point.ppt3.Fixed-Floating Point.ppt
3.Fixed-Floating Point.ppt
RavikumarR77
 

Similar to Binary coded decimal r004 (20)

Bcd
BcdBcd
Bcd
 
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
 
De boolean algebra
De boolean algebraDe boolean algebra
De boolean algebra
 
DLD_PPT_0.pptx
DLD_PPT_0.pptxDLD_PPT_0.pptx
DLD_PPT_0.pptx
 
IARE_DLD_PPT_0.pdf
IARE_DLD_PPT_0.pdfIARE_DLD_PPT_0.pdf
IARE_DLD_PPT_0.pdf
 
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
 
Introduction of number system
Introduction of number systemIntroduction of number system
Introduction of number system
 
ch2.pdf
ch2.pdfch2.pdf
ch2.pdf
 
Number codes students
Number codes studentsNumber codes students
Number codes students
 
What is bcd number system
What is bcd number systemWhat is bcd number system
What is bcd number system
 
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
 
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
 
B sc3 unit 2 number system
B sc3  unit 2 number systemB sc3  unit 2 number system
B sc3 unit 2 number system
 
B sc ii sem unit 2(a) ns
B sc ii sem  unit 2(a) nsB sc ii sem  unit 2(a) ns
B sc ii sem unit 2(a) ns
 
Number system in Digital Electronics
Number system in Digital ElectronicsNumber system in Digital Electronics
Number system in Digital Electronics
 
Number codes
Number codesNumber codes
Number codes
 
uyuyuy.pdf
uyuyuy.pdfuyuyuy.pdf
uyuyuy.pdf
 
Unit-1 (DLD) Lecture 2.pptx
Unit-1 (DLD) Lecture 2.pptxUnit-1 (DLD) Lecture 2.pptx
Unit-1 (DLD) Lecture 2.pptx
 
Chapter 2_Number system (EEEg4302).pdf
Chapter 2_Number system (EEEg4302).pdfChapter 2_Number system (EEEg4302).pdf
Chapter 2_Number system (EEEg4302).pdf
 
3.Fixed-Floating Point.ppt
3.Fixed-Floating Point.ppt3.Fixed-Floating Point.ppt
3.Fixed-Floating Point.ppt
 

More from arunachalamr16

Pipeline r014
Pipeline   r014Pipeline   r014
Pipeline r014
arunachalamr16
 
Registers r011
Registers   r011Registers   r011
Registers r011
arunachalamr16
 
08 logic simplification
08 logic simplification08 logic simplification
08 logic simplification
arunachalamr16
 
Boolean algebra r009
Boolean algebra   r009Boolean algebra   r009
Boolean algebra r009
arunachalamr16
 
Boolean variables r010
Boolean variables   r010Boolean variables   r010
Boolean variables r010
arunachalamr16
 
Central processing unit and stack organization r013
Central processing unit and stack organization   r013Central processing unit and stack organization   r013
Central processing unit and stack organization r013
arunachalamr16
 
Combinational circuits r011
Combinational circuits   r011Combinational circuits   r011
Combinational circuits r011
arunachalamr16
 
Counters r012
Counters  r012Counters  r012
Counters r012
arunachalamr16
 
Flipflop r012
Flipflop   r012Flipflop   r012
Flipflop r012
arunachalamr16
 
Universal gates r008
Universal gates   r008Universal gates   r008
Universal gates r008
arunachalamr16
 
Logic gates r007
Logic gates   r007Logic gates   r007
Logic gates r007
arunachalamr16
 
18 pc09 1.2_ digital logic gates _ boolean algebra_basic theorems
18 pc09 1.2_ digital logic gates _ boolean algebra_basic theorems18 pc09 1.2_ digital logic gates _ boolean algebra_basic theorems
18 pc09 1.2_ digital logic gates _ boolean algebra_basic theorems
arunachalamr16
 
Error detection and correction codes r006
Error detection and correction codes   r006Error detection and correction codes   r006
Error detection and correction codes r006
arunachalamr16
 
Pill camera
Pill cameraPill camera
Pill camera
arunachalamr16
 

More from arunachalamr16 (14)

Pipeline r014
Pipeline   r014Pipeline   r014
Pipeline r014
 
Registers r011
Registers   r011Registers   r011
Registers r011
 
08 logic simplification
08 logic simplification08 logic simplification
08 logic simplification
 
Boolean algebra r009
Boolean algebra   r009Boolean algebra   r009
Boolean algebra r009
 
Boolean variables r010
Boolean variables   r010Boolean variables   r010
Boolean variables r010
 
Central processing unit and stack organization r013
Central processing unit and stack organization   r013Central processing unit and stack organization   r013
Central processing unit and stack organization r013
 
Combinational circuits r011
Combinational circuits   r011Combinational circuits   r011
Combinational circuits r011
 
Counters r012
Counters  r012Counters  r012
Counters r012
 
Flipflop r012
Flipflop   r012Flipflop   r012
Flipflop r012
 
Universal gates r008
Universal gates   r008Universal gates   r008
Universal gates r008
 
Logic gates r007
Logic gates   r007Logic gates   r007
Logic gates r007
 
18 pc09 1.2_ digital logic gates _ boolean algebra_basic theorems
18 pc09 1.2_ digital logic gates _ boolean algebra_basic theorems18 pc09 1.2_ digital logic gates _ boolean algebra_basic theorems
18 pc09 1.2_ digital logic gates _ boolean algebra_basic theorems
 
Error detection and correction codes r006
Error detection and correction codes   r006Error detection and correction codes   r006
Error detection and correction codes r006
 
Pill camera
Pill cameraPill camera
Pill camera
 

Recently uploaded

678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
CarlosHernanMontoyab2
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 

Recently uploaded (20)

678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 

Binary coded decimal r004

  • 2. BCD or Binary Coded Decimal is a number system or code which has the binary numbers or digits to represent a decimal number. A decimal number contains 10 digits (0-9). Now the equivalent binary numbers can be found out of these 10 decimal numbers. In case of BCD the binary number formed by four binary digits, will be the equivalent code for the given decimal digits. In BCD we can use the binary number from 0000-1001 only, which are the decimal equivalent from 0-9 respectively. Suppose if a number have single decimal digit then it’s equivalent Binary Coded Decimal will be the respective four binary digits of that decimal number and if the number contains two decimal digits then it’s equivalent BCD will be the respective eight binary of the given decimal number. Four for the first decimal digit and next four for the second decimal digit.
  • 3. It may be cleared from an example. Let, (12)10 be the decimal number whose equivalent Binary coded decimal will be 00010010. Four bits from L.S.B is binary equivalent of 2 and next four is the binary equivalent of 1. Decimal number Binary number Binary Coded Decimal(BCD) 0 0000 0000 1 0001 0001 2 0010 0010 3 0011 0011 4 0100 0100 5 0101 0101 6 0110 0110 7 0111 0111 8 1000 1000 9 1001 1001 10 1010 0001 0000 11 1011 0001 0001 12 1100 0001 0010 13 1101 0001 0011 14 1110 0001 0100 15 1111 0001 0101
  • 4. BCD Addition • BCD arithmetic operations for the numbers. • BCD is a numerical code which has several rules for addition. • The rules are given below in three steps with an example to make the idea of BCD Addition clear. 1. At first the given number are to be added using the rule of binary. For example, 2. In second step we have to judge the result of addition. • Here two cases are shown to describe the rules of BCD Addition. • In case 1 the result of addition of two binary number is greater than 9, which is not valid for BCD number. But the result of addition in case 2 is less than 9, which is valid for BCD numbers.
  • 5. • If the result of addition is greater than 9 and if a carry bit is present in the result then it is invalid and we have to add 6 whose binary equivalent is (0110)2 to the result of addition. • Then the resultant that we would get will be a valid binary coded number. In case 1 the result was (1111)2, which is greater than 9 so we have to add 6 or (0110)2 to it. • As you can see the result is valid in BCD. But in case 2 the result was already valid BCD, so there is no need to add 6. This is how BCD Addition could be.
  • 6. BCD Subtraction • There are several methods of BCD Subtraction. • BCD subtraction can be done by 1’s compliment method and 9’s compliment method or 10’s compliment method. • Among all these methods 9’s compliment method or 10’s compliment method is the most easiest. • We will clear our idea on both the methods of BCD Subtraction . Method of BCD Subtraction : 1 • In 1st method we will do BCD Subtraction by 1’s compliment method. • There are several steps for this method shown below. They are:- 1. At first 1’s compliment of the subtrahend is done. 2. Then the complimented subtrahend is added to the other number from which the subtraction is to be done. This is called adder 1.
  • 7. • Now in BCD Subtraction there is a term ‘EAC(end-around-carry)’ .If there is a carry i.e if EAC=1 the result of the subtraction is +ve and if EAC = 0 then the result is –ve . A table shown below gives the rules of EAC. • In the final result if any carry bit occurs the it will be ignored. Examples given below would make the idea clear of BCD Subtraction. carry of individual groups EAC = 1 EAC = 0 1 Transfer real result of adder 1 and add 0000 in adder 2 Transfer 1’s compliment result of adder 1 and add 1010 in adder 2 0 Transfer real result of adder 1 and add 1010 in adder 2 Transfer 1’s compliment result of adder 1 and add 0000 to adder 2
  • 8. Example: - 1 •In this example 0010 0001 0110 is subtracted from 0101 0100 0001. At first 1’s compliment of the subtrahend is done, which is 1101 1110 1001 and is added to 0101 0100 0001. This step is called adder 1. •Now after addition if any carry occurs then it will be added to the next group of numbers towards MSB. Then EAC will be examined. Here, EAC = 1. So the result of addition is positive and true result of adder 1 will be transferred to adder 2. •Now notice from LSB. There are three groups of four bit numbers. 1010 is added 1011 which is the first group of numbers because it do not have any carry. The result of the addition is the final answer. •Carry 1 will be ignored as it is from the rule. •Now move to the next group of numbers. 0000 is added to 0010 and gives the result 0010. It is the final result again. •Now again move to the next group here 0000 is also added to 0011 to give the final result 0011. •You may have noticed that in this two groups 0000 is added, because result of first adder do not contain any carry. Thus the results of the adder 2 is the final result of BCD Subtraction.
  • 9. Method of BCD Subtraction : 2 • In 2nd method we will do BCD subtraction in 9’s compliment method. Here the method is very simple. At first the decimal equivalent of the given Binary Coded Decimal codes are found out. • Then the 9’s compliment of the subtrahend is done and then that result is added to the number from which the subtraction is to be done. • If there is any carry bit then the carry bit may be added to the result of the subtraction. • Idea may be cleared from an example given below. Let ( 0101 0001) − (0010 0001) be the given subtraction. As we can see 51 and 21 are the decimal value of the given BCD codes. Then the 9’s compliment of the subtrahend is done i.e 99 − 21 = 78. • This complimented value is added with the 51. i.e 51 + 78= 129.
  • 10. •In this result the MSB i.e 1 is the carry. This carry will be added to 29. Therefore 29 + 1 = 30, which is the final answer of BCD Subtraction. •The decimal result will be changed into BCD codes to get the result in BCD. Therefore from the example we can conclude the final result of BCD Subtraction i.e (0101 0001)BCD − (0010 0001)BCD = (0011 0000)BCD