How to convert a number from decimal to ASCII?
-
"Convert decimal 8,723 o both BCD and ASCII codes. For ASCII, an even parity bit is to be appended to the left." My instructor has not explained this clearly. I know how to convert the number to BCD: 1000 | 0111 | 0010 | 0011 But I don't know how to get to ASCII from there... Can anyone help?
-
Answer:
I would convert to ASCII from the original decimal number, and not the BCD, because it will be easier to convert. Just add 48 to each digit. The character '0' is an ascii 48, the character '1' is 49, etc. all the way up to '9'. So, for each of your digits, add 48. For example, 8,723 in ASCII is: 56 55 50 51 ASCII codes are typically one byte (eight bits), so if you are using binary to represent the ASCII code, use eight bits. If you represent them as decimal you don't have to worry about that.
Maha Jaala at Yahoo! Answers Visit the source
Related Q & A:
- How to Convert a C++ Structure into C# Structure?Best solution by Stack Overflow
- How to limit the number of decimal digits in ARCGIS to have the exported file in CAD with the same format?Best solution by Geographic Information Systems
- How to convert a video to a specific format?Best solution by Super User
- How to convert a DC locomotive to a DCC locomotive?Best solution by Yahoo! Answers
- How to convert a .DMG file into a .EXE?Best solution by answers.yahoo.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.