I am reading values from a couple of pins as so x= ROM_GPIOPinRead(BUTTONS_GPIO_BASE, ALL_BUTTONS)
ALL_BUTTONS is defined as (LEFT_BUTTON | RIGHT_BUTTON)
LEFT and RIGHT BUTTON are there on pins on the same port
BUTTONS_GPIO_BASE is defined as GPIO_PORTC_BASE
From my understanding x is a group of bits.How can I invert just 1 bit from x? For example if x= 0011100. I want invx=0011000. Where the third bit is inverted.