Slide 3.4: Integer storage sizes Slide 3.6: Signed integers Home |
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:
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 |
Integer Division | Quotient | Remainder |
---|---|---|
3032 / 16 | a0 = | |
/ 16 | a1 = | |
/ 16 | a2 = | |