Transfer ID card number rules

Source: Internet
Author: User

The ID card of Mainland China is 18 digits, and the old ID card is 15 digits.
The principle of how ID card 18th is calculated is as follows: according to the provisions on citizenship numbers in the National Standard of the People's Republic of China (GB 11643-1999), citizenship numbers are feature combination codes, it consists of a 17-digit ontology code and a digital verification code. The six-digit address code, eight-digit birth date code, three-digit sequence code, and one-digit verification code are arranged from left to right.
The address code (the first six digits of the ID card) indicates the administrative area of the county (city, flag, district) where the resident account of the encoding object is located.Code. (Code for all regions can go to this site http://www.stats.gov.cn/tjbz/index.htm
Query the latest Administrative Code documents of counties and above .)
The Birth Date Code (the seventh to 14th digits of the ID card) indicates the year, month, and day of the birth of the encoding object. The year is represented by four digits, and there is no separator between the year, month, and day. For example, 19810511 is used for representation.
The sequence code (15th to 17 digits of the ID card) is the sequence number of persons born in the same year, month, or day within the region indicated by the same address code. Among them, the 17th-digit odd number is given to men, and the even number is given to women.
The verification code (the last digit of the ID card) is the verification code calculated based on the first 17-digit code according to the ISO 7064: 1983.mod 11-2 verification code.

The calculation method of a 18th-bit number is as follows:
1. Multiply the 17 digits of the previous ID card number by different coefficients. The coefficients from the first digit to the second digit are respectively 7 9 10 5 8 4 2 1 6 3 7 9 10 8 4 2
2. Add the result of multiplying the 17-digit number and the coefficient.
3. Add and divide by 11 to check the remainder?
The remainder may only contain the 11 numbers 0 1 2 3 4 5 6 7 8 9 10. The numbers corresponding to the last ID card respectively are 1 0x9 8 7 6 5 4 3 2.
5. I learned from the above that if the remainder is 2, the X of the Roman numerals will appear on the 18th digits of the ID card. If the remainder is 10, the last digit of the ID card is 2.

for example, the ID number of a male is 34052419800101001x. Let's see if this ID card is a valid ID card.
first, we can conclude that the product sum of the first 17 bits is 189
then: Divide 189 by 11 and the result is 17 + 2/11, that is, the remainder is 2.
finally, the number corresponding to remainder 2 is X. Therefore, this is a qualified ID card number.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.