Help for this page

Select Code to Download


  1. or download this
    $ perl5.6.2 -we'$x = "\x01"; printf "%0v8b", $x'
    00000001
    $ perl5.6.2 -we'$x = "\x01\x02"; printf "%0v8b", $x'
    00000001.00000010
    
  2. or download this
    $ perl5.6.2 -we'$x = "\x01\x02"; $binary = sprintf "%0v8b", $x;
    > $binary =~ tr/.//d; print $binary'
    0000000100000010