val = cond ? a : b, using bit masking.
val = cond ? a : b, using bit masking.