Hexadecimal

The hexadecimal system has 16 base. It is represented by using 10 decimal digits plus the alphabet letters (A, B, C, D, E and F). This system facilitates the conversion with the binary code. The table that relates decimal, binary and hexadecimal is:

Decimal

Hexadecimal

Binario

0

0

0000

1

1

0001

2

2

0010

3

3

0011

4

4

0100

5

5

0101

6

6

0110

7

7

0111

8

8

1000

9

9

1001

10

A

1010

11

B

1011

12

C

1100

13

D

1101

14

E

1110

15

F

1111

 

Example 1: Transform into binary the following number: 27CE,3A

2

7

C

E

,

3

A

0010

0111

1100

1110

,

0011

1010

 

Example 2: Transform the decimal number 47599 into binary and hexadecimal:

 

Dividend

Remainder

47599:16

2974

15 (F)

2974:16

185

14(E)

185:16

11 (B)

9

 

The final result is B9EF

To pass this number to binary, it is easier to start from the hexadecimal number:

B

9

E

F

1011

1001

1110

1111

The transformation from the hexadecimal number to decimal is:

B9EF= 11*163+9*162+14*161+15*160=45056+2304+224+15=47599