Identity document
Other forms of officially accepted identification include the driver's license and the birth certificate. However, these are accepted only in limited circumstances and cannot take the place of the ID Card in most cases. The ID Card is mandatory for dealing with government institutions, banks or currency exchange shops. A valid passport may also be accepted, but usually only for foreigners.
National identification number
In China, an ID card is mandatory for all citizens who are over 16 years old. The ID number has 18 digits and is in the format RRRRRRYYYYMMDDSSSC, which is the sole and exclusive identification code for the holder (an old ID card only has 15 digits in the format RRRRRRYYMMDDIII). RRRRRR is a standard code for the administrative division where the holder is born (county or a district of a city), YYYYMMDD is the birth date of the holder, and SSS is a sequential code for distinguishing people with identical birthdates and birthplaces. The sequential code is odd for males and even for females. The final character, C, is a checksum value over the first 17 digits. To calculate the checksum, each digit in order is multiplied by a weight in the ordered set [7 9 10 5 8 4 2 1 6 3 7 9 10 5 8 4 2] and summed together. The sum modulus 11 is used as an index into the ordered set [1 0 X 9 8 7 6 5 4 3 2], with the first index being zero. The indexed value is the checksum digit. In 15 digit IDs, III is an identification number created through certain mathematical methods (the last digit might be an English letter, such as X). The ID card is used for residential registration, army enrollment registration, registration of marriage/divorce, going abroad, taking part in national exams, and other social or civil matters.