in reply to LSB to MSB
Have a hex value of 6bf 0110 | 1011 | 1111
What you really have is
6b f0
I've looked at "pack/unpack" but cannot figure it out.
Show your efforts. Usually, pack/unpack aren't used for flipping bits, you use & or | for that, see perlop
Your title hints what you really are talking about is
or$ perl -le " print unpack 'H*', pack 'h*', '6bf'; b60f
$ perl -le " print join ' ', split /(....)/, unpack 'b*', pack 'h*', ' +6bf'; 0110 1101 1111 0000 $ perl -le " print join ' ', split /(....)/, unpack 'B*', pack 'h*', ' +6bf'; 1011 0110 0000 1111
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: LSB to MSB
by Eliya (Vicar) on Aug 07, 2011 at 07:17 UTC | |
by Anonymous Monk on Aug 07, 2011 at 07:57 UTC |