Tracks 2 and 3 data format – MagTek TTL User Manual

Page 8

Advertising
background image

I/O Interface for TTL Magnetic Stripe Readers


4

Calculating odd parity and LRC, for the message AT3:

P

32 16 8 4 2 1

Hex Value, Decimal Value

Less Parity Less Parity


Start sentinel %

1

0 0 0 1 0 1

05 hex

05 (4+1)

A

1

1 0 0 0 0 1

21 hex

33 (32+1)

T

0

1 1 0 1 0 0

34 hex

52 (32+16+4)

3

0

0 1 0 0 1 1

13 hex

19 (16+2+1)

End sentinel: ?

0

0 1 1 1 1 1

1F hex 31 (16+8+4+2+1)

___________

___

__

LRC

<

0

0 1 1 1 0 0

1C hex

28 (16+8+4)


Calculating odd parity: scan each horizontal row and enter a zero or one In the P column so that
each row has an odd number of one's.

To find the LRC: disregard the parity bits, scan up each vertical column, and make sure that each
column has an even number of one's in it. Enter a zero or one in the LRC position, so that it
does. If you are using a computer to calculate the LRC, use the "Exclusive OR" function. Next,
calculate odd parity for the LRC character, in the horizontal direction.

TRACKS 2 AND 3 DATA FORMAT


The following is typical for Track 2 and Track 3 data.

The Track 2 and 3 data formats include the following items:

1. Leading clocking zeros: Approximately 22 (Track 2) or 62 (Track 3)
2. The start sentinel (hexadecimal "B")
3. Up to 37 (track 2) or 104 (track 3) hexadecimal numeric characters selected by the user
4. The end sentinel (hexadecimal "F")
5. The LRC (longitudinal redundancy check character)
6. Trailing clocking zeros: A minimum of 22 (track 2) or 62 (track 3)
to the end of the card

Each data character is in a 5-bit (4 plus parity) numeric format. The data is in the format "parity,
8, 4, 2, 1". Parity is odd (an odd number of one's in each character).

The character is written "backwards" on the card starting with the least significant bit and ending
with the parity bit. The card data format Is "1, 2, 4, 8, parity".

Example: The data message "123" is encoded on the card as follows:

Advertising