# Help in converting hex to bin and sum tips

Discussion in 'Assembly Language Programming (ALP) Forum' started by pengait, Oct 16, 2007.

1. ### pengaitNew Member

Joined:
Oct 16, 2007
Messages:
3
0
Trophy Points:
0
im at this forum, and newbie in assembly.

i making a program logical calculator that do a XOR operation..
the input is in 8 bit.

my problem is converting hex to binary.( im stuck here)
the result from xor will be in hexadecimal, so i need to convert to binary and display the result.
i dont have any idea how to convert it, store and then display it.

convert;
if im using the division, do i need to division every quotient until the remainder 0 and the next remainder 0.
how the coding will be.

store and display it ;
how can i store the remainder and then display it.

sorry if my grammar is not good. hope its understandable.

trully thanks if someone can give the coding and appreciate if anyone can just tell me the algorithm.

2. ### DaWeiNew Member

Joined:
Dec 6, 2006
Messages:
835
5
Trophy Points:
0
Occupation:
Semi-retired EE
Location:
Texan now in Central NY
http://www.daweidesigns.com
You have a bad, but common idea. Values stored in (and used by) your computer are binary. When your view these values on your screen (or printer, or whatever), the have been converted to a notation that represents your common notation (decimal), or, possibly a less common notation (hexadecimal).

If you want to display what seems to be binary, then you will have to convert the ones and zeros of the existing binary number to characters which represent these individual bits.

Zero is not '0'. One is not '1'. The latter are values that result in certain glyphs appearing on the screen. They are visual representations, not true values.

Joined:
Jul 12, 2004
Messages:
15,374