in reply to Re: Bitwise AND with large numbers
in thread Bitwise AND with large numbers
In this case only the first port is a member and the second port is NOT a member. Therefore the $result should be 0my $switchPortNumber = 2; # 32 Character hex string from switch my $hexstring = hex '40000000000000000000000000000000'; my $mask = (0x80000000000000000000000000000000 >> $switchPortNumber); my $result = ($hexstring & $mask) > 0;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Bitwise AND with large numbers
by Eliya (Vicar) on Apr 16, 2012 at 17:12 UTC | |
by mdej (Initiate) on Apr 20, 2012 at 08:20 UTC |