Here, b will get "0" as the if condition fails here. Generally in the case of failing "if" .... else will get executed."else" doesn't look for any condition..failing of "if" is enough for "else" to get the execution.
If this is for a non-synthesizable code, then it's going to have a value of 0. but if this is a synthesizable code then after synthesis it's still 'X'.
stevepre is correct. Put it in another way: if you're answering your final test, write down 'b = 1' if you're facing real problem in your design, particularly for PL simulation, you will get 'x'.
Hi,
it's definitely 0 because if statement will see only condition is satisfied or not , and X will be treated as condition is not satisfied so b will be always 0.