05-27-2008 09:54 AM
05-27-2008 10:05 AM - edited 05-27-2008 10:05 AM
05-27-2008 10:11 AM
05-27-2008 11:16 AM - edited 05-27-2008 11:17 AM
fabb wrote:
Anyone know how to compare an incoming number and tell whether it is odd or even? How about if it is whole or fractional? Thanks
04-01-2010 09:30 AM
A no more efficient, but somewhat more compact take on the problem.
09-19-2011 12:55 PM
Oddly here is an even more compact version (based on above code)
If it saves 3 seconds 33 times to 3 people my 5 minute time investment will start making profit!
09-19-2011 01:23 PM
Why would you need two outputs? Knowing one output let's us conclude the state of the other.
09-19-2011 01:48 PM
Convenience, personnal preferences and code clarity. Helps to not unavoid reverse logic that can be harder to comprehend. At least for me. Even if i not do not know that they are not unequal, i prefer lookin for even numbers than for not odd one in particular complex compound arithmetics operations.
Oddly again, it made me think that it would evenly be clearer if they were 2 distinct VIs.
03-06-2018 07:06 PM
Anyone know which is more efficient on the FPGA? The AND or the bitshift?
03-06-2018 07:17 PM
Since a bit shift is mostly just a routing issue in an FPGA, I would guess that would be more efficient. The AND would only use 1 gate, so it would be practically free as well. You will have much bigger things to save fabric with.