Hexadecimal Integers (Cont.)


Converting Unsigned Hexadecimal to Decimal
Weighted positional notation represents a convenient way to calculate the decimal value of an unsigned hexadecimal integer having n digits:
   dec = (Dn-1×16n-1) + (Dn-2×16n-2) + … +(D1×161) + (D0×160)
Each digit Dj is multiplied by 16j . For example, the decimal equivalent of the hexadecimal number (B65F)16 can be found from the multiplication of the digits by powers of 16:
   (B65F)16 = 

           = (  )10           
16n Decimal Value   16n Decimal Value   16n Decimal Value
160 1   163 4096   166 16,777,216
161 16 164 65,536 167 268,435,456
162 256 165 1,048,576 168 4,294,967,296

Converting Unsigned Decimal to Hexadecimal
  1. Repeatedly divide the decimal value by 16.
  2. Save each remainder as a hexadecimal digit.
  3. Collect the hexadecimal digits in the remainder column in reverse order.
Integer Division Quotient Remainder
3032 / 16 a0 =
/ 16 a1 =
/ 16 a2 =

Answer: (3032)10 = (a2a1a0)16 = ( )16            



      “Recognizing power in another does not diminish your own.”    
      ― Joss Whedon