Easy was to determine a number is odd or even? 
Author Message
 Easy was to determine a number is odd or even?

Is there a function to determine it a number is even or odd?  If not,
has anyone created one to do so?


Sat, 25 Jun 2005 02:47:57 GMT  
 Easy was to determine a number is odd or even?
Use the remainder quotient function and divide by two.

If the remainder is "0" it is even.

Ben



Sat, 25 Jun 2005 02:50:46 GMT  
 Easy was to determine a number is odd or even?
Or use the boolean AND function and AND the number
with a constant 1.  (If the number and the 1 are both
integers, labview will do a bit by bit AND.)
I don't know the LabVIEW internals,
but I would think the operation would be faster doing
one boolean rather than division and remainder.




Sun, 26 Jun 2005 00:52:09 GMT  
 Easy was to determine a number is odd or even?
There is also the "Rotate right with carry". The carry bit will be
true if odd (:<)).

Ben



Sun, 26 Jun 2005 01:02:40 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. determine whether a number is odd or even

2. number representations (was: even vs. odd numbers)

3. Even/odd week number

4. even vs. odd numbers

5. I am not deaf, but am I mute?

6. C-level routine to determine what procedure I am in

7. Super URGENT Request - Easy answer I am sure

8. J: Even and Odd

9. Odd and Even conjunctions

10. Odd and Even functions missing in RB

11. Printing Odd or Even page only

12. Odd or Even

 

 
Powered by phpBB® Forum Software