Check Digit

Example: A123456(3)

weighted sum

= 58*9 + A*8 + 1*7 + 2*6 + 3*5 + 4*4 + 5*3 + 6*2 + 3*1

= 682

= 62 x 11

A123456(3) is valid because the sum is divisible by 11.

HKID calculator
Symbols Meaning
*** the holder is of the age of 18 or over and is eligible for a HK Re-entry Permit
* the holder is between the ages of 11 and 17 and is eligible for a HK Re-entry Permit
A the holder has the right of abode in HK
F female
M male
Z the holder's place of birth reported is HK
X the holder's place of birth reported is China
W the holder's place of birth reported is Macau
O the holder's place of birth reported is in other countries
Y the date of birth reported by the holder has been checked against his birth certificate or passport
B the holder's reported date of birth, place of birth or sex has been changed since his first registration
N the holder's reported name has been changed since his first registration
R the holder has the right to land in HK
U the holder's stay in HK is not limited by the Immigration Department at the time of his registration of the card
C the holder's stay in HK is limited by the Immigration Department at the time of his registration of the card
H1, K2,
S1, P1,
V1, ...
office where the card was issued
L the previous identity card was lost

A,D   - HK
B,E   - Kln
C,G   - NT
H,P,V - New immigrants
Y     - HK born
Z     - children of new immigrants


// validation check: char idno[11]="A123456(3)"; ... ok=0; if(strlen(idno)!=10) printf("Error\n"); if(idno[0]<'A' ...) ...