Hexadecimal: Difference between revisions
Content deleted Content added
Puppydrum64 (talk | contribs) m →Uses |
Puppydrum64 (talk | contribs) No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 4:
== Uses ==
The hexadecimal number system is used widely in the Electronics and Computer Industry, as although digital electronics is based on gates with only two states and is therefore fundamentally binary, binary numbers can quickly become long and hard to transcribe without errors. Their hexadecimal equivalents are much shorter and easier to remember, and have a straight-forward way of conversion to/from binary
=== Hex Dump ===
A textual representation of data where values are expressed in hexadecimal. Often used to show the contents of regions of memory where both the memory addresses as well as the memory contents may be expressed in hexadecimal.
Line 94 ⟶ 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.
|