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

    Oct 16, 2007
    Likes Received:
    Trophy Points:
    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.

    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

    Dec 6, 2006
    Likes Received:
    Trophy Points:
    Semi-retired EE
    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

    Jul 12, 2004
    Likes Received:
    Trophy Points:
    Search the forum and you should find that program.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice