What is the value of Numeric Value Out following execution of the VI?
The Number to Boolean Array function outputs an array of 8, 16, 32, or 64 True or False elements (depending on the numeric representation of the input integer). For simplicity let’s assume a U8 data type. 14 in binary is , so we get a Boolean array of: [FFFFTTTF]. The 0th element is the least significant bit, which in this case is the false element on the far right.
As this array is auto indexed into the for loop, only values of the iteration count, i, with a corresponding ‘true’ are auto indexed into the output array. As a result the output array has [1,2,3].
The multiply array elements simply multiplies all the elements in an array and as a result, the value of the numeric value out is simply 1*2*3 = 6.
Answer: B. Nice one all. Yep, as GladysToMeetYou states
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.