Determine the value for the 4bit net A after each Verilog co
Determine the value for the 4-bit net \'A\' after each Verilog continuous assignment statement assign A = (2\'b10 ? 4\'b1111: 4\'b010l);________ assign A = 4\'b1010;_______ assign A = {2\'b11, 3\'b010};________ assign A = 4\'b1100 amp 0011;_____ assign A = !4\'b101;______
Solution
ANSWER:
a. The question is not correct. assign A = B ? C : D. This kind of statement can be used only when B is of a single bit or is a logical 0 or 1.
For eg assign out = (sel==3’d0) ? in0 : in2; is permitted since sel==3\'d0 given a logical 0 or 1 always.
b. Let A be denoted as A3A2A1A0, where A3, A2, A1, A0 denote every bit of A. After the execution, A turns to
A3\'A2A1\'A0
c. A = 4\'b1010 since A is a 4-bit number
d. A = 4\'\'b0000;
e. A = 4\'b1010;
If you have any questions, let mw know. I wil answer them for you.
