Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to add two signals a and b.
VHDL
result <= a [1] b; Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-' instead of '+' will subtract instead of add.
Using '*' or '/' will multiply or divide, not add.
✗ Incorrect
The plus sign (+) is used to add two signals in VHDL.
2fill in blank
mediumComplete the code to subtract signal b from a.
VHDL
result <= a [1] b; Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using '+' will add instead of subtract.
Using '*' or '/' will multiply or divide, not subtract.
✗ Incorrect
The minus sign (-) subtracts one signal from another in VHDL.
3fill in blank
hardFix the error in the code to multiply a and b.
VHDL
result <= a [1] b; Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using '+' or '-' will add or subtract instead of multiply.
Using '/' will divide instead of multiply.
✗ Incorrect
The asterisk (*) is the multiplication operator in VHDL.
4fill in blank
hardFill both blanks to divide a by b and assign to result.
VHDL
result <= a [1] b [2] 2;
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using '+' or '-' instead of '*' for multiplication.
Using '*' or '+' instead of '/' for division.
✗ Incorrect
Use '/' to divide and '*' to multiply in VHDL arithmetic expressions.
5fill in blank
hardFill all three blanks to compute (a + b) * (c - d) and assign to result.
VHDL
result <= (a [1] b) [2] (c [3] d);
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up '+' and '-' operators.
Using '/' instead of '*' for multiplication.
✗ Incorrect
Use '+' to add, '-' to subtract, and '*' to multiply in VHDL.