Singapore Expats Forum

The Math Behind the NRIC

Discuss about the latest news & interesting topics, real life experience or other out of topic discussions with locals & expatriates in Singapore.

User avatar
carteki
Editor
Editor
Posts: 1237
Joined: Mon, 28 Apr 2008
Location: Singapore
Contact:

The Math Behind the NRIC

Postby carteki » Thu, 02 Feb 2012 3:36 pm

Some useless information that has come to light ... thanks to http://ayumilovemaple.wordpress.com/200 ... ification/

Regarding the NRIC math behind the letter, it’s called a checksum. This is to help check whether the actual IC numbers are valid and not just random numbers.

The math goes like this:

1) Take for example I want to test the NRIC number S1234567. The first digit you multiply by 2, second multiply by 7, third by 6, fourth by 5, fifth by 4, sixth by 3, seventh by 2. Then you add the totals together. So,1×2+2×7+3×6+4×5+5×4+6×3+7×2=106.

2) If the first letter of the NRIC starts with T or G, add 4 to the total.

3) Then you divide the number by 11 and get the remainder. 106/11=9r7

4) You can get the alphabet depending on the IC type (the first letter in the IC) using the code below:
If the IC starts with S or T: 0=J, 1=Z, 2=I, 3=H, 4=G, 5=F, 6=E, 7=D, 8=C, 9=B, 10=A
If the IC starts with F or G: 0=X, 1=W, 2=U, 3=T, 4=R, 5=Q, 6=P, 7=N, 8=M, 9=L, 10=K

User avatar
Strong Eagle
Moderator
Moderator
Posts: 10413
Joined: Sat, 10 Jul 2004
Location: Off The Red Dot
Contact:

Postby Strong Eagle » Thu, 02 Feb 2012 3:54 pm

Most account numbers, like your checking account numbers, are checksum verified.

Simplest is mod 10, double add double... that is, a weight of 1-2-1-2... but also can return false positives, ie, account number is not OK but still calculates the correct check digit.

The formula you have shown is mod 11, weight 1-3-5-7 and very commonly used. Much better at catching errors, but unless you are using letters like NRIC, you have to reject some account numbers because the check digit turns out to be 10.

Checksums exist to reduce machine read errors... magnetic swipes, optical reads, RFID reads, etc... yes even product numbers have check digits.

User avatar
ecureilx
Immortal
Immortal
Posts: 9276
Joined: Fri, 20 Aug 2010

Re: The Math Behind the NRIC

Postby ecureilx » Thu, 02 Feb 2012 5:54 pm

carteki wrote:Some useless information that has come to light ... thanks to http://ayumilovemaple.wordpress.com/200 ... ification/

Regarding the NRIC math behind the letter, it’s called a checksum. This is to help check whether the actual IC numbers are valid and not just random numbers.

The math goes like this:

1) Take for example I want to test the NRIC number S1234567. The first digit you multiply by 2, second multiply by 7, third by 6, fourth by 5, fifth by 4, sixth by 3, seventh by 2. Then you add the totals together. So,1×2+2×7+3×6+4×5+5×4+6×3+7×2=106.

2) If the first letter of the NRIC starts with T or G, add 4 to the total.

3) Then you divide the number by 11 and get the remainder. 106/11=9r7

4) You can get the alphabet depending on the IC type (the first letter in the IC) using the code below:
If the IC starts with S or T: 0=J, 1=Z, 2=I, 3=H, 4=G, 5=F, 6=E, 7=D, 8=C, 9=B, 10=A
If the IC starts with F or G: 0=X, 1=W, 2=U, 3=T, 4=R, 5=Q, 6=P, 7=N, 8=M, 9=L, 10=K


now .. I was never strong in my maths .. my total comes to 132, and it is S, so what is the last letter again ??

Tigerslayer
Chatter
Chatter
Posts: 153
Joined: Sat, 16 Apr 2011

Postby Tigerslayer » Fri, 03 Feb 2012 9:38 pm

Thats really interesting, I didnt realise there was a maths behind it.



now .. I was never strong in my maths .. my total comes to 132, and it is S, so what is the last letter again ??


Maths is not my strength either but 132 / 11 is 12 with 0 remainder therefore your last letter should be J, Correct?

