I was wondering why bitRead() starts at the rightmost bit

A byte is an array of 8 bits.

Wrong. A byte has 8 bits but it is not an array

Here is a decimal number 1234

It has 4 digits, thousands, hundreds, tens and ones in that order

Highest significant digit on the left, least significant digit on the right

Here is a 4 digit binary number 1011

It has 4 digits, eights, fours, twos, and ones in that order

Highest significant digit on the left, least significant digit on the right

Would you suggest writing one thousand two hundred and thirty four as 4321 ?

The bitRead() reference page puts it like this

x: the number from which to read.

n: which bit to read, starting at 0 for the least-significant (rightmost) bit.

bitRead() reads the least significant bit with an index of zero and so on through the bits, right to left (least significant to most significant). You could, of course write your own function to read bits of a byte left to right but you would not get the correct answer

Try

```
bitValue = bitRead(byteValue, 7 - bitIndex);
```