# How to convert RFID UID from 10-digit type to comma separated type

I am creating application which needs to read RFID tag.

In this application RFID UID is saved in comma separated type(ex. 23,192,251,159,179).

But I have a reader which is getting that information in 10-digit type(ex. for same RFID tag is 2684076055).

I need to get formula to convert it from type to another.

Does anybody know how to convert it?

• you could use a byte counter to insert a comma after a certain count is reached, i.e. first 2, and then 3 numbers each – QuickishFM Jul 2 at 17:40
• Do you think that there is formula to convert "2684076055" to "23,192,251,159,179" ? I would need that because my RFID reader is only giving me this number "2684076055". – Jakov Kusić Jul 2 at 17:44

1. Convert the RFID (2684076055) to hexadecimal: 9FFBC017
2. Convert the bytes (9F FB C0 17) to decimal: 159 251 192 23
3. Reverse the list and add commas: 23, 192, 251, 159

Your integer seems to be missing a few digits. The 179 isn't there - one byte worth of RFID is missing.

Alternatively, you could use bit operations to isolate specific bytes (AND with specific values) and right shifting to move each byte down tothe lowest eight bits of the integer and assemble your RFUID from that.

This is programming and math, and has little that is specific to electrical engineering.

First part of answer by JRE is correct, but it is possible to get 179 by using XOR.

179 = 159 XOR 251 XOR 192 XOR 23

• Ah. The 179 is a checksum, then. – JRE Jul 3 at 12:22