Hi All

I am hoping someone can give me some explanations on a situation I have.

I will give examples as this is the best way to explain.

I take a decimal number, 401, and convert to 8-character Hex which gives me 00000191

I then break down the hex number into 4 groups of 2 and convert them to binary.

00 -> 0

00 -> 0

01 -> 1

91 -> 10010001

I then CONCATENATE the non-zero binary to get 110010001

If I do a direct Hex to binary using the whole Hex get 110010001,the same as when I broke it down.

Now I do the same for decimal 278

D 278 -> H 00000116

00 -> 0

00 -> 0

01 -> 1

16 -> 10110

CONCATENATE the non-zero binary to get 110110

Direct Hex to binary gets 100010110, which is correct, but not the same.

I tried decimal numbers like 65 and 250 they worked fine.

I tried decimal numbers like 300 and it doesn't work.

If I split the Hex number into 2 groups of 4, then everything is fine.

The problem is that using 2 groups of 4, my max Hex number is limited to < H 200.

What it boils down to is that my method works most of the time, but not all the time, which to me is the same as not working as I will get wrong answers.

Anybody have any ideas.

Thanks