You are on page 1of 1
‘When enceringthe genderof ‘Mar Fa consistency checkwill prevent from beingentered if the ttle is'Nr’ and will prevent ‘M’ from being entared ithe {itleis’Mis' or ‘Miss. ‘When ereringdeta about dispalching procucts, it would not be possibie te mark anitert as being, dispatched unti afterit has bee" packaged Check digit Acheck digit sa number jor letter) that is added to the cend of an ident ficationnumberbeing input. Itisa form of redundancy check because thecheck digits redundant (ot needed for the identification number, butjust used for validation). When the idertiication numberis first created, analgerithm (a series o calculations) is pertormed on itto penerate a check digit. When the identification numbers input, the same elgor thrnis performed on i. Ihe result of the algorithm should match thechack dgit Ifit metches, ten thedata is valid fit does ral mates then the data is inval d Cigna ientisatior nemor = 20302 ‘Agha peformed an 20062 Cheek dat ‘on intusing heck t= 200028 Vata Example osteo number iting shes igi entered roth cama: 200021, ‘ugptem petormed an 20382 7 Result aontm= 4 Result of akgorihm (4) # cemparec with chock aig that wes entered (4. ‘hey rata Invalid Exomlo [Wselfenten number luting chek dt ertered ir the sompiton: 208024 ‘gore pore an 20882 few akon = a FRocut of algorwng) compared wh check satin was entered (4), ‘hey corn teh Figure 1.22- Valid and invalid check digit calculations. There are e variety of calculations that cen be pe-formed to determine wnat the check digi should be. The important thing is that thesame calculation used to create the check digit in the first nlace should be used to confirm the check digit when the identiication number is input. | 978.0-9573404.1 4) wh Figure 1.23- Unique Product Code checkdligt, The Unique Preduct Code (UPC! check digitis used with 13 digit barcodes. ts the last digt shown on a barcode. The algorilrn lor calculating thecheck digitis: 1 Add all the digits in even nurrbered positiors together. 2 Multiply theresul (1) above by 3 3. Add all the cigs in odd eumbered sesit'ons togetie 4 Add results (21 and ©) together. 5. Divide the rest. (@} above by 16, 6 Calculate the remainder (modulo 10) of resuit (6) above T Subtract (6) above from 10, Valid example In this example, tre International Standard Book Number ISBN) is 9780857340411 where the last Listhe check digt To cataulate the check digit, the following elgorith nis perfoined on the SBN (excluding check digi 1 Add all the digits in even surrbered positions ‘together (978098734041) -7+0+5+3~-0+1=16 2 Multiply result (above by 3:16 x 3=48, 3 Add all the digits in odd rumbered positions opether (978095734041) :9 +8+9+7+4+4=41, 4 Add results (2) and (1) together: 48 +41 =R9 5 dividethe result (4) above by 10: 89+ 10-8.9.

You might also like