Hex dump
From Wikipedia, the free encyclopedia
Hex dump is a hexadecimal view (on screen or a printout) of computer memory. Each 8-bit byte is represented as a two-digit hexadecimal number. Hex dumps are commonly organized into rows of 8 or 16 bytes, sometimes separated by whitespaces. Some hex dumps have the hexadecimal memory address at the beginning and checksum byte at the end of each line.
[edit] Samples
A sample partial hex dump of the /bin/ls program from GNU Coreutils, generated using the Linux hexdump utility.
00105e0 e6b0 0804 e79e 0804 e7bc 0804 e7d5 0804 00105f0 e7e4 0804 e6b0 0804 e7f0 0804 e7ff 0804 0010600 e80b 0804 e81a 0804 e6b0 0804 e6b0 0804
Above example, however, represents an ambiguous form of hex dump, as byte order cannot be concluded. Such hex dumps are good only in the context of 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
Sometimes condensed form is also used, without whitespaces between values:
00105e0 e6b00804e79e0804e7bc0804e7d50804 00105f0 e7e40804e6b00804e7f00804e7ff0804 0010600 e80b0804e81a0804e6b00804e6b00804
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.
[edit] See also
- Galaksija ROM "A" - a full 4 KiB hex dump of main ROM of home computer Galaksija.