If an input file contains the null character or Hexadecimal mode has been
initiated with the Alt-H key, the display changes to show the input file as a
sequence of 16 byte "lines". Two views of each line are shown: a set of
four groups of eight hexadecimal integers each, and the character
representation of the line. An example of hexadecimal mode representation of
a file is shown in
the following figure.
54686520 71756963 6B206272 6F776E20 * The quick brown 666F7820 6A756D70 73206F76 65722074 * fox jumps over t 6865206C 617A7920 646F672E 0D0A0D0A * he lazy dog.CRLF
In the above example, CRLF represents two carriage return/line feed pairs. Changes can be made to either representation of the line. When moving the cursor over the file, a shadow cursor is displayed which follows the real cursor on the opposite representation of the line. When the cursor is on the hex representation, the shadow cursor will show the equivalent position on the character portion. When the cursor is on the character representation of the line, the shadow cursor will show the position in the hex portion.
When replacing characters in Hexadecimal mode, the cursor position is important. When over one of the hex sections of the line, only the characters 0-9 and A-F are valid. Lower case letters are converted to upper case. The replacement causes the hexadecimal value of the character at that position to be changed. This change will be reflected in the text section of the line. If the cursor is positioned over the text portion of the line, no conversion is done and all characters are valid. The hexadecimal representation of the character will be changed in the hex section.
In text mode the status line shows the row and column of the cursor in the file, where column 1 starts at the left edge of the screen. In hex mode the offset in bytes from the beginning of the file is shown instead. The offset will increment by one for every two hex characters on the line, until the cursor reaches the text section. Then it will increase normally until it reaches the end of the text section.
Some default keys will work differently in Hexadecimal mode; most notably, you cannot insert or delete characters in hex mode. The full list of changed keys is outlined below.