Error Detection Based on Check Digit Schemes | CodeGuru

Error Detection Based on Check Digit Schemes

Introduction A Check Digits is an alphanumeric character added to a number to detect human errors. Check Digits are a simple and easy way to neutralize the human element of keying data. Check Digits are not Error Correcting Codes. Should the reader want to investigate robust Error Correcting Codes, he or she is referred to […]

Written By
CodeGuru Staff
CodeGuru Staff
Dec 13, 2006
1 minute read
CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More

Introduction

A Check Digits is an alphanumeric character added to a number to detect human errors. Check Digits are a simple and easy way to neutralize the human element of keying data. Check Digits are not Error Correcting Codes. Should the reader want to investigate robust Error Correcting Codes, he or she is referred to Error-Correcting Codes by Peterson and Weldon.

It is also notable that CRC codes are not a check digit scheme because more than one alphanumeric digit is generated to detect errors.

If the reader desires a system for very long datasets or binary data sets, consider using a CRC, Alder checksums, or a hash-based checksum.

According to Richard Hamming, the two most common errors are:


  • 12 becomes 21 (adjacent characters are transposed)

  • 112 becomes 122 (incorrect doubling of triples)

Jacobus Verhoeff presents the follow statistics in Error Detecting Decimal Codes:


















Error Approximate Percentage Comment
a → b 60% – 90% Single Error
ab → aab 10% – 20% Adding a Digit
aab → ab 10% – 20% Omitting a Digit
ab → ba 10% – 20% Transposition Error
aa → bb 0.5% – 1.5% Twin Errors
acb → bca > 1% Jump Twin Error
13 → 30 0.5% – 1.5% Phonetic Error (similar pronunciations)

This article discusses the following Check Digit Schemes:


  • Mod 9 Scheme

  • Mod 7 Scheme

  • Mod 11 Scheme

  • 3-Weight Method

  • IBM Scheme

  • UPC Scheme

  • Verhoeff Algorithm

  • ISO 7064 Mod N/N+1

CodeGuru Logo

CodeGuru covers topics related to Microsoft-related software development, mobile development, database management, and web application programming. In addition to tutorials and how-tos that teach programmers how to code in Microsoft-related languages and frameworks like C# and .Net, we also publish articles on software development tools, the latest in developer news, and advice for project managers. Cloud services such as Microsoft Azure and database options including SQL Server and MSSQL are also frequently covered.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.