林楷宸

@dppa1008

Joined on Jun 8, 2017

  • 8(a). Suppose Y is a 32-bit singned binary number. Please assign 1'b1 to Neg if Y is negatvie, otherwise assign 1'b0 to it. Write down the code frament.(You are not allow to use any operator, including &,|, +, if else, (condition)? : ...) input [31:0] Y; ... assign Neg = ...; :::info ANS assign Neg = Y[31];
     Like  Bookmark
  • Suppose A is a 4-bit binary number declared with type wire. How can we assign a value of 3 to it? Please write down the code fragment. (2pts) Suppose B is a 4-bit binary number declared with type reg. How can we assign a value of 3 to it? Please write down the code fragment. (2pts) What is the difference between ! and ~ ? Please explain it with an example.(2pts) What is the function of the following code.(Hint. Why should we add the following code in a testbench?) (3pts) module tb(); initial begin
     Like  Bookmark