Hexadecimal System
The hexadecimal system is a numeral system positional in base 16. He thus uses 16 symbols, usually the Arabic numerals for the first ten digits and the letters A through F for the second six.
The hexadecimal system is used by computer scientists because it is particularly convenient and allows a compromise between the binary code of the machines and a radix practical use for engineers. Indeed, each hexadecimal digit represents exactly four binary digits (or bits ), making the conversion very simple and providing a more compact writing. The hex was first used in 1956 by engineers of the computer Bendix G-15.
Summary |
Etymology
The word hexadecimal is from the juxtaposition of hex and decimal. The prefix comes from the Greek hexa (hex), meaning six, and decimal is a term from Latin. The choice was made in the name of writing 6 +10 instead of 16, to insist on the addition of six additional digits from the decimal system , a system widely available to the United States.
To achieve consistency in the etymology of writing while maintaining 6 +10, documentation Bendix sexadcimal used the name but the name was rejected as too risky. According to Schwartzman the correct name should have been senidenary snidnaire or French system, whose construction is etymologically the same as the binary system.
Writing integers
| 0 hex | = | December 0 | = | 0 October | 0 | 0 | 0 | 0 | |||
| 1 hex | = | December 1 | = | October 1 | 0 | 0 | 0 | 1 | |||
| 2 hexes | = | December 2 | = | October 2 | 0 | 0 | 1 | 0 | |||
| 3 hexes | = | December 3 | = | October 3 | 0 | 0 | 1 | 1 | |||
| 4 hex | = | December 4 | = | October 4 | 0 | 1 | 0 | 0 | |||
| 5 hexes | = | December 5 | = | October 5 | 0 | 1 | 0 | 1 | |||
| 6 hex | = | December 6 | = | October 6 | 0 | 1 | 1 | 0 | |||
| 7 Hex | = | December 7 | = | October 7 | 0 | 1 | 1 | 1 | |||
| 8 hex | = | December 8 | = | October 10 | 1 | 0 | 0 | 0 | |||
| 9 hex | = | December 9 | = | October 11 | 1 | 0 | 0 | 1 | |||
| A hex | = | December 10 | = | October 12 | 1 | 0 | 1 | 0 | |||
| B hex | = | December 11 | = | October 13 | 1 | 0 | 1 | 1 | |||
| C hex | = | December 12 | = | October 14 | 1 | 1 | 0 | 0 | |||
| D hex | = | December 13 | = | October 15 | 1 | 1 | 0 | 1 | |||
| E Hex | = | December 14 | = | October 16 | 1 | 1 | 1 | 0 | |||
| F hex | = | December 15 | = | October 17 | 1 | 1 | 1 | 1 | |||
The hexadecimal system requires the introduction of 16 numbers representing the first 16 positive integers:
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F.
An integer is written as the concatenation of these figures, and reading from right to left. Its value is the sum of the assigned weight corresponding to successive powers of the number 16. For example, 4D5 16 is 5 * 16 0 + 13 * 16 1 + 4 * 16 2 = 1237 10.
The addition is carried out from the technique of addition and the addition table follows:
| + | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F |
| 0 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F |
| 1 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F | 10 |
| 2 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F | 10 | 11 |
| 3 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F | 10 | 11 | 12 |
| 4 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F | 10 | 11 | 12 | 13 |
| 5 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F | 10 | 11 | 12 | 13 | 14 |
| 6 | 6 | 7 | 8 | 9 | A | B | C | D | E | F | 10 | 11 | 12 | 13 | 14 | 15 |
| 7 | 7 | 8 | 9 | A | B | C | D | E | F | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
| 8 | 8 | 9 | A | B | C | D | E | F | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 9 | 9 | A | B | C | D | E | F | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| A | A | B | C | D | E | F | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| B | B | C | D | E | F | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 1A |
| C | C | D | E | F | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 1A | 1B |
| D | D | E | F | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 1A | 1B | 1C |
| E | E | F | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 1A | 1B | 1C | 1D |
| F | F | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 1A | 1B | 1C | 1D | 1E |
The multiplication is done from the technique of slip-fold by jealousy and by using the following multiplication table:
| x | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F |
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F |
| 2 | 0 | 2 | 4 | 6 | 8 | A | C | E | 10 | 12 | 14 | 16 | 18 | 1A | 1C | 1E |
| 3 | 0 | 3 | 6 | 9 | C | F | 12 | 15 | 18 | 1B | 1E | 21 | 24 | 27 | 2A | 2D |
| 4 | 0 | 4 | 8 | C | 10 | 14 | 18 | 1C | 20 | 24 | 28 | 2C | 30 | 34 | 38 | 3C |
| 5 | 0 | 5 | A | F | 14 | 19 | 1E | 23 | 28 | 2D | 32 | 37 | 3C | 41 | 46 | 4B |
| 6 | 0 | 6 | C | 12 | 18 | 1E | 24 | 2A | 30 | 36 | 3C | 42 | 48 | 4E | 54 | 5A |
| 7 | 0 | 7 | E | 15 | 1C | 23 | 2A | 31 | 38 | 3F | 46 | 4D | 54 | 5B | 62 | 69 |
| 8 | 0 | 8 | 10 | 18 | 20 | 28 | 30 | 38 | 40 | 48 | 50 | 58 | 60 | 68 | 70 | 78 |
| 9 | 0 | 9 | 12 | 1B | 24 | 2D | 36 | 3F | 48 | 51 | 5A | 63 | 6C | 75 | 7E | 87 |
| A | 0 | A | 14 | 1E | 28 | 32 | 3C | 46 | 50 | 5A | 64 | 6E | 78 | 82 | 8C | 96 |
| B | 0 | B | 16 | 21 | 2C | 37 | 42 | 4D | 58 | 63 | 6E | 79 | 84 | 8F | 9A | A5 |
| C | 0 | C | 18 | 24 | 30 | 3C | 48 | 54 | 60 | 6C | 78 | 84 | 90 | 9C | A8 | B4 |
| D | 0 | D | 1A | 27 | 34 | 41 | 4E | 5B | 68 | 75 | 82 | 8F | 9C | A9 | B6 | C3 |
| E | 0 | E | 1C | 2A | 38 | 46 | 54 | 62 | 70 | 7E | 8C | 9A | A8 | B6 | C4 | D2 |
| F | 0 | F | 1E | 2D | 3C | 4B | 5A | 69 | 78 | 87 | 96 | A5 | B4 | C3 | D2 | E1 |
Usage, advantages and disadvantages
This format is widely used in computing because it offers an easy conversion to the binary system , a system used by computers.
It is possible to translate the binary into the Hex , and vice versa, a group of numbers in groups of numbers. This feature is explained by the fact that 16 (number of digits in hexadecimal) is itself a power of 2 (number of digits in the binary base), and therefore the amount of information of a hexadecimal digit satisfies:
l o g 2 (16) = 4 * l o g 2 (2)
This equality means that: "At a number in base 16, exactly four digits in base 2. "
This ease of conversion led the hexadecimal notation to be used to record numbers initially quantified or destined to be quantified in binary , the hexadecimal is more compact (four times lower numbers), and providing better visibility to the eye human.
An additional advantage of the base 16 is its consistency with the byte , 8 bit word which is now often a byte , the smallest unit of storage addressable. Based on the above formula, we can easily see only 8 bits are exactly two hexadecimal digits:
2 * l o g 2 (16) = 8 * l o g 2 (2)
It is convenient to note the value of a byte on two hexadecimal digits.
The ASCII table has been constructed so as to begin the basic sequences of symbols (numbers, lowercase letters, uppercase letters) at positions remarkable when expressed in binary , octal or hexadecimal.
For example, the letter "A" corresponds to the hexadecimal code 41 (40 + the position of the letter in the alphabet), the figure "0" is the hexadecimal code 30 (30 + value of sales).
Conversions between decimal and hexadecimal are less wealthy than conversions between the decimal and binary .
Conversion
The conversion from binary to hexadecimal is done by combining the digits ( bits ) four by four, or vice versa by replacing each hexadecimal digit by 4 binary digits:
| binary | 1.0101.1010.1010.1100.1111.0111 | ||||||
|---|---|---|---|---|---|---|---|
| grouped by 4 | 1 | 0101 | 1010 | 1010 | 1100 | 1111 | 0111 |
| grouped in hexadecimal | 1 | 5 | A | A | C | F | 7 |
| hexadecimal | 15AACF7 | ||||||
| (Decimal) | 22719735 | ||||||
The conversion to the decimal system is realized by summing

