switching a 0 to a 1 and so on...
Reach
Posts: 107
In Spin
What is the simplest way to flip a bit 0 ot a 1 in a variable long without changing the other bits. As well as switch a 1 to a 0.
Example
Temp := 0000,0000,0000,0000,0000,0000,0000,0000
Now I want to turn bit 3 from a 0 to a 1
Temp := 0000,0000,0000,0000,0000,0000,0000,0100
What is the simplest way to flip a bit 0 ot a 1 in a variable long without changing the other bits. As well as switch a 1 to a 0.
Example
Temp := 0000,0000,0000,0000,0000,0000,0000,0000
Now I want to turn bit 3 from a 0 to a 1
Temp := 0000,0000,0000,0000,0000,0000,0000,0100
Comments
I dont have my propeller kits - power on the sail boat is low and so I am trying to do a little something with that code up there. I needed someone to run that code for me but I can wait for sun to charge my battery's. In fact my laptop is almost dead.