Trying to strip a Byte into specific Bits for testing.

Hi, I am reading an EEPROM on a serially connected device. The read is working fine – it returns one 8-bit Byte. I am now stuck - trying to take this one byte and strip specific bits from it and test them for certain values.

So from the one byte, I want to test bit-0 & bit-1 for a value (switch/case test), discard bit-3 & bit-4, test bit-5 (simple if test) then discard the balance.

I am sure this is easy but just can't get to grips with bit operations - hoping some kind person point me to a close example.

Thanks in advance..

bitRead?

Yep that looks good - how do I add 2 or 3 bits together??

The + operator?

OK - if I say get 3 bits, + operator would give me 3 but it may actually be 7.

..sorry trying to explain something I don't know the terms for..

Are you saying 1+1+1 gives three, but you want to get seven?

bitWrite?

thanks yes that was it - much appreciated..