Regarding Microchip XC8 compiler's registers and bits definitions
Bit addressing uses the lower 3 bits of the address to point to the bit within a byte. 

So the bit is number (RB1 &amp; 0x07) or 1 in your example, the byte address is (RB1 >> 3), or 0x06 in your example.