$toAdd = (BIT1 | BIT4 | BIT7); $old = getOld( X ); $new = $old | $toAdd; put( X, $new );