This set of VHDL Multiple Choice Questions & Answers (MCQs) focuses on “Operators – 1″.
1. A VARIABLE y is declared of STD_LOGIC_VECTOR type of 4 bits, if you want to assign 1001 to y, then what is the write assignment statement?
a) y <= “1001”
b) y := “1001”
c) y <= ‘1’, ‘0’, ‘0’, ‘1’
d) y => “1001”
2. In the following statements, y and z are equivalent to________
y <= NOT a AND b; z <= NOT (a AND b);
a) y <= a’+b’ and z <= (a.b)’
b) y <= (a+b)’ and z <= a’+b’
c) y <= a’+b and z <= a’+b’
d) y <= a+b’ and z <= a.b
3. Refer to the VHDL code given below, which is the legal assignment statement?
SIGNAL x: STD_LOGIC; SIGNAL y: STD_LOGIC_VECTOR(3 DOWNTO 0);
4. Which of the following is not an assignment operator?
5. Which of the following logical operator has the highest precedence?
6. Which of the following VHDL statement is equivalent to NAND operation, if y, a and b are SIGNALS?
a) y <= NOT a AND b
b) y <= NOT a OR NOT b
c) y <<= NOT a AND NOT b
d) y <<= NOT (a OR b)
7. The operator ‘&’ is called the_____ operator.
a) Logical AND operator
b) Bitwise AND operator
c) Arithmetic addition operator
d) Concatenation operator
8. What is the type of result of MOD operator?
9. ______ operator is unary as well as binary operator.
10. The operators like =, /=, <, >, >= are called _________
a) Arithmetic operators
b) Concatenation operators
c) Logical operators
d) Relational operators
11. ABS operator is used to _________
a) Shift the operand
b) Gives absolute value for the operand
c) Give the result as nearest integer
d) To synthesize the result
12. What is the type of result for comparison operators?
13. Which of the following is exponentiation operator?