1. I picked up this book today  with no background in any languages, including lua. I got to the "Hexadecimal Notation" sextin in Part 1, page 14.

    After doing a little research on the internet, i was able to understand your first three examples:

    > print(0x1)

    > print(0xF)

    > print(0x10)

    but, alas, I'm confused with the last one.

    > print(0x10a4)

     

    I really am looking to understand why the answer is what it is, rather than just knowing the answer. Are there any other sites you would recommend on hexidecimal? or perhaps a thread on the forums?

    Thanks,

    539

  2. I picked up this book today  with no background in any languages, including lua. I got to the "Hexadecimal Notation" sextin in Part 1, page 14.

    After doing a little research on the internet, i was able to understand your first three examples:

    > print(0x1)

    > print(0xF)

    > print(0x10)

    but, alas, I'm confused with the last one.

    > print(0x10a4)

     

    I really am looking to understand why the answer is what it is, rather than just knowing the answer. Are there any other sites you would recommend on hexidecimal? or perhaps a thread on the forums?

    Thanks,

    539

  3. I figured it out =)

     

    10a4=

    1*(16^3) + 0*(16^2) + 10*(16^1) = 4*(16^0) =

    4096 + 0 + 160 + 4 =

    4260.

    (I'm enjoying this much more than any average 21 year old guy should...)

  4. Great, glad you were able to work it out ;-)