InterviewSolution
| 1. |
What Is The Difference Between === And == ? |
|
Answer» output of "==" can be 1, 0 or X. When you are comparing 2 nos using "==" and if one/both the numbers have one or more bits as "x" then the output would be "X" . But if use "===" outpout would be 0 or 1. e.g A = 3'b1x0 "==" is used for comparison of only 1's and 0's .It can't compare XS. If any bit of the input is X output will be X "===" is used for comparison of X also. output of "==" can be 1, 0 or X. When you are comparing 2 nos using "==" and if one/both the numbers have one or more bits as "x" then the output would be "X" . But if use "===" outpout would be 0 or 1. e.g A = 3'b1x0 "==" is used for comparison of only 1's and 0's .It can't compare Xs. If any bit of the input is X output will be X "===" is used for comparison of X also. |
|