{"id":112,"date":"2021-03-31T02:59:27","date_gmt":"2021-03-31T02:59:27","guid":{"rendered":"http:\/\/learnlearn.uk\/algorithms\/?page_id=112"},"modified":"2021-05-10T04:39:48","modified_gmt":"2021-05-10T04:39:48","slug":"error-checking-algorithms","status":"publish","type":"page","link":"https:\/\/learnlearn.uk\/algorithms\/error-checking-algorithms\/","title":{"rendered":"Error Checking Algorithms"},"content":{"rendered":"<div class=\"responsive-tabs\">\n<h2 class=\"tabtitle\">Introduction<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Why do we need error checking?<\/h3>\n<p>There are 4 main areas where data errors are common:<\/p>\n<ul>\n<li>Input Error &#8211; where the user enters the wrong value.<\/li>\n<li>Write Error &#8211; where the data is either stored incorrectly on the device or it becomes corrupted over time.<\/li>\n<li>Read Error &#8211; where the computer fails to retrieve the correct data from a storage device<\/li>\n<li>Transmission Error &#8211; where the data is corrupted somewhere during transmission from on device to another<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n\n<\/div><h2 class=\"tabtitle\">Demo<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Demo<\/h3>\n<p>Click the binary bits to see what happens to the light coloured parity bits at the end of each row\/column.<\/p>\n<p><iframe loading=\"lazy\" src=\"https:\/\/scratch.mit.edu\/projects\/526238710\/embed\" width=\"900\" height=\"600\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n\n<\/div><h2 class=\"tabtitle\">Game<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Parity bit game<\/h3>\n<p>In this game you have to work out which bit in the grid is the incorrect bit, by using even parity. All digits in each row and each column should add up to an even number so you need to find which bit is the wrong number.<\/p>\n<p><iframe loading=\"lazy\" src=\"https:\/\/scratch.mit.edu\/projects\/526298722\/embed\" width=\"900\" height=\"600\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n\n<\/div><h2 class=\"tabtitle\">Parity Bits<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Parity Bits<\/h3>\n<p>Parity Bits are used to check that data has been transmitted \/ read \/ written successfully. You can have either even or odd parity but they work on the same principle.<\/p>\n<p><strong>Even parity<\/strong><\/p>\n<p>When a byte of a data is transmitted an extra bit is added to the data. The extra bit is used to ensure that the total value of all bits added together is an even number.<\/p>\n<p><strong>Example 1 &#8211; 1110 1010<\/strong><\/p>\n<p>Here the bits add up to 5, and odd number, so a 1 is added at the end to ensure that the number adds up to an even number.\u00a0 1110 1010 1<\/p>\n<p>The number is now even and can be transmitted. When the device receives the data it checks to ensure that the 9 bits still add up to an even number. If one of the bits has been corrupted during transmission then the bits will now add up to an odd number.<\/p>\n<h4>Limitations of parity bits<\/h4>\n<p>Parity bits are only effective if only 1 bit has been corrupted. If more than one bit has been corrupted then there is a 50% chance that the number will end up even anyhow. A more reliable but complex method of error checking is through the use a checksum.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n\n<\/div><h2 class=\"tabtitle\">Resources<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Resources<\/h3>\n<p>Check Bits &#8211; check bit magic trick<\/p>\n<p>Checksums<\/p>\n<p>Barcode checking &#8211; Mod 10<\/p>\n<p>Credit Cards &#8211; Mod 13<\/p>\n<p><a href=\"https:\/\/csunplugged.org\/en\/topics\/error-detection-and-correction\/\">https:\/\/csunplugged.org\/en\/topics\/error-detection-and-correction\/<\/a><\/p>\n<p><a href=\"https:\/\/csfieldguide.org.nz\/en\/chapters\/coding-error-control\/the-parity-magic-trick\/\">https:\/\/csfieldguide.org.nz\/en\/chapters\/coding-error-control\/the-parity-magic-trick\/<\/a><\/p>\n<p>Worksheet &#8211; barcode checker questions (check barcodes \/ calculate checksums)<\/p>\n<p>&nbsp;<\/p>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Why do we need error checking? There are 4 main areas where data errors are common: Input Error &#8211; where the user enters the wrong value. Write Error &#8211; where the data is either stored incorrectly on the device or it becomes corrupted over time. Read Error &#8211; where the computer fails to retrieve the&hellip;&nbsp;<a href=\"https:\/\/learnlearn.uk\/algorithms\/error-checking-algorithms\/\" class=\"\" rel=\"bookmark\">Read More &raquo;<span class=\"screen-reader-text\">Error Checking Algorithms<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":70,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Error Checking Algorithms - Algorithms<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/learnlearn.uk\/algorithms\/error-checking-algorithms\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Error Checking Algorithms - Algorithms\" \/>\n<meta property=\"og:description\" content=\"Why do we need error checking? There are 4 main areas where data errors are common: Input Error &#8211; where the user enters the wrong value. Write Error &#8211; where the data is either stored incorrectly on the device or it becomes corrupted over time. Read Error &#8211; where the computer fails to retrieve the&hellip;&nbsp;Read More &raquo;Error Checking Algorithms\" \/>\n<meta property=\"og:url\" content=\"https:\/\/learnlearn.uk\/algorithms\/error-checking-algorithms\/\" \/>\n<meta property=\"og:site_name\" content=\"Algorithms\" \/>\n<meta property=\"article:modified_time\" content=\"2021-05-10T04:39:48+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/learnlearn.uk\/algorithms\/error-checking-algorithms\/\",\"url\":\"https:\/\/learnlearn.uk\/algorithms\/error-checking-algorithms\/\",\"name\":\"Error Checking Algorithms - Algorithms\",\"isPartOf\":{\"@id\":\"https:\/\/learnlearn.uk\/algorithms\/#website\"},\"datePublished\":\"2021-03-31T02:59:27+00:00\",\"dateModified\":\"2021-05-10T04:39:48+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/learnlearn.uk\/algorithms\/error-checking-algorithms\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/learnlearn.uk\/algorithms\/error-checking-algorithms\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/learnlearn.uk\/algorithms\/error-checking-algorithms\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"KS3 Algorithms Unit\",\"item\":\"https:\/\/learnlearn.uk\/algorithms\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Error Checking Algorithms\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/learnlearn.uk\/algorithms\/#website\",\"url\":\"https:\/\/learnlearn.uk\/algorithms\/\",\"name\":\"Algorithms\",\"description\":\"An intro\",\"publisher\":{\"@id\":\"https:\/\/learnlearn.uk\/algorithms\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/learnlearn.uk\/algorithms\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/learnlearn.uk\/algorithms\/#organization\",\"name\":\"Algorithms\",\"url\":\"https:\/\/learnlearn.uk\/algorithms\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/learnlearn.uk\/algorithms\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/learnlearn.uk\/algorithms\/wp-content\/uploads\/sites\/12\/2021\/04\/LearnLearnLogowhite.png\",\"contentUrl\":\"https:\/\/learnlearn.uk\/algorithms\/wp-content\/uploads\/sites\/12\/2021\/04\/LearnLearnLogowhite.png\",\"width\":710,\"height\":98,\"caption\":\"Algorithms\"},\"image\":{\"@id\":\"https:\/\/learnlearn.uk\/algorithms\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Error Checking Algorithms - Algorithms","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/learnlearn.uk\/algorithms\/error-checking-algorithms\/","og_locale":"en_GB","og_type":"article","og_title":"Error Checking Algorithms - Algorithms","og_description":"Why do we need error checking? There are 4 main areas where data errors are common: Input Error &#8211; where the user enters the wrong value. Write Error &#8211; where the data is either stored incorrectly on the device or it becomes corrupted over time. Read Error &#8211; where the computer fails to retrieve the&hellip;&nbsp;Read More &raquo;Error Checking Algorithms","og_url":"https:\/\/learnlearn.uk\/algorithms\/error-checking-algorithms\/","og_site_name":"Algorithms","article_modified_time":"2021-05-10T04:39:48+00:00","twitter_card":"summary_large_image","twitter_misc":{"Estimated reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/learnlearn.uk\/algorithms\/error-checking-algorithms\/","url":"https:\/\/learnlearn.uk\/algorithms\/error-checking-algorithms\/","name":"Error Checking Algorithms - Algorithms","isPartOf":{"@id":"https:\/\/learnlearn.uk\/algorithms\/#website"},"datePublished":"2021-03-31T02:59:27+00:00","dateModified":"2021-05-10T04:39:48+00:00","breadcrumb":{"@id":"https:\/\/learnlearn.uk\/algorithms\/error-checking-algorithms\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/learnlearn.uk\/algorithms\/error-checking-algorithms\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/learnlearn.uk\/algorithms\/error-checking-algorithms\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"KS3 Algorithms Unit","item":"https:\/\/learnlearn.uk\/algorithms\/"},{"@type":"ListItem","position":2,"name":"Error Checking Algorithms"}]},{"@type":"WebSite","@id":"https:\/\/learnlearn.uk\/algorithms\/#website","url":"https:\/\/learnlearn.uk\/algorithms\/","name":"Algorithms","description":"An intro","publisher":{"@id":"https:\/\/learnlearn.uk\/algorithms\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/learnlearn.uk\/algorithms\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/learnlearn.uk\/algorithms\/#organization","name":"Algorithms","url":"https:\/\/learnlearn.uk\/algorithms\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/learnlearn.uk\/algorithms\/#\/schema\/logo\/image\/","url":"https:\/\/learnlearn.uk\/algorithms\/wp-content\/uploads\/sites\/12\/2021\/04\/LearnLearnLogowhite.png","contentUrl":"https:\/\/learnlearn.uk\/algorithms\/wp-content\/uploads\/sites\/12\/2021\/04\/LearnLearnLogowhite.png","width":710,"height":98,"caption":"Algorithms"},"image":{"@id":"https:\/\/learnlearn.uk\/algorithms\/#\/schema\/logo\/image\/"}}]}},"rttpg_featured_image_url":null,"rttpg_author":{"display_name":"learnlearnadmin","author_link":"https:\/\/learnlearn.uk\/algorithms\/author\/learnlearnadmin\/"},"rttpg_comment":0,"rttpg_category":null,"rttpg_excerpt":"Why do we need error checking? There are 4 main areas where data errors are common: Input Error &#8211; where the user enters the wrong value. Write Error &#8211; where the data is either stored incorrectly on the device or it becomes corrupted over time. Read Error &#8211; where the computer fails to retrieve the&hellip;&nbsp;Read&hellip;","_links":{"self":[{"href":"https:\/\/learnlearn.uk\/algorithms\/wp-json\/wp\/v2\/pages\/112"}],"collection":[{"href":"https:\/\/learnlearn.uk\/algorithms\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/learnlearn.uk\/algorithms\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/learnlearn.uk\/algorithms\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/learnlearn.uk\/algorithms\/wp-json\/wp\/v2\/comments?post=112"}],"version-history":[{"count":7,"href":"https:\/\/learnlearn.uk\/algorithms\/wp-json\/wp\/v2\/pages\/112\/revisions"}],"predecessor-version":[{"id":185,"href":"https:\/\/learnlearn.uk\/algorithms\/wp-json\/wp\/v2\/pages\/112\/revisions\/185"}],"wp:attachment":[{"href":"https:\/\/learnlearn.uk\/algorithms\/wp-json\/wp\/v2\/media?parent=112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}