in reply to hex to binary

0x11e64 == 73316, but as others have asked, what's the raw byte order you are given and what unpack templates have you tried?

Update:

c:\@Work\Perl>perl -wMstrict -le "my $raw = pack 'H*', '641e0100'; my $le32 = unpack 'V', $raw; printf qq{%d decimal 0x%x hex \n}, $le32, $le32; " 73316 decimal 0x11e64 hex

Replies are listed 'Best First'.
Re^2: hex to binary
by Anonymous Monk on Feb 17, 2014 at 04:49 UTC
    The raw bytes out of the file are 641e0100. TBH, i have really no clue right now and have tried the following:
    perl -le 'print unpack("N", pack("H8",substr("0"x8 . "641e0100",-8))); perl -le 'print unpack("N", pack("H8",substr("0"x8 . "641e0100",-8))); +' perl -le 'print unpack("N", pack("H8",substr("0"x8 . "641e01",-8)));' perl -e "print hex('641e0100')" perl -e "print hex('641e01')" perl -e "print unpack('V',pack 'V', hex('641e01'))" perl -e "print unpack('V', '0x641e01')" perl -e "print unpack('N', '0x641e01')" perl -e "print unpack('n', '0x641e01')" perl -e "print unpack('h', '0x641e0100')" perl -e "print unpack('h*', '0x641e0100')" perl -e "print pack('h*', '0x641e0100')"

      Please see update to my original reply.