User avatar
ecureilx
Immortal
Immortal
Posts: 9276
Joined: Fri, 20 Aug 2010

Postby ecureilx » Sat, 04 Feb 2012 12:13 pm

Tigerslayer wrote:Thats really interesting, I didnt realise there was a maths behind it.



now .. I was never strong in my maths .. my total comes to 132, and it is S, so what is the last letter again ??


Maths is not my strength either but 132 / 11 is 12 with 0 remainder therefore your last letter should be J, Correct?


Turns out, for my S IC, it is NOT J :twisted: :twisted:

User avatar
sundaymorningstaple
Moderator
Moderator
Posts: 34265
Joined: Thu, 11 Nov 2004
Location: Still Fishing!
Contact:

Postby sundaymorningstaple » Sat, 04 Feb 2012 3:34 pm

Sounds about right to me. A squirrely NRIC for Squirrel. Doesn't make sense? I reckon it suits him to a "T". :lol:

User avatar
ecureilx
Immortal
Immortal
Posts: 9276
Joined: Fri, 20 Aug 2010

Postby ecureilx » Sat, 04 Feb 2012 5:21 pm

sundaymorningstaple wrote:Sounds about right to me. A squirrely NRIC for Squirrel. Doesn't make sense? I reckon it suits him to a "T". :lol:


and luckily you didn't issue it for me ..

atleast somebody noticed my 'talents' I guess ..

Tigerslayer
Chatter
Chatter
Posts: 153
Joined: Sat, 16 Apr 2011

Postby Tigerslayer » Sat, 04 Feb 2012 6:39 pm

I have a few questions to clear this up...

- From which merchant did you purchase your NRIC?
- Where in Geylang did you buy it?
- and Do you still have the receipt?

:P

User avatar
ecureilx
Immortal
Immortal
Posts: 9276
Joined: Fri, 20 Aug 2010

Postby ecureilx » Sat, 04 Feb 2012 11:39 pm

Tigerslayer wrote:I have a few questions to clear this up...

- From which merchant did you purchase your NRIC?
- Where in Geylang did you buy it?
- and Do you still have the receipt?

:P


if you are questioning the IC issued by ICA, then there nothing I could say ... :(

No, I don't loiter around Geylang - punlike you .. :twisted:

PS: I don't have a habit of buying ICs from merchants .. and I don't 'collect' IDs .. or ICs .. :)

User avatar
sundaymorningstaple
Moderator
Moderator
Posts: 34265
Joined: Thu, 11 Nov 2004
Location: Still Fishing!
Contact:

Postby sundaymorningstaple » Sun, 05 Feb 2012 12:00 am

Just names and people who know names..... :P

User avatar
ecureilx
Immortal
Immortal
Posts: 9276
Joined: Fri, 20 Aug 2010

Postby ecureilx » Sun, 05 Feb 2012 10:55 am

And how does the fact that Moi knows a bit more than am expected to know, and occasionally gets to shine, help solve the "MATH" problem here ? :twisted:

And .. err ... as per HRH, does it mean I have a "FAKE" IC ? (as per the drift of 'knowing people' is implying ?? )

Yah, After all, it is not my turf .. so will wind my neck in .. :roll: :roll:

Tigerslayer
Chatter
Chatter
Posts: 153
Joined: Sat, 16 Apr 2011

Postby Tigerslayer » Sun, 05 Feb 2012 2:26 pm

Joking aside the maths behind it seem pretty standard for all... If your NRIC isnt matching are you sure 132 is the correct outcome of all the multiplying and addition? :P

User avatar
ecureilx
Immortal
Immortal
Posts: 9276
Joined: Fri, 20 Aug 2010

Postby ecureilx » Mon, 06 Feb 2012 9:04 am

Tigerslayer wrote:Joking aside the maths behind it seem pretty standard for all... If your NRIC isnt matching are you sure 132 is the correct outcome of all the multiplying and addition? :P


Yes .. or maybe I should try a different calculator .. :) :)

let me verify on another person's ic now and see how it goes !!!!


  • Similar Topics
    Replies
    Views
    Last post

Return to “General Discussions”

Who is online

Users browsing this forum: No registered users and 4 guests