63. Functions and Tasks Basics

Question.4

What exact binary sequence securely occupies the 5-bit vector res?

function [3:0] add_wrap(input [3:0] a, input [3:0] b);
    add_wrap = a + b + 1;
endfunction

wire [4:0] res = add_wrap(4'h8, 4'h8);

 

Need Help? Refer to the Quick Guide below

Select Answer