How Credit Card Numbers are Determined

If you've been around for a while, you probably know that all Mastercard credit cards start with 5, and all Visa cards start with 4. Beyond that, there's more math than you realized in credit card numbers. They are not randomly generated. For example, the last number is what's called a "check digit." It's there to make sure the other numbers are correct.

You don’t select this last digit, it is deterministic. The exact mathematic formula for its generation was invented by Hans Peter Luhn, an engineer at IBM in 1954. Originally patented, the algorithm is now in the public domain and a Worldwide standard ISO/IEC 7812-1
    
Obviously, with just a single check digit, not all errors can be detected (there’s a one in ten chance of a random number having the correct check digit), but the Luhn algorithm is clever in that it detects any single error (getting a single digit wrong), such as swapping the 9 with a 6 in the above example. It also detects almost all* pair-wise switching of two adjacent numbers. These errors are typical common errors people make when transcribing card numbers, so the check digit does a good thing.

An added side benefit is that, as discussed above, there is only a one in ten chance that a randomly generated number has the correct check digit. This provides a small amount of protection from hackers or poorly educated crooks who might attempt to randomly generate and guess credit card numbers.

See the formula for the check digit in action at DataGenetics, and more about how credit card numbers work. Link -Thanks, Nick!


Comments (1)

Newest 1
Newest 1 Comment

It's an early prototype of "Mr. Microphone".

A very, very early prototype developed back in the 12th century.

"Hark, yon fair maiden! We shalt returneth soon and abscond with thy personage!"
Abusive comment hidden. (Show it anyway.)
[quote]Sam Saturday
June 25th, 2009 at 7:54 am

It’s an early prototype of “Mr. Microphone”.

A very, very early prototype developed back in the 12th century.

“Hark, yon fair maiden! We shalt returneth soon and abscond with thy personage!”[/quote]
Hilarious.
I think that Chris P has the answer.
Abusive comment hidden. (Show it anyway.)
This is a dieting device, for people hopelessly addicted to ice cream cones. The ridges are very sharp, so when you grab it, it hurts.

Of course, for full effect, use while listening to Lovely Lovely Ludwig.

(Gosh I hope one of you nerds gets that reference.)
Abusive comment hidden. (Show it anyway.)
Its a Güiro (weero). It is a musical instrument, a percution. You can hear it in Salsa, Cumbia and other latin rithms. You can also hear it in Santanas "Oye como va".
Amor y paz.
Abusive comment hidden. (Show it anyway.)
I had a football coach that had something like this on a lanyard. Was supposed to be for when someone was knocked unconscious, the device could be screwed in between the teeth in order for a trainer or physician to keep a player from swallowing their tongue. That's what I was told anyway.
Abusive comment hidden. (Show it anyway.)
This is a puncture repair bung for an inflatable life raft. I have one - it's a souvenir from the Russian cruise liner Mikhail Lermontov that ran aground in the Marlborough Sounds in NZ. http://www.nzmaritime.co.nz/lermontov.htm
Abusive comment hidden. (Show it anyway.)
It's a device for prying open the jaws of tetanus or "lockjaw" patients.The grooves are in a spiral, and allowed for the gradual opening of the mouth. However, teeth were often shattered in this process-very painful indeed when performed with no anesthesia as was common then!
Abusive comment hidden. (Show it anyway.)
Damnit!
I just know I've seen one of these...
just... can't... remember...

Might be for winding iron wire around to make spiral cones of wire.
just don't know what theyre used for.

Allthough I somehow half remember it had to do with making cloth, or spinning wool or something...

hrm.
can't wait for the answer!
Abusive comment hidden. (Show it anyway.)
Login to comment.
Email This Post to a Friend
"How Credit Card Numbers are Determined"

Separate multiple emails with a comma. Limit 5.

 

Success! Your email has been sent!

close window
X

This website uses cookies.

This website uses cookies to improve user experience. By using this website you consent to all cookies in accordance with our Privacy Policy.

I agree
 
Learn More