# Encodings overview

Reading a number from a card isn't possible without knowing its encoding. The reason is that one and the same number can be understood in many different ways - and only the encoding can tell you which meaning is intended:

To spare you as many details as possible, we've created a step-by-step guide to help you find out the encoding of your project cards. However, if you'd like to dive deeper into this topic, then please read on here.

We explain the following terms the way we use them at BALTECH. They may have different meanings in different contexts.

## What is encoding?

All data is ultimately a sequence of zeros and ones. Encoding assigns a specific character (e.g. a number) to such a sequence, thus making it actually readable. There are various different ways to encode data. The ones relevant in our context are the following:

## Binary

Binary encoding groups the digits (referred to as "bits") to blocks of 8 (referred to as "bytes"). Such a byte can have a total of 256 possible combinations and can thus represent a wide variety of different characters.

The actual meaning, i.e. the number behind it, depends on the order in which the bits are read.

### MSB first

MSB first stands for Most Significant Bit first. This means that the bytes are read in the order they appear, i.e. from left to right. In the example above, this produces the decimal number 12594.

### LSB first

LSB first stands for Least Significant Bit first. With this option, you get a mirror reflection of the bytes: The order of bytes is reversed, i.e the last byte is read first. In the example above, this produces the decimal number 12849.

Rotate Bytewise

To cater for this reversed order, there's the Rotate Bytewise option in the RFID interface component.

## ASCII

ASCII stands for American Standard Code for Information Interchange and is another way of assigning characters to bytes. Here, a character is defined by 7 bits, which allows for the representation of 128 different characters. The remaining bit is the "parity bit" used for error checking. (Nowadays it can also be used to allow ASCII to represent additional characters. This is known as extended ASCII.)

The actual meaning of an ASCII bit sequence depends on whether it's represented as a decimal or hexadecimal number.

This is the encoding you see when you test the RFID interface in BALTECH ID-engine Explorer (learn more).

### Decimal (DEC)

Decimals are the representation we use in everyday life. Here we can use the 10 characters 0-9 to represent any number.