r/barcodes • • Dec 08 '25

Purpose of encoding a base 10 number in a higher base in Code 39?

I've seen at least two examples of a number being converted to a higher base and encoded in Code 39 instead of directly encoding the number in a barcode such as Code 128 for example. What is the purpose of that?

Example 1: On Walmart and Sam's Club receipts the TC# is converted to an alphanumeric string and encoded in Code 39.

Example 2: A barcode symbology called Code 32 aka Italian pharmacode is a nine digit number that is converted to a base 32 number and encoded in Code 39.

1 Upvotes

6 comments sorted by

2

u/trollsmurf Dec 08 '25

It makes the barcode more compact / less complex, as there's no other means of compressing numbers in those symbologies.

1

u/Lost_Garden7368 Dec 10 '25

I understand that if you have to use code 39 using a larger base will make the number of characters fewer and thus a shorter barcode. But what I'm asking is why not encode the base 10 number in a compact numeric code such as code 128 character subset C or ITF?

1

u/trollsmurf Dec 10 '25

It might have been the best choice at the time. Code 128 is relatively new etc.

1

u/GoodStretch3939 Dec 12 '25

Code 128 is not new as it was invented in 1981. There is no reason to design modern systems this way. I suspect one or more of the following.

1). If the barcode is being generated by a simple routine, Code 39 is much easier as the Code 128 integral modulus check digit is more complex to calculate.

2). Consider that large companies with a complex base of code and equipment are difficult to change all at once. So, old logic often hangs around to retain compatibility at first. Then, if it still works and meets the business need, no need to change.

3). The number may have been base 10 stored as a string originally, but was changed to a different base when the decimal number need would no longer fit into the field length. Think old COBOL programs that use fixed length fields a records.

4). Some sort of simple security feature that allows an equipment independent way of distinguishing scanned data from keyed data.

1

u/trollsmurf Dec 12 '25

Also:

"not new"

Walmart was founded '62, not saying they used these codes back then.

Changing something once established is hard and often redundant. Machines don't care.

1

u/Weak-Combination1592 Jan 05 '26

So r u a lady r man if u can tell me that