Use bitmask instead of power operator in serialising HALT