06-21-2003, 08:59 AM
Good example re circuit construction.
Your second example about doing things the long way reminds me of my favorite example which is for using a flip/flop switch. If the switch is on (a one), you want to turn it off. If the switch is off (zero), you want to turn it on.
Much simpler and no need to debug several if's.
*****
Your second example about doing things the long way reminds me of my favorite example which is for using a flip/flop switch. If the switch is on (a one), you want to turn it off. If the switch is off (zero), you want to turn it on.
Code:
flipflop = flipflop xor 1
*****