Hex Dump - Samples

Samples

A sample partial hex dump of a program, as produced by the Unix program hexdump:

00105e0 e6b0 343b 9c74 0804 e7bc 0804 e7d5 0804 00105f0 e7e4 0804 e6b0 0804 e7f0 0804 e7ff 0804 0010600 e80b 0804 e81a 0804 e6b0 0804 e6b0 0804

The above example, however, represents an ambiguous form of hex dump, as the byte order may be uncertain. Such hex dumps are good only in the context of a well-known byte order standard or when values are intentionally given in their full form (and may result in variable number of bytes), such as:

00105e0 e6 b008 04e79e08 04e7bc 08 04 e7 d50804

When explicit byte sequence is required (for example for hex dump of machine code programs or ROM content) a byte-by-byte representation is favoured, commonly organized in 16-byte rows with an optional divider between 8-byte groups:

00105e0 e6 b0 08 04 e7 9e 08 04-e7 bc 08 04 e7 d5 08 04 00105f0 e7 e4 08 04 e6 b0 08 04-e7 f0 08 04 e7 ff 08 04 0010600 e8 0b 08 04 e8 1a 08 04-e6 b0 08 04 e6 b0 08 04

Rarely a condensed form is also used, without whitespaces between values:

00105e0 e6b00804e79e0804e7bc0804e7d50804 00105f0 e7e40804e6b00804e7f00804e7ff0804 0010600 e80b0804e81a0804e6b00804e6b00804

A Unix default display of those same bytes as two-byte words on a modern x86 (little-endian) computer would usually look like this:

00105e0 b0e6 0408 9ee7 0408 bce7 0408 d5e7 0408 00105f0 e4e7 0408 b0e6 0408 f0e7 0408 ffe7 0408 0010600 0be8 0408 1ae8 0408 b0e6 0408 b0e6 0408

Often an additional column shows the corresponding ASCII text translation:

0000: FF D8 FF E0 00 10 4A 46-49 46 00 01 02 01 00 48 ......JFIF.....H 0010: 00 48 00 00 FF ED 0A 96-50 68 6F 74 6F 73 68 6F .H......Photosho 0020: 70 20 33 2E 30 00 38 42-49 4D 04 04 07 43 61 70 p 3.0.8BIM...Cap

When hex dumps are intended to be manually entered into a computer, such as was the case with print magazine articles of home computer era a checksum byte (or two) would be added at the end of each row, commonly calculated as simple 256 modulo of sum of all values in the row or a more sophisticated CRC. This checksum would be used to determine whether users entered the row correctly or not.

Read more about this topic:  Hex Dump

Famous quotes containing the word samples:

    Good government cannot be found on the bargain-counter. We have seen samples of bargain-counter government in the past when low tax rates were secured by increasing the bonded debt for current expenses or refusing to keep our institutions up to the standard in repairs, extensions, equipment, and accommodations. I refuse, and the Republican Party refuses, to endorse that method of sham and shoddy economy.
    Calvin Coolidge (1872–1933)