RFID tags store one 24-digit hexadecimal number.

Why use a single 24-digit hexadecimal number?

  • 5
    \$\begingroup\$ "Why not?" is a response that puts itself forward. \$\endgroup\$ – Anindo Ghosh Nov 20 '12 at 2:44
  • \$\begingroup\$ RFID EPC string are 96 bits long == 24 hex digits \$\endgroup\$ – Andrew Nov 20 '12 at 7:46

They don't. They store a number which is internally represented as binary and transmitted as binary. There is no hexadecimal here.

Humans have a hard time grasping numbers with large number of digits. We therefore often represent large binary numbers in hexadecimal when intended for human understanding. We have gone so far as to make the tools we interface directly to, like assemblers and compilers, interpret hexadecimal numbers for us. However, none of this has anything to do with the representation inside the RFID chip, which is purely binary.

The following numbers are all equal:

  15F4B3D2 hex
  368358354 decimal
  00010101111101001011001111010010 binary

What do you think the chance of human error is in manipulating the last one compared to the first one?


Technically it stores a 96 bit binary number, and hex happens to be the most convenient way to express that number to humans.

Digital systems see everything in ones and zeros. If the number was in decimal it would have to be represented as binary in the hardware anyway.

e: If you're asking why it's 24-digits, I assume it was chosen because that will allow for us to keep making RFiD tags without ever repeating an identifier if we don't want to. There are 24^16 = 12 sextillion possible combinations of IDs, which is roughly the number of grains of sand on earth. We will never run out, or at least never in the amount of time that RFiD is still a relevant technology. 24 also happens to be 12 (my mistake) bytes, which is a nice number for current electronics and software.

ee: Wowee my math was awful. That'll teach me to type faster than I'm thinking. Also, it appears the RFiD number is split up into categories whose length were determined by how many unique IDs the standards committee wanted to be able to support in each. See this PDF I found on Google for more details.

The RFID standards


As a side note regarding "RFiD tags store one 24-digit hexadecimal number":

There are many different types of RFID tags. Mifare Classic in its initial form only used a 4-byte UID and was later extended to 7-Byte since it wasn't sufficient. The newer types like Desfire (7-Byte) normally use at least 7 Bytes.

  • \$\begingroup\$ No, the number is not stored as a "hex array", whatever that means anyway. It is stored as a bunch of bits. It is only the humans that like to express these bits in HEX. And endian-ness is not a distinction between decimal, binary, hexadecimal, or any other radix. Either way, you still have to know which end of the binary number is the LSB and which is the MSB. The radix is not a factor in this. \$\endgroup\$ – Olin Lathrop Nov 20 '12 at 20:34
  • \$\begingroup\$ You are right, my answer was confusing. I failed to properly phrase what i wanted to say. Since the question has been answered properly i cut my answer down. \$\endgroup\$ – Rev1.0 Nov 21 '12 at 10:28

Binary numbers which are logically subdivided into logical bitfields are frequently written in hex or octal, because it's easy to parse out the bitfields from such strings, even without the benefit of a calculator or computer. Hex numbers make it especially easy to parse out bitfields whose length is a multiple of four (octal numbers make it easy to parse multiple-of-three bitfields, but those are less common). For proximity tags (predecessor to modern RFID) which used lengths of up to 37 bits, it was very common for readers to output the data as octal digits. Although hex is in many ways preferable, devices that expect data from magnetic cards are often restricted to using digits 0-9. Such devices would be unable to accept hex, but have no problem with octal. Even though the octal format is bulkier than hex would be, 37-bit numbers are small enough for that not to be a problem. With 96-bit numbers, however, the extra bulk of using 32 octal digits versus 24 hex digits makes the former less desirable.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.