SgDotNet
Singapore Professional .NET User Group -For Cool Developers

Checking validity of Singapore IC Number

rated by 0 users
This post has 4 Replies | 2 Followers

Top 500 Contributor
Posts 8
dingaroo Posted: 09-12-2006 5:09 PM

Hiya Folks,

Back in school, I used to remember that the alpahbet assigned to our Singapore IC number has a specific algorithm.

Wondering if any members could remember what the algorithm is, and don't mind sharing with me?

Thanks in advance.

 

Dingaroo

Some people are born to be users Some people are born to be used Some people are born to administer Some people are born to be administered Some people are born to be decoded Some are just born to CODE!

Top 50 Contributor
Posts 163

It is based on modulus 11 using the 7 digits in the NRIC number. Using Di to denote the digit where i is the placing in the 7 digits, we have

x = 2 * D1 + 7 * D2 + 6 * D3 + 5 * D4 + 4 * D3 + 3 * D2 + 2 * D1

To get y, which is the check digit, we have

y = 11 - ( x mod 11 )

Where y is represented by: 1 = A, 2 = B, 3 = C, 4 = D, 5 = E, 6 = F, 7 = G, 8 = H, 9 = I, 10 = Z and 11 = J

The above information is obtained from one of the NUS lab exercise.

Top 500 Contributor
Posts 8

Thanks a lot!

Its been ages, or decades ... since i left school ... so the info is very much appreciated!

Thanks!

Some people are born to be users Some people are born to be used Some people are born to administer Some people are born to be administered Some people are born to be decoded Some are just born to CODE!

Top 500 Contributor
Posts 18

hi, does anyone happen to know to know the algorithm for checking Singapore Employment Pass (EP) and Work Permit (WP) ids. EP id starts with F and ends with a check alphabet, and WP id starts with a G and ends with a check alphabet.

I tried the NRIC alogrithm on them, but these IDs seem to follow another set of rules.. anyone has any idea wat the algorithm is ? 

Thanks in advance. 

I Just Got Started, but there's no stopping me now !!!
Top 50 Contributor
Posts 163

Sorry mate. I have tried to search for the logic to validate those numbers and found nothing. If you really need the logic, the best bet is to approach MOM. Will be great if you can pass the information in the forum.

Else, maybe you can throw in some actual IDs and see if anyone can work it out.

Page 1 of 1 (5 items) | RSS
Copyright SgDotNet 2004-2009
Powered by Community Server (Commercial Edition), by Telligent Systems