3 ms·
no, having check digits means that some code corresponds to no location and are syntactically wrong.
by kiriakasis 8y ago
no, having check digits means that some code corresponds to no location and are syntactically wrong.
- jacobush 8y agoI realize now I meant some kind of error correcting code, combination. Like this: 1 1 can be followed by either odd numbers or even numbers. If followed by an even number, the next number must be odd. 127 Now if you truncate that to 12, crucially 12 has the same meaning as 11. 1 and 2 to have the same symbol meaning, but are using "sign" to hint at the next number. This will greatly reduce the chance that a random number will pass for a position. This can be made more elaborate, with more or less advanced encodings. The problem is of course that you waste bits on redundancy and so addresses everything else being equal, will have more characters in them.
- arghwhat 8y agoA much less expensive and much more normal solution would simply be to put a single CRC digit at the end. Systems such as what you describe are too complex and non-standard.
- jacobush 8y agoBut then you can not truncate the location.
- arghwhat 8y agoI'd argue that this would never be done by hand anyway. The average user will not understand the encoding, and I doubt many will think "Hmm, I have this plus code, but I'd like to only have 1/20th of the precision." Programmatic truncation would still be very easy, as it would just require a new checksum to be calculated post-truncation.