Help for this page

Select Code to Download


  1. or download this
    $D1 = ($num >> 7) & 0x01;  # 1 bit  starting at bit 7.
    $D2 = ($num >> 4) & 0x07;  # 3 bits starting at bit 4.
    $D3 = ($num >> 0) & 0x0F;  # 4 bits starting at bit 0.
    
  2. or download this
    @D = map { unpack('C', pack('b*', $_)) } unpack('b1b3b4', 162);