What is a Hex Dump?
A hex dump is a snapshot of computer memory, generally displayed as text either on a screen or in a printout. Hexadecimal, or hex, is a base-16 number system used by computers to represent binary code when people need to read it. Computer dumps are the common name for writing information in memory to a file, often before a software failure. With that in mind, a hex dump is typically used by people to work through exactly what a computer was doing right before a crash.
In order to understand a hex dump, it is necessary to understand a little about how alternate number systems work. Number systems are notated as being base-[value]. The value in a number system determines how many digits of numbers there are in the system. For instance, most people normally use a base-10 system that has ten numbers, zero through nine. While it may be hard to understand number systems that are other than base-10, it is very easy for computers. Different base counting systems allow for faster programs and better storage methods than a standard base-10 system.
Most computer code works in binary, a series of 1s and 0s that represent on and off in the computer's magnetic memory. As a base-2 system, binary has very large numbers that represent relatively small base-10 numbers. As an example, "1001" in binary is equal to nine in base-10. When computers store binary data, they do it in two four-digit blocks, called a byte, that each represent one number. A block that reads "0100 1101" would be "4 13" in base-10 notation.
Hexadecimal is a base-16 number system that contains the values zero through 15. Since the largest number that can be written in four digits of binary is "1111" or "15" in base-10, then the four-digit binary number is easier and shorter to write in hex. Writing values in hex shortens each byte from eight digits to two digits.
A typical hex value may look a little different from a base-10 digit. While the values for zero through nine remain the same, 10 through 15 gain a single representative value. These values are represented by A-F. In base-10, this would be a basic math problem: 4+11=15. In hex, the same problem would look like this: 4+B=E.
Hex dumps use all of these conversions and numbers to spit out a text representation of what was written in the computer's memory at the time of the dump. A typical hex dump has line after line of numbers in tight and consistent columns, all written in hex. The first column is the memory address of the line and consists of seven digits. Following the memory address are the values of that space converted to hex from binary. These are typically groups of two values, representing one byte, or four values, representing two. The last column is the address's checksum, a value used to verify the information's accuracy, and is usually six digits.
Discuss this Article
Post your comments