Brother
Professional
- Messages
- 2,590
- Reaction score
- 506
- Points
- 83

When you have to enter or write a long sequence of numbers, there is always the possibility of entering a mistake. One of the ways to check the correctness of the entered data is as follows. We make special calculations on the entered data, we get some special number. Then we insert this number into the original data sequence, and so we store and process it. The next time this data is transmitted or entered, we repeat the calculations and see the result. If we get the same value that is in the entered data, then most likely the data was entered correctly.
Not everyone knows, but among the sequences of numbers we are used to, many of them have such a check, i.e. there is a check digit (or two).
In TIN, for example, this is the last digit (for a ten-digit TIN) or the last two digits (for a 12-digit TIN). In some programs and sites where a TIN is needed, such a check is sometimes inserted. And it will not work just like that to invent an SSN - it is necessary that the control numbers are not random, but calculated on the basis of the rest of the numbers.
There is such a check in the numbers of bank accounts. This is the ninth digit in the 20-digit account number. Right after the currency code


Well, in the card number, there is also a check digit. This is the last digit in the card number. It is calculated by the Luna algorithm (Lun is the author's surname). Therefore, it will not work just like that to invent the card number, you also need to calculate the last digit using this algorithm. As a result, the card number consists of three parts: BIN (Bank Identification Number, bank identifier), in fact, the card number inside the bank and the check digit.
In general, the card number is correctly called PAN - "Primary Account Number". Those. in theory, the primary account (and there are also non-primary accounts associated with the same card) should have exactly the same number - this was the intention when the cards were invented. But in reality, this almost never coincides - especially (since we have strict requirements for account numbers).