## MSB and LSB in Card ID Format

There is the **Card ID Format** section on the **Device** page:

How do the settings of the byte and bit orders affect card reading?

In most cases, we set both orders to MSB. This means that we want to read the most significant bit and byte first. Let's say that we have a MIFARE Classic card whose card number is 3,829,098,359. If we read the card when both orders are set to MSB, the resulting card number is 3,829,098,359. If we convert this number to a binary number, it will be as follows:

11100100 00111011 01100111 01110111

Now we will see how the card number changes after changing the bit order to LSB. The resulting number read from the device will be 4,008,107,047, which is 11101110 11100110 11011100 00100111 in the binary number.

You may have noticed that the number is the opposite of the original number. If you read the original number backward, the two numbers are exactly the same.

Now let's change the byte order to LSB and the bit order to MSB. Then, the resulting number is 2,003,254,244, which is 01110111 01100111 00111011 11100100 in the binary number. One byte is 8 bits, so the first byte of the binary number read in the LSB byte order and the MSB bit order is the same as the last byte of the binary number read in the MSB byte order and the MSB bit order.

Lastly, change the byte and bit orders to LSB. The resulting number is 668,788,462, which is 00100111 11011100 11100110 11101110 in the binary number. If you read the number read in the LSB byte order and the MSB bit order backward, the two numbers are the same.