Question:
Is there a relationship between ASCII character representation of the decimal digits from 0 to 9 and their BCD?
anonymous
2012-02-08 10:49:11 UTC
I am thinking there is no relationship because ASCII on conversion to binary is a 7 bit representation which is then converted to hexa
While in BCD each decimal number requires four binary bits
Can anyone please assist me this ? I am on the right track ?
Three answers:
Richard
2012-02-08 11:31:03 UTC
The numeric values 0 to 9 are represented as characters in ASCII by the hexadecimal characters 30 to 39 respectively. In binary, these are



0110000 to 0111001



So the following values apply as ASCII in hexadecimal



0 = 30

1 = 31

2 = 32

3 = 33

4 = 34

5 = 35

6 = 36

7 = 37

8 = 38

9 = 39



Hope this helps.
Joe
2012-02-08 11:00:36 UTC
Well, in each coding system, the numerals are sequentially coded. So, they have that in common, but it could have hardly been otherwise. And one did not derive from the other.



There is another coding system that extended BCD to a more complete character set: EBCDIC. It's now largely obsolete.
meghann
2016-09-16 11:51:47 UTC
Possibly yeah


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...