Interview Questions

What is the difference between ...

Electrical Engineering Technical Interview Questions and Answers


(Continued from previous question...)

5. What is the difference between ...

What is the difference between:
c = foo ? a : b;
and
if (foo) c = a;
else c = b;


The ? merges answers if the condition is "x", so for instance if foo = 1'bx, a = 'b10, and b = 'b11, you'd get c = 'b1x.
On the other hand, if treats Xs or Zs as FALSE, so you'd always get c = b.

(Continued on next question...)

Other Interview Questions