You may find your problem by just putting together a snippet of code for us to look at, as Grandfather
suggests, but if you don't find it, this forum will then have something to work with. As an additional way to characterize the problem, you might try the following command lines:
perl -e print(pack('II',0x085c,0x5c080000)); > temp.pk
perl -e "print(pack('NN',map($_*2,unpack('II',<>))));" > temp2.bk
perl -e "printf('%8x:%8x',unpack('NN',<>));" temp2.pk
produces --> 10b8:b8100000 (as expected)
They look like they do what you describe, but the numbers come out as expected, at least on my windows box. If the numbers come out right on your system, then take a look at what you're doing that's different from the examples, or show us and someone here will certainly take a look at it.