Set carry, sign, overflow, and zero flags