http://www.perlmonks.org?node_id=968138

BIT operations -- http://www.perlmonks.org/?node=Bit+operations+for+beginners