I want to be able to change specific bits in a byte from a 1 to a 0
for example
uint8_t _data = 0b11111111; (Change bit 1 and 7 to 0)
_data = 0b10111110;
I was planning on building a input system with a shift register and being able to find a way to change specific bits in a byte of data would basically complete this mini project for me. I've been stuck trouble shooting for days over this so any help would be very appreciated. Thanks in advance.
It is simple bit manipulation. For example, if you want to set bit 3 you can do it like this.