Another way data is stored is in hex

To convert an integer to hexadecimal

First convert a in integer into binary

We will convert 155 to 10011011

Create two tables both four bits:

 8 4 2 1
 8 4 2 1

Place the first four bits of 10010011 into the first table and the last four bits into the second table:

 8 4 2 1 1 0 0 1
 8 4 2 1 1 0 1 1

Total the value from the two tables:

Table 1 (8+1) = 9

Table 2 (8+2+1) = 11

Convert the value to hex using the table:

 Value Hex 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 A 11 B 12 C 13 D 14 E 15 F

From the first table we get 9 and from the second table we get B

Join the two to get a hex value in this case 155 = 9B

Convert Hex to integer

We will convert D7 into an integer

Separate the two characters to D and 7

Find the corresponding value

 Value Hex 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 A 11 B 12 C 13 D 14 E 15 F

D = 13

7=7

Change 13 into binary

13 = 1101

Change 7 into binary

7 = 0111

Join the two binary values together to get 11010111

Convert binary into denary

11010111 = 215

Scroll to Top