Help for this page

Select Code to Download


  1. or download this
    my $hex    = hex("1c023d64");
    my $mask   = 31 << 5;
    ...
    printf "Hex:    %30b\n", $hex;
    printf "Mask:   %30b\n", $mask;
    printf "Result: %30b (%d)\n", $result, $result;
    
  2. or download this
    Hex:     11100000000100011110101100100
    Mask:                       1111100000
    Result:                           1011 (11)