my $x = 0xFF; # 0x18 == 24, the max value of both bits # 4-3 set printf("%b\n", &= ~0x18); __END__ 11100111