Logical NOR - how to achieve, best practice
Posted: Tue Oct 01, 2013 7:18 pm
Hi guys,
Previously Jonny has suggested avoiding using too many Logical Operators as they could potentially cause lots of branches and unpredictable behavior during compiling.
What is a good practice method of returning 1, when both source variables are 0?
Although the variables will be whole bytes, only the first bit is ever used...so can I get away with bitwise?
Output = Input1 NOR Input2 ??
Output = Not ( Input1 OR input2)
thanks, J.
Previously Jonny has suggested avoiding using too many Logical Operators as they could potentially cause lots of branches and unpredictable behavior during compiling.
What is a good practice method of returning 1, when both source variables are 0?
Although the variables will be whole bytes, only the first bit is ever used...so can I get away with bitwise?
Output = Input1 NOR Input2 ??
Output = Not ( Input1 OR input2)
thanks, J.