Job Recruitment Website - Ranking of immigration countries - I wonder what the first letter A on the Hong Kong identity card stands for. What do the numbers in brackets finally stand for?
I wonder what the first letter A on the Hong Kong identity card stands for. What do the numbers in brackets finally stand for?
I believe that residents who have reached the age of 30 will remember that about 20 years ago, the brackets were not included in the ID number. A year later, the government replaced the computerized ID card before adding this part. I remember that there were many rumors circulating among the people in those years, and I wanted to know what the numbers in brackets meant. I have heard some legends, which are ridiculous, so I won't go into them now. However, these rumors have gradually disappeared since someone explained how the numbers in this bracket are calculated in some publications and web pages that introduce interesting mathematics, or in some computer magazines and textbooks.
It turns out that this figure is calculated by the following methods:
The secret of ID number
First, we convert the English letters in the first part of the ID number into an alphabetical number. For example, "A" is converted into "1", "B" is converted into "2", and so on. Then multiply each number in the ID number (including the number converted from letters) by 8, 7, 6, 5, 4, 3 and 2 from left to right respectively, and add the results. (If the ID number has two English letters, the first letter should be multiplied by 9, and the other numbers are the same as above. )
For example, the ID number I mentioned above should be "H856249" if the number in brackets is ignored. Convert "h" into 8 first, then multiply and sum from left to right, and you get
8 ? 8 + 8 ? 7 + 5 ? 6 + 6 ? 5 + 2 ? 4 + 4 ? 3 + 9 ? 2 = 2 18
Then calculate the number in brackets according to the following steps: first divide the above sum by 1 1, and if it is divisible, the number in brackets is equal to 0; If there is a remainder, subtract the remainder from 1 1, and the difference is the number in brackets. If the difference is equal to 10, the number in brackets is "a".
For example, in the above example, we divide 2 18 by 1 1 to get the remainder 9, then the number in brackets equals 1 1-9 = 2, and the whole ID number becomes "H856249(2)".
If the ID number is "H856049", the total is 2 10, the remainder is 1, and the difference is 10, so the number in brackets should be "a".
Extra?
This is how the numbers in brackets in the original ID card are calculated! However, have you ever wondered why you should add 1 digit to the original ID number? What's the meaning of the numbers in the ID number?
I have read some articles explaining the reasons for using parentheses to prevent illegal immigrants from forging their identity cards! The author of the article said: Because criminals who forge ID cards don't know the secret of the ID number, when the police stop the ID card in the street, they can tell the authenticity of the ID card through the above calculation!
Needless to say, I believe everyone will find it ridiculous! First, since I can know how to calculate the ID number, how can the person who forged the ID card not know? Secondly, I believe that most people will use computers to calculate the sum and remainder of the above ID numbers. I doubt very much whether every law enforcement officer patrolling the street has such a strong mental arithmetic ability that he can make the above calculation immediately. Therefore, the number in brackets in the ID number is used to imitate fraud, which seems unreasonable.
So, what's the use of this number?
The secret in the secret
As we all know, different people will have different ID numbers, so ID numbers are the easiest way to identify people. We need this number in countless places in our daily life. You can't make mistakes in the process of recording or copying just because it is simple and important, otherwise it may bring very serious consequences.
But in the past, when we issued ID cards, all the numbers were tied together. For example, "H856248" before "H856249" and "H856250" belonging to another person. If we misspell "H856249" as "H856248", we will be in trouble! However, this is only the difference between the numbers of 1, and it is not easy for us to detect this error.
In order to solve the above problems, we introduce a parenthesis number, which is technically called "parity bit". The simplest purpose of introducing this check number is to separate the numbers that were originally pressed together, because we will only choose one number from 0 to 9 or A as this check number, so there will be a "distance" of 1 1 between each ID number.
Secondly, due to the invention of the computer, when we input data into the computer, we can also instruct the computer to check whether the ID number is correct, thus preventing human error when inputting data. In fact, the method of checking whether the ID number is correct is much more direct than the method of calculating the parity bit. The method is as follows:
First of all, let's convert the English letters in the first part of the ID number into numbers. Then, every bit (including parity bit) in the ID number is multiplied by the "bit value multiple" of each bit from left to right, that is, 8, 7, 6, 5, 4, 3, 2 and 1 (that is, the parity bit is multiplied by 1), and the results are added, and this value is called "check value" later. Finally, divide this check value by 1 1. Please note that the parity bit is the remainder of 1 1 minus the sum of the first seven digits multiplied by the multiple of its bit value and divided by 1 1. Therefore, the check value calculated together with the check bit must be divisible by 1 1. Therefore, if we find that the check value cannot be divisible by 1 1, then the ID number entered must be wrong. (Note: The computing speed of the computer is very high. After inputting the ID number into the computer, you can complete the relevant check calculation by just pressing the button. I believe that even people who use computers will not realize that computers actually do a lot of calculations! )
For example, "H856249(2)" is a correct number, and the check value calculated by the above method is equal to
8 ? 8 + 8 ? 7 + 5 ? 6 + 6 ? 5 + 2 ? 4 + 4 ? 3 + 9 ? 2 + 2 ? 1 = 220
Obviously, this number can be divisible by 1 1. If there is an error in the number or letter of 1 bit when inputting data, for example, it becomes "K856249(2)", "H856049(2)" or "H856249(A)", then the calculated check values will become 244, 2 12 and 228 respectively. Since these numbers are not divisible by 1 1, we know that these numbers are wrong.
In fact, if the correct check value of an ID number is A, and when inputting data, the k-th bit (from the right) was originally A, but now it is wrongly input as b(a? B), then the check value will become
Ah-ah? k + b? k = A + (b - a)? k
Note that unless there is an error in the first English letter, the absolute values of (b-a) and k will only be numbers between 1 and 10, and will not be greater than 1 1, so (b-a)? This part of k is not divisible by 1 1. But because a itself can be divisible by 1 1, the whole check value is A+(b-a)? K, it cannot be divisible by 1 1 Therefore, the input data is wrong.
Of course, there is a dead hole in the method of applying the check value, that is, if the first letter is wrongly entered into a letter which is a number of digits away from the original letter1/kloc-0, for example, "H856249(2)" is wrongly entered into "S856249(2)" (its check value is 308, which can be/kloc-. However, I believe that the probability of this kind of mistake is extremely small, so this method is quite reliable.
In addition, if there are two or more errors in data input, such as "H856249(2)" being wrongly input as "H856049(A)", we cannot detect the errors. Of course, if it's too easy to make mistakes twice, then I think the best solution is to dismiss the typist and hire a more reliable candidate! )
Another secret
Note that in the above discussion, that bit value multiple actually doesn't have much influence. In fact, if we add up all the numbers, don't multiply them by any multiple, and then determine a parity bit, we can still check for errors when inputting data (1). So, why do we need to add this bit value multiple?
It turns out that this is also used to prevent ordinary people from making a mistake, that is, the positions of the two numbers are misplaced. For example, change "H856249(2)" to "H856294(2)" by mistake.
Let's assume that the check value of the correct ID number is A, the k-th bit is A, and the k+n bit is b(a? b; n? 1), if we switch the numbers a and b by mistake, then the check value will become
Ah-ah? k - b? (k + n) + a? (k + n) + b? k = A + (a - b)? n
Similarly, a, b and n will only be numbers between 0 and 9, so (a-b)? This part of n, or even the whole check value, cannot be divisible by 1 1, so you can know that the input data is wrong. Please note that without this bit value multiple, we will not be able to detect this error.
In a word, the check bit in the ID number is a simple but ingenious design, which makes it easy for us to find two common mistakes when inputting data, thus ensuring the reliability of the data. In the whole process, please also appreciate the role of the number 1 1. Because 1 1 is a prime number (and just greater than 10), any two numbers less than it cannot be divisible by it, so we can find the input error in the above operation. If you change a composite number, the situation will be different. For example: 12, we know that both 4 and 6 are less than 12, but 4? The result of 6 can be divisible by 12, so 12 cannot be used as a divisor in the verification process.
Finally, personally, since the check number has become an indispensable part of the ID number, we actually don't need to specify it in brackets. What's more, after being surrounded, it will cause some unsuspecting people to guess at random, which is really meaningless. Therefore, I suggest that the Government remove this pair of brackets when issuing new identity documents. Isn't this better?
- Previous article:How to write about the feeling of exploring the mystery of the moon
- Next article:Zhao Huaide: A Rich Leader in Immigrant Villages
- Related articles
- North African immigrants beat Turin
- Do British girls want to marry people from China?
- The story of World War II pilot Patton
- What is the Singapore family office?
- About IELTS validity period and visa
- What are the advantages of applying for a popular Vanua passport?
- What are the hidden dangers of the Three Gorges Project?
- Notice of the Fujian Provincial Government on Printing and Distributing the Interim Measures for the Resettlement Management of Large and Medium-sized Hydropower Stations (Reservoirs) in Fujian Provin
- What are the identification factors of socio-economic environment evaluation?
- Immigrants from Lei Anna