where n is the number of digits and where h i is the digit hexadecimal position i.
15AACF7 and converted to decimal as follows
1 16 6 + 5 16 5 + 10 4 + 10 16 16 3 + 12 2 + 15 16 16 1 + 7 = 16 0 22719735.
The conversion of decimal to hexadecimal is a result of entire divisions or by using the binary as intermediate base.
Notation
Ratings are used, especially in computer languages , to differentiate clearly between the hex digits of others:
- prefix notation: 0x 123 ( C language and derivatives), and h 123 ( BASIC ), 123 (in Pascal , and derivatives such as VHDL electronics), but # 123 ( Common Lisp ), 0h 123 ( Texas Instrument ) or X '123' ( COBOL )
- Notation: h 123, 123 (16) ( arithmetic )
See also hexadecimal numbers in the article : Typographic conventions.
bibi-binary system
The singer and comedian Boby Lapointe was invented in 1968 a hexadecimal system, called Bibi-binary system both funny and coherent.
Colour coding
The hexadecimal system is one method of computer coding color computer screens.
References
- Schwartzman, S. (1994). The Words of Mathematics: an etymological dictionary of mathematical terms Used in Franais.
- Knuth, Donald. (1969). Donald Knuth, in The Art of Computer Programming, Volume 2.
- considering that the product is 0 or 1 of a term is more "easy" a product by a factor ranging from 0 to 15
See also
| 1-9 | unary (1) , binary (2) , ternary (3) , quaternary (4) , quinary (5) , senary (6) , number seven (7) , octal (8) , nonary (9) | |
| 10-60 | Decimal (10) , duodecimal (12) , tridcimal (13) , hexadecimal (16), vicsimal (20) , sexagesimal (60) | |
| Other basis | based on gold () | |
| Notions | Basic figure number positional notation count | |
