What is a hex dump?A hex dump is the traditional way to view the raw content of any computer file at the byte level. All computer files are fundamentally just a sequence of bytes; specific applications may interpret them as sequences of ASCII characters, or as a series of database records or spreadsheet cells, but regardless of any higher-level structure, the files can always be viewed as bytes. Each byte has one of 256 values, but only some of these can be interpreted as printable ASCII characters, so the hex dump shows both the exact value of the byte in hexadecimal (a value from 00 to ff) and, where possible, the ASCII equivalent. A typical section from a hex dump looks like this: 000090 20 20 20 20 20 20 20 20 20 20 20 20 44 41 54 41 DATA 0000a0 20 20 20 20 00 00 00 00 41 d6 b0 d9 35 6e eb a2 ....A...5n.. The first column gives the offset of the first byte in the row (90 hex means 144 decimal). Each row contains 16 bytes, given first as a series of two-digit hex values and then, on the right, as a set of 16 ASCII characters. Only bytes with hex values between 20 and fe are printable; all others are printed as a '.'. The first row above shows a series of 12 ASCII space characters (hex 20, decimal 32), followed by four printable characters, which we can see on the right are the ASCII codes for the characters 'DATA'. The second row clearly isn't text data; instead, the right-most eight bytes form the binary representation of a floating-point number. |
Comments
View comments