Assembly Language: Hexadecimal Conversion

Sharky Forums


Results 1 to 2 of 2

Thread: Assembly Language: Hexadecimal Conversion

  1. #1
    Expensive Sushi ngalantino's Avatar
    Join Date
    Mar 2003
    Posts
    6

    Question Assembly Language: Hexadecimal Conversion

    I'm trying to learn assembly language but am having some difficulty learning hexadecimal conversion. How can I convert a hexadecimal number into a decimal number? (I know it is base 16)

    Thanx
    ibook 876 mhz benchmark
    256 megabytes sdram
    mac os x
    dvd-rw
    30 gig hard drive
    32 megabyte video card

  2. #2
    Super Bunny Mod muisejt's Avatar
    Join Date
    Dec 2000
    Location
    Nova Scotia, Canada
    Posts
    9,833
    since the positions are weighted all you need to do is multiply the digits by there weighted value and add, here's a couple examples:

    356(16) = 3x16^2 + 5x16^1 + 6x16^0
    356(16) = 768 + 80 + 6
    356(16) = 854(10)


    2AF(16) = 2x16^2 + 10x16^1 + 15x16^0
    2AF(16) = 512 + 160 + 15
    2AF(16) = 687(10)


    if you want a easy way to convert just use the calculator that comes with Windows (needs to be set to Scientific)
    If your sig is longer than your post then type more.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •