Design a bcd to excess 3 code converter and implement using suitable pla. That no compare-based algorithm can build a BST using fewer than lg(N!) N lg N. How do I convert a number from BCD to XS3 and verse versa? Update Cancel. A d b y W i k i b u y. How do I convert BCD numbers to gray code? How do I convert a number to 10^x? Why do we convert the excess-3 code to BCD? How do I convert 0.125 into a whole number? Ask New Question.
web developer and programmer tools
World's simplest Gray code encoder. Just paste your decimal numbers in the form below, press Convert button, and you get reflected binary code. Press button, get Gray code. No ads, nonsense or garbage.
Announcement: We just launched Online Text Tools – a collection of browser-based text processing utilities. Check it out!
(undo)
Want to convert Gray code to decimal?
Use the Gray code to decimal converter!
Looking for more programming tools? Try these!
Pro tip: You can use ?input=text query argument to pass text to tools.
- 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
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
![Bcd To Xs3 Code Converter Lg Bcd To Xs3 Code Converter Lg](http://www.sanfoundry.com/wp-content/uploads/2016/09/plc-program-implement-binary-gray-code-conversion-03.png)
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
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
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
- Step 1 -- Subtract (0011)2 from each 4 bit of excess-3 digit to obtain the corresponding BCD code.
Example − convert (10011010)XS-3 to BCD.
Result