int value = 0b00000000; // initial value with all bits set to 0
void setup() {
Serial.begin(115200); // Start serial communication
// Print the initial value
Serial.print("Initial Value: ");
Serial.println(value, BIN);
// Toggle the 1st bit (0-indexed, so 1st bit is at position 0)
value ^= (1 << 0);
// Toggle the 3rd bit (0-indexed, so 3rd bit is at position 2)
value ^= (1 << 3);
// Print the modified value
Serial.print("Modified Value: ");
Serial.println(value, BIN);
}
void loop() {
// No need for anything in loop for this example
}