Figure 2-2. card coding – MagTek TTL User Manual
Page 13
Section 2. Encoding
9
Before the first character (or more specifically, the first series of bits that define the desired first
character) can be encoded, a Start Sentinel character needs to be encoded. The Start Sentinel is a
defined series of bits, which signal the start of the data bits. Track 1 Start Sentinel consists of
seven bits (as all characters on Track 1). Track 2 and 3 Start Sentinel consists of five bits (as all
characters on Track 2). As an example, the Track 2 Start Sentinel code is: 11010.
After the last data character is encoded, an End Sentinel must be encoded. The End Sentinel is a
defined series of bits, which signal the end of the data bits. Immediately after the End Sentinel, a
special error checking character is also encoded. This error checking character is called the LRC
- Longitudinal Redundancy Check character. For further details see Section 3.
Before the Start Sentinel character and after the LRC character, “clocking bits” are encoded.
These clocking bits provide card readers with timing to start their synchronization process before
encountering the start sentinel (or end sentinel for reverse reading). Figure 2-2 illustrates the
relative location of all the characters previously discussed.
This means that if the character has an odd number of one bits in the character code for that
character, the parity bit is then a zero bit. On the other hand, if the character has an even number
of one bits in the character code for that character, the parity bit is a one bit causing the total
number of one bits to be odd. Thus the term odd parity.
Figure 2-2. Card Coding
Note: In this example, Start Sentinel is Hex B, End Sentinel is Hex F, and LRC is Hex F.
Note that as you look at the diagram, while not to scale, the encoded information does travel
from right to left along the length of the magnetic stripe. See Appendix A.