[SOLVED] conversion from hex to decimel

Status
Not open for further replies.
I prefer to first convert it to binary and from binary to decimal.
Every Hex digit can be represented by 4 binary digits.
For example:
0xFF is binary - "1111 1111" which is 255 in decimal.
Another example-
0x12 is binary - "0001 0010" which is 18 in decimal.
 

The dptr is 16 bit and Acc is only 8 bit. You need to convert to 5 byte decimal ascii or 2.5 byte BCD format.

Which one do you prefer?

Allen

- - - Updated - - -

OK I think I misunderstood what you want. You want to convert what's in (DPTR) to decimal in Acc. But 8 bit hex would convert to 255 decimal max. So where to put the hundred digit?

Allen
 
Last edited:

thats the problem .......... @allen

- - - Updated - - -

will be very complicated
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…