Hexadecimal: Difference between revisions
no edit summary
Puppydrum64 (talk | contribs) (→Uses: There was already an example below so having one here was redundant) |
Puppydrum64 (talk | contribs) No edit summary |
||
Line 91:
a10e bead b0ca ca11 c0c0 dade d0ff face f10c 1a5e 10eb 5a1e 510e
a150 beef b0de ca5e c0da da1e d01e fade f10e 1a55 101a 5cab 50da</pre>
== Data size limits ==
Numbers like 255, 65535, and 2,147,483,647 (I had to look this one up because I can't remember it off the top of my head, which just proves the following point) may seem arbitrary at first glance. But these are the "maximum" values for a reason. (2,147,483,647 is a little different because it's the maximum "positive" number where the other two examples are unsigned.)
<pre>
Decimal: 255
Binary: 11111111
Hex: FF
Decimal: 65535
Binary: 11111111 11111111
Hex: FFFF
Decimal: 2,147,483,647
Binary: 01111111 11111111 11111111 11111111
Hex: 7FFFFFFF
</pre>
It makes a little more sense now, doesn't it? For 255 and 65535, these are the highest possible values that can be represented with 8 and 16 bits, respectively. As for 2,147,483,647, it's just below halfway to the max. It's also as high as you can get without the leftmost binary digit equaling 1.
|