Help with hexadecimal number

Discussion in 'Mac Programming' started by cybrscot, Mar 25, 2011.

  1. cybrscot, Mar 25, 2011
    Last edited: Mar 25, 2011

    cybrscot macrumors 6502

    cybrscot

    Joined:
    Dec 7, 2010
    Location:
    Somewhere in Southeast Asia
    #1
    Nevermind, figured this one out. Found a good example online.
     
  2. dmi macrumors regular

    Joined:
    Dec 21, 2010
    #2
    Sixteen in hex would be 10
    Or, to be recognized by the C compiler as a hexadecimal constant, 0x10
    0x77 is 7 x 16(1) + 7 x 16(0)
     
  3. Sander macrumors 6502

    Joined:
    Apr 24, 2008
    #3
    The "0x" prefix is used in the C family of languages. Sometimes you see an "H" appended to the number to signify it's hexadecimal, or a subscript "16". So, the book is just being sloppy.

    You have the pattern right.

    I don't quite understand your question about 16 - in a base-16 system, it would be "10".

    The value of "0" is still "0" - in any system.
     
  4. balamw Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #4
    cybrscot, please don't edit away your question, it really breaks the thread continuity and doesn't help anyone in the future who may have a similar question.

    Use the "resolved" tag for the thread if it's solved and ADD "Nevermind, figured this one out." to your post without removing the original question.

    It would also be nice to others if you gave a link to the site you found useful.

    B
     

Share This Page