Why two readers show different numbers for the same card
An ISO/IEC 14443 Type A chip transmits its UID byte 0 first during anti-collision, and a PC/SC desktop reader answering FF CA 00 00 00 (PC/SC Part 3 §3.2.2.1.3) returns the bytes in that exact order (MSB→LSB). By contrast, many keyboard-wedge USB readers and Wiegand door readers treat those four bytes as a 32-bit little-endian integer (reversing bytes 3..0 before converting to 10-digit decimal, widely called 8H→10D or IK2).
Here is how the single 4-byte UID 04 A1 B2 C3 appears across common reader and card-printing conventions:
| Convention | Output for 04 A1 B2 C3 |
|---|---|
| Hex — normal (MSB→LSB, PC/SC FF CA 00 00 00) | 04 A1 B2 C3 (04A1B2C3) |
| Hex — reversed bytes (LSB→MSB, 8H) | C3 B2 A1 04 (C3B2A104) |
| 10-digit decimal — reversed bytes (8H→10D / IK2) | 3283263748 |
| 10-digit decimal — normal bytes (MSB→LSB 10D) | 0077705923 |
| Card print 3D+5D & 8D (from 8H→10D lower 24 bits) | 178,41220 · 8D: 11706628 |
| Card print 3D+5D & 8D (from MSB bytes 1..3) | 161,45763 · 8D: 10597059 |
| Wiegand 34-bit (MSB→LSB 32-bit payload) | 0x009436587 (0000001001010000110110010110000111) |
EM4100 / EM4200 40-bit IDs and 3D+5D card shell printing
Read-only 125 kHz EM4100 and EM4200 cards carry 40 data bits inside a 64-bit Manchester frame: an 8-bit version or customer header byte followed by 32 data bits (D0 D1 D2 D3). Clamshell and PVC proximity cards normally print the lower 32 bits as a 10-digit decimal (8H→10D) alongside the lower 24 bits split into a 3-digit facility code (D1, 0–255) and a 5-digit card number (D2..D3, 0–65,535) for 26-bit Wiegand controllers:
| EM4100 / EM4200 format | Output for 01 00 BC 61 4E |
|---|---|
| Full 40-bit ID (10H: 1B version + 4B data) | 01 00 BC 61 4E (0100BC614E) |
| Standard 10-digit card print (8H→10D) | 0012345678 (8H: 00BC614E) |
| Wiegand 26 print (2H+4H → 3D,5D) | 188,24910 |
| 24-bit decimal print (6H→8D) | 12345678 |
| Reversed 32-bit data (LSB→MSB 10D) | 1315027968 |
Programmable 125 kHz chips such as T5577 and EM4305 can be encoded at the factory to output a specific 26-bit H10301 or 40-bit EM sequence; share your facility code, starting serial and reader model when requesting encoded samples.
How 26-bit and 34-bit Wiegand parity bits work
In the open 26-bit Wiegand format (SIA AC-01 / H10301), 24 payload bits (8-bit facility code + 16-bit card number) sit between two parity bits:
- Leading even parity (bit 25): set to
1if the upper 12 data bits (all 8 facility-code bits plus the top 4 card-number bits) contain an odd number of1s, making the 13-bit group even. - Trailing odd parity (bit 0): set to
1if the lower 12 data bits (the bottom 12 card-number bits) contain an even number of1s, making that 13-bit group odd.
Standard 34-bit Wiegand applies the same rule across a 32-bit card identifier: even parity over the upper 16 data bits, and odd parity over the lower 16 data bits.