int number= 0b11001100;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
number ^= 1 << 2;
delay(100);
Serial.println(number,BIN);
}
since we count from zero the 3rd last bit will toggle
No comments:
Post a Comment