05-02-2013 12:01 AM
Hello,
While working with labview i tried to apply OR Gate on Numeric Data, it accepted the input and replied the output in Numeric form too.
I couldnt understand how is it working on a numeric data while the input are supposed to be boolean for the logic gates input.
The outputs are also out of the assumption at 5 || 4 gives result 5.
I am also attaching my VI.
Kindly inform what is the logic behind this calculation.
Regards
Solved! Go to Solution.
05-02-2013 02:04 AM - edited 05-02-2013 02:05 AM
I am not sure how it is done but when I did the same logical operation by converting the number to Boolean array the result is same. So I guess internally LabVIEW converts the number to boolean array and performs Logical operation and back converts it. In your example additionaly it converts DBL to I 32 and does the logical operation.
05-02-2013 02:45 AM - edited 05-02-2013 02:49 AM
Hi,
logical operations work with integers (any kind will do) too. The integer is used bitwise...
The outputs are also out of the assumption at 5 || 4 gives result 5.
5 is "0101" in binary representation, 4 is "0100":
0101 OR 0100 ____ 0101 result