Talk:RM4SCC
Add topic| This article is rated Start-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||||||
| ||||||||||||||||||
The table shows alphas before numerics which is wrong. I've created a corrected version but don't know how to replace the original. My version: http://commons.wikimedia.org/wiki/Image:Rm4scc.svg
I've also written a GPL Perl routine to calculate the barcode text string. Can I add sample code to a page ?
Combination statement false
[edit]"An individual bar can be short, extend upwards, extend downwards, or extend both up and down. These four possibilities are reflected in the "four-state" name of the encoding. Each character is then made up of four of these bars. There are 36 possible combinations like this, and so 36 symbols:"
4 digits/bars which have each 4 states does not yield 36 combinations; it yields 256 combinations. The PO may only use 36 of them, but that's not what it says. Don't learn maths from Wikipedial, folks.
In fact, the patterns used by the code are restricted downwards from 256 by other required conditions. Each character sequence has to have 2 bars which extend upwards (either the upwards short bar, or the long bar) and, similarly, 2 bars which extend downwards. This gives 6 combinations of upward-extending bars, and 6 of downwards. 6*6=36 - that's where the 36 comes from.
Checksums and multiples of 6
[edit]Long time listener, first time caller.
I discovered a possible error in the table in the Checksum section, namely that if either of your checksum halves % 6 = 0 it is impossible to decode a checksum character from the lookup table.
According to This Document Appendix C on page 75, the numbering of both the rows and columns is actually 1 2 3 4 5 0 which makes the above case solvable. I don't know if I'm being silly, not looking hard enough, or what, but I didn't see mention of 6 being treated as 0 anywhere in the article, and was therefore unable to compute my own checksum until I discovered the document and it all became clear.
To demonstrate, using the number 6 for the last column:
mojibake9
454422432 sum 30 %6 = 0
512165334 sum 30 %6 = 0
creates a situation where the checksum character needs to be found in the nonexistent location 0,0
Treating the last column as 0 and contriving another situation where the total is 30:
mojibake44
4544224311 sum 30 %6 = 0
5121053355 sum 30 %6 = 0
and it no longer matters as location 0,0 exists in the lookup table and we can say that Z is our checksum. ~2026-35904-88 (talk) 13:31, 20 June 2026 (UTC)