1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Help in converting hex to bin and sum tips

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

  1. pengait

    pengait New Member

    Joined:
    Oct 16, 2007
    Messages:
    3
    Likes Received:
    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) :confused:
    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.

    thanks for reading, :)
    trully thanks if someone can give the coding and appreciate if anyone can just tell me the algorithm.
     
  2. DaWei

    DaWei New Member

    Joined:
    Dec 6, 2006
    Messages:
    835
    Likes Received:
    5
    Trophy Points:
    0
    Occupation:
    Semi-retired EE
    Location:
    Texan now in Central NY
    Home Page:
    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.
     
  3. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,287
    Likes Received:
    364
    Trophy Points:
    83
    Search the forum and you should find that program.
     

Share This Page