#!/usr/bin/perl -wl my $n = 0x82; printf "%08b\n", $n; printf "%08b\n", $n >> 6; # 2 msb printf "%08b\n", $n & 0x3f; # 6 lsb __END__ Prints: 10000010 00000010 00000010
--
John.
In reply to Re: converting hex to decimal
by jmcnamara
in thread converting hex to decimal
by da97mld
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |