my $h = unpack( 'H*', pack('b*', unpack('B*', scalar reverse $bitstring)) ) ;