Errors Where do errors occur n Anywhere data

  • Slides: 13
Download presentation
Errors!

Errors!

Where do errors occur? n Anywhere data is transferred, processed, stored, etc. ¡ Input

Where do errors occur? n Anywhere data is transferred, processed, stored, etc. ¡ Input n ¡ Storage n n ¡ user error magnetic hard drive errors physical tampering (hax 0 ring) Communication n n electrical interference / noise physical tampering (hax 0 ring)

How do we detect errors? n verification ¡ ¡ n “making sure that the

How do we detect errors? n verification ¡ ¡ n “making sure that the data on the source documents is exactly the same as the input to the computer system” ve ~equal data = input validation ¡ ¡ “making sure that the data input into the system makes sense” va ~ acceptable data makes sense

Verification n visual verification ¡ n proofreading double entry ¡ force re-entry of data

Verification n visual verification ¡ n proofreading double entry ¡ force re-entry of data (e. g. passwords or e -mails)

Validation n Range checks ¡ n Type checks ¡ n Is this birthday acceptable

Validation n Range checks ¡ n Type checks ¡ n Is this birthday acceptable (M/D/YY)? 1/62/07 How old are you? 8 a years old Format checks ¡ Please enter your birthday (M/D/YY): 1/16/2007

Which of these numbers has an error? 1235 n 9053 4213 How do you

Which of these numbers has an error? 1235 n 9053 4213 How do you detect errors if you had nothing to compare your data against?

Check Digits n 1. 2. 3. Append additional data for comparison Apply some algorithm

Check Digits n 1. 2. 3. Append additional data for comparison Apply some algorithm on the data to generate a check digit Attach the check digit to the data To verify the data in the future, apply the same algorithm to the data to generate the check digit again – compare against old check digit to verify

Parity Bit n Even Parity ¡ n Check digit (1 or 0) is added

Parity Bit n Even Parity ¡ n Check digit (1 or 0) is added to make sure there an even number of 1 s Odd Parity ¡ Check digit (1 or 0) is added to make sure there an odd number of 1 s

Parity Bit Examples n Even parity w/ NO ERROR ¡ n Even parity w/

Parity Bit Examples n Even parity w/ NO ERROR ¡ n Even parity w/ ERROR ¡ n 101010 Odd parity w/ NO ERROR ¡ n 101110 101111 Odd parity w/ ERROR ¡ 000101

Parity Bit Creation Assume you have the following bit string: 10111101 with even parity,

Parity Bit Creation Assume you have the following bit string: 10111101 with even parity, add the parity bit to the right end to maintain even parity

Unweighted Check Digit 1. 2. 3. Add up each of the digits to get

Unweighted Check Digit 1. 2. 3. Add up each of the digits to get a number If number is multidigit, then add up digits of that number Repeat until you have a single digit Example: 23455 2345 2 + 3 + 4 + 5 = 14 14 1 + 4 = 5 Check digit for 2345 is 5 Attach at the end, so we store

Other Errors n Hardware errors ¡ n Software errors ¡ n n n defective

Other Errors n Hardware errors ¡ n Software errors ¡ n n n defective hard drive e. g. , decimal in the wrong place Logic errors Runtime errors Syntax errors

How do we fix errors? n Re-input ¡ n Re-transmission ¡ ¡ n Prompt

How do we fix errors? n Re-input ¡ n Re-transmission ¡ ¡ n Prompt the user to re-enter data If there was electrical interference/noise over a cable, we can always resend the data Transmission Control Protocol (TCP) Backup your data! ¡ Verify data against backups