Which of the following option is completely legal, given that a and b are two UNSIGNED type signals?

Tiên Hương

New member
Which of the following option is completely legal, given that a and b are two UNSIGNED type signals?
A. x <= a + b; y <= a – b;
B. x <= a OR b; y <= a AND b;
C. x <= a + b; y <= a OR b;
D. x <= a OR b; y <= a + b;
 
Answer: a
Explanation: SIGNED and UNSIGNED data types are intended for arithmetic operations mainly and using logical operators with these data types is illegal. Therefore, only option x <= a + b; y <= a – b; is completely legal. In all other options there are logical operations so those can’t be considered as legal.
 

Tìm kiếm

Back
Top