- Code Translator
- Bcd To Xs3 Code Converter For Smartphones
- Code Converter For Smart Tv
- Binary Converter
- Bcd To Xs3 Code Converter For Smartphone
Design an excess-3 code to BCD converter We know that, excess-3 code begins with the binary 0011(decimal 3) and it will continue up to binary 1100(decimal 12) where I get the output binary 1001(decimal 9) for input binary 1100(decimal 12). Step 1-- Convert the BCD number to decimal. Step 2-- Convert decimal to binary. Example − convert (00101001) BCD to Binary. Step 1 - Convert to BCD. BCD Number − (00101001) BCD. Calculating Decimal Equivalent. Convert each four digit into a group and get decimal equivalent for each group. The same number, 54 D to be converted into XS3, add 3 to each digits, which give us 8 and 7. And the resultant 4 digit binaries are 1000 and 0111. Thus XS 3 for 54D is 1000 0111. Now, to convert a BCD directly into XS 3, all you need to do is add 11B (B stands for binary) to each 4 bits of the BCD.
Prerequisite –Number System and base conversions
![Bcd to xs3 code converter for smart tv Bcd to xs3 code converter for smart tv](https://softmath.com/tutorials-3/algebra-formulas/articles_imgs/3496/princi35.jpg)
Excess-3 binary code is a unweighted self-complementary BCD code.
Self-Complementary property means that the 1’s complement of an excess-3 number is the excess-3 code of the 9’s complement of the corresponding decimal number. This property is useful since a decimal number can be nines’ complemented (for subtraction) as easily as a binary number can be ones’ complemented; just by inverting all bits.
For example, the excess-3 code for 3(0011) is 0110 and to find the excess-3 code of the complement of 3, we just need to find the 1’s complement of 0110 -> 1001, which is also the excess-3 code for the 9’s complement of 3 -> (9-3) = 6.
Self-Complementary property means that the 1’s complement of an excess-3 number is the excess-3 code of the 9’s complement of the corresponding decimal number. This property is useful since a decimal number can be nines’ complemented (for subtraction) as easily as a binary number can be ones’ complemented; just by inverting all bits.
For example, the excess-3 code for 3(0011) is 0110 and to find the excess-3 code of the complement of 3, we just need to find the 1’s complement of 0110 -> 1001, which is also the excess-3 code for the 9’s complement of 3 -> (9-3) = 6.
Converting BCD(8421) to Excess-3 –
As is clear by the name, a BCD digit can be converted to it’s corresponding Excess-3 code by simply adding 3 to it.
Let be the bits representing the binary numbers, where is the LSB and is the MSB, and
Let be the bits representing the gray code of the binary numbers, where is the LSB and is the MSB.
The truth table for the conversion is given below. The X’s mark don’t care conditions.
To find the corresponding digital circuit, we will use the K-Map technique for each of the Excess-3 code bits as output with all of the bits of the BCD number as input.
Let be the bits representing the binary numbers, where is the LSB and is the MSB, and
Let be the bits representing the gray code of the binary numbers, where is the LSB and is the MSB.
The truth table for the conversion is given below. The X’s mark don’t care conditions.
To find the corresponding digital circuit, we will use the K-Map technique for each of the Excess-3 code bits as output with all of the bits of the BCD number as input.
Corresponding minimized Boolean expressions for Excess-3 code bits –
The corresponding digital circuit-
The corresponding digital circuit-
Converting Excess-3 to BCD(8421) –
Excess-3 code can be converted back to BCD in the same manner.
Let be the bits representing the binary numbers, where is the LSB and is the MSB, and
Let be the bits representing the gray code of the binary numbers, where is the LSB and is the MSB.
The truth table for the conversion is given below. The X’s mark don’t care conditions.
K-Map for D-
K-Map for C-
K-Map for B-
K-Map for A-
<img src='
Corresponding minimized boolean expressions for Excess-3 code bits –
The corresponding digital circuit –
Here correspond to and correspond to .
Let be the bits representing the binary numbers, where is the LSB and is the MSB, and
Let be the bits representing the gray code of the binary numbers, where is the LSB and is the MSB.
The truth table for the conversion is given below. The X’s mark don’t care conditions.
K-Map for D-
K-Map for C-
K-Map for B-
K-Map for A-
<img src='
Corresponding minimized boolean expressions for Excess-3 code bits –
The corresponding digital circuit –
Here correspond to and correspond to .
References-
Digital Design, 5th edition by Morris Mano and Michael Ciletti
Excess-3 – Wikipedia
Excess-3 – Wikipedia
This article is contributed by Chirag Manwani. If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to [email protected]. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Code Translator
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
Recommended Posts:
- Computer Organization Tutorial
- Computer Organization Resources
- Selected Reading
There are many methods or techniques which can be used to convert code from one format to another. We'll demonstrate here the following
- Binary to BCD Conversion
- BCD to Binary Conversion
- BCD to Excess-3
- Excess-3 to BCD
![Bcd To Xs3 Code Converter For Smart Bcd To Xs3 Code Converter For Smart](https://image.slidesharecdn.com/bcdtoexcess3codeconverter-141128050358-conversion-gate02/95/bcd-to-excess-3-code-converter-8-638.jpg?cb=1417151089)
Binary to BCD Conversion
Steps
- Step 1 -- Convert the binary number to decimal.
- Step 2 -- Convert decimal number to BCD.
Example − convert (11101)2 to BCD.
Step 1 − Convert to Decimal
Binary Number − 111012
Calculating Decimal Equivalent −
Step | Binary Number | Decimal Number |
---|---|---|
Step 1 | 111012 | ((1 × 24) + (1 × 23) + (1 × 22) + (0 × 21) + (1 × 20))10 |
Step 2 | 111012 | (16 + 8 + 4 + 0 + 1)10 |
Step 3 | 111012 | 2910 |
Binary Number − 111012 = Decimal Number − 2910
Step 2 − Convert to BCD
Decimal Number − 2910
Calculating BCD Equivalent. Convert each digit into groups of four binary digits equivalent.
Step | Decimal Number | Conversion |
---|---|---|
Step 1 | 2910 | 00102 10012 |
Step 2 | 2910 | 00101001BCD |
Result
BCD to Binary Conversion
Steps
- Step 1 -- Convert the BCD number to decimal.
- Step 2 -- Convert decimal to binary.
Example − convert (00101001)BCD to Binary.
Step 1 - Convert to BCD
BCD Number − (00101001)BCD
Calculating Decimal Equivalent. Convert each four digit into a group and get decimal equivalent for each group.
Step | BCD Number | Conversion |
---|---|---|
Step 1 | (00101001)BCD | 00102 10012 |
Step 2 | (00101001)BCD | 210 910 |
Step 3 | (00101001)BCD | 2910 |
BCD Number − (00101001)BCD = Decimal Number − 2910
Step 2 - Convert to Binary
Bcd To Xs3 Code Converter For Smartphones
Used long division method for decimal to binary conversion.
Decimal Number − 2910
Calculating Binary Equivalent −
Step | Operation | Result | Remainder |
---|---|---|---|
Step 1 | 29 / 2 | 14 | 1 |
Step 2 | 14 / 2 | 7 | 0 |
Step 3 | 7 / 2 | 3 | 1 |
Step 4 | 3 / 2 | 1 | 1 |
Step 5 | 1 / 2 | 0 | 1 |
As mentioned in Steps 2 and 4, the remainders have to be arranged in the reverse order so that the first remainder becomes the least significant digit (LSD) and the last remainder becomes the most significant digit (MSD).
Decimal Number − 2910 = Binary Number − 111012
Result
BCD to Excess-3
Steps
- Step 1 -- Convert BCD to decimal.
- Step 2 -- Add (3)10 to this decimal number.
- Step 3 -- Convert into binary to get excess-3 code.
Example − convert (1001)BCD to Excess-3.
Step 1 − Convert to decimal
(1001)BCD = 910
Code Converter For Smart Tv
Step 2 − Add 3 to decimal
(9)10 + (3)10 = (12)10
Step 3 − Convert to Excess-3
(12)10 = (1100)2
Result
Excess-3 to BCD Conversion
Steps
Binary Converter
- Step 1 -- Subtract (0011)2 from each 4 bit of excess-3 digit to obtain the corresponding BCD code.
Bcd To Xs3 Code Converter For Smartphone
Example − convert (10011010)XS-3 to BCD.
Result