Hexadecimal

Computers are digital and can therefore just distinguish for a bit between two conditions. Various synonyms are possible for the condition of a digital signal:

  1. 1 and 0

  2. true and false

  3. set and reset

  4. or for the hardware people low and high

To deal with bits, sequential bits are grouped together:

Number of bits

Name

Combinations

Commonly used for

4

nibble

16

Hexadecimal character

8

byte

256

ASCII character

16

word

65536

Integer numbers

The 16 bit combinations the following characters are assigned:

Bit combination

Representing character

     

Bit 3

Bit 2

Bit 1

Bit 0

 

0

0

0

0

0

0

0

0

1

1

0

0

1

0

2

0

0

1

1

3

0

1

0

0

4

0

1

0

1

5

0

1

1

0

6

0

1

1

1

7

1

0

0

0

8

1

0

0

1

9

1

0

1

0

A

1

0

1

1

B

1

1

0

0

C

1

1

0

1

D

1

1

1

0

E

1

1

1

1

F

The human brain has to remember just 16 combinations to convert a nibble to a bit sequence. A byte contains two nibbles and instead of representing it as a decimal number, it can be represented as two nibbles and therefore two hexadecimal numbers.

Observing a memory dump or any file (as an example to see character encoding) ghex to have a hex editor or a simple hex converter, to start type ghex2.

Alternatives are: lfhex, hexer, hexedit, hexcurse.

Mysterious things can be observed:

  1. carriage return (cr) line feed (lf) or carriage return (cr) only (=Unix style) at line ends

  2. tabs or spaces used

  3. utf-8 character encoding


Linurs Servernest startpage