Any of those help The algorithm to convert input 8 digit hex number into 10 digit are following: , From this conversion algorithm:

code :

```
x1 = 1 * 16^8 * 2^3
x2 = 2 * 16^7 * 2^2
x3 = 3 * 16^6 * 2^1
x4 = 4 * 16^4 * 2^4
x5 = 5 * 16^3 * 2^3
x6 = 6 * 16^2 * 2^2
x7 = 7 * 16^1 * 2^1
x8 = 8 * 16^0 * 2^0
```

```
x1 = 1 * 16^7 * 16^1 * 2^3
x2 = 2 * 16^6 * 16^1 * 2^2
x3 = 3 * 16^5 * 16^1 * 2^1
x4 = 4 * 16^4 * 2^4
x5 = 5 * 16^3 * 2^3
x6 = 6 * 16^2 * 2^2
x7 = 7 * 16^1 * 2^1
x8 = 8 * 16^0 * 2^0
```

```
x1 = 1 * 16^7 * 2^4 * 2^3
x2 = 2 * 16^6 * 2^4 * 2^2
x3 = 3 * 16^5 * 2^4 * 2^1
x4 = 4 * 16^4 * 2^4
x5 = 5 * 16^3 * 2^3
x6 = 6 * 16^2 * 2^2
x7 = 7 * 16^1 * 2^1
x8 = 8 * 16^0 * 2^0
```

```
x1 = 1 * 16^7 * 2^7
x2 = 2 * 16^6 * 2^6
x3 = 3 * 16^5 * 2^5
x4 = 4 * 16^4 * 2^4
x5 = 5 * 16^3 * 2^3
x6 = 6 * 16^2 * 2^2
x7 = 7 * 16^1 * 2^1
x8 = 8 * 16^0 * 2^0
```

```
x1 = 1 * 16^7 << 7
x2 = 2 * 16^6 << 6
x3 = 3 * 16^5 << 5
x4 = 4 * 16^4 << 4
x5 = 5 * 16^3 << 3
x6 = 6 * 16^2 << 2
x7 = 7 * 16^1 << 1
x8 = 8 * 16^0 << 0
```

```
AAAABBBB CCCCDDDD EEEEFFFF GGGGHHHH
```

```
0AAAA0BB BB0CCCC0 DDDD0EEE E0FFFF0G GGG0HHHH
```

```
void convert(unsigned char five[], unsigned char four[]) {
four[0] = (five[0] << 1) & 0xF0 // 11110000
| (five[0] << 2) & 0x0C // 00001100
| (five[1] >> 6) & 0x03; // 00000011
four[1] = (five[1] << 3) & 0xF0 // 11110000
| (five[2] >> 4) & 0x0F; // 00001111
four[2] = (five[2] << 5) & 0xE0 // 11100000
| (five[3] >> 3) & 0x10 // 00010000
| (five[3] >> 2) & 0x0F; // 00001111
four[3] = (five[3] << 7) & 0x80 // 10000000
| (five[4] >> 1) & 0x70 // 01110000
| (five[4]) & 0x0F; // 00001111
}
```

```
08 42 10 84 21 11 11 11 11
10 84 21 8C 63 22 22 33 33
52 D8 D0 88 64 AB CD 12 34
21 4E 84 98 62 45 78 96 32
7B DE F7 BD EF FF FF FF FF
```