National registry number
Solution
...In Belgium every citizen has a National registry number, which is created by using the citizen's date of birth (encoded in six digits), followed by a serial number (three digits) and a checksum (two digits). The serial number is used so that men get the odd numbers, while women get the even numbers (thus, there can be only 500 men or women per day).
- Enter a number and check whether it meets the specifications:
- The length is exactly 11 digits
- First 6 digits: birthday (yymmdd)
- Next 3 digits: gender (even for female and odd for male)
- Last 2 digits: checksum
- Checksum verification
- Divide the first 9 digits by 97
- The remaining part of this division (modulus) + 2 digits checksum must be 97
- E.g. registry number 641016 123 35
- 641016123 % 97 = 641016123 modulus 97 = 62
- 62 + 35 = 97
Messages
- Number is not 11 digits
Show A valid number contains 11 digits inside adiv
tag with classbox-warning
- Checksum doesn't match
Show The number contains at least one faulty digit inside adiv
tag with classbox-warning
- Number match
The number is correct. You are born on dd-mm-yyShow The number contains at least one faulty digit inside adiv
tag with classbox-primary
Tip
Try the numbers 64101612335
(correct), 6410161233
(not 11 digits) and 64101612330
(one faulty digit)