{"id":14,"date":"2023-03-09T18:53:11","date_gmt":"2023-03-09T18:53:11","guid":{"rendered":"https:\/\/paritybits.net\/?page_id=14"},"modified":"2023-03-10T15:23:00","modified_gmt":"2023-03-10T15:23:00","slug":"parity","status":"publish","type":"page","link":"https:\/\/paritybits.net\/","title":{"rendered":"What is Parity."},"content":{"rendered":"\n<p>In mathematics parity can refer to the evenness or oddness of an integer, which, when written in its binary form, can be determined just by examining only its least significant bit.<\/p>\n\n\n\n<p>In information technology parity refers to the evenness or oddness, given any set of binary digits, of the number of those bits with value one. Because parity is determined by the state of every one of the bits, this property of parity\u2014being dependent upon all the bits and changing its value from even to odd parity if any one bit changes\u2014allows for its use in error detection and correction schemes.<\/p>\n\n\n\n<p>In telecommunications the parity referred to by some protocols is for error-detection. The transmission medium is preset, at both end points, to agree on either odd parity or even parity. For each string of bits ready to transmit (data packet) the sender calculates its parity bit, zero or one, to make it conform to the agreed parity, even or odd. The receiver of that packet first checks that the parity of the packet as a whole is in accordance with the preset agreement, then, if there was a parity error in that packet, requests a re-transmission of that packet.<\/p>\n\n\n\n<p>In computer science the parity stripe or parity disk in a RAID provides error-correction. Parity bits are written at the rate of one parity bit per n bits, where n is the number of disks in the array. When a read error occurs, each bit in the error region is recalculated from its set of n bits. In this way, using one parity bit creates &#8220;redundancy&#8221; for a region from the size of one bit to the size of one disk. See \u00a7 Redundant Array of Independent Disks below.<\/p>\n\n\n\n<p>In electronics, transcoding data with parity can be very efficient, as XOR gates output what is equivalent to a check bit that creates an even parity, and XOR logic design easily scales to any number of inputs. XOR and AND structures comprise the bulk of most integrated circuitry.<br><br><\/p>\n\n\n\n<p>A parity bit, also known as a check bit, is a single bit that can be appended to a binary string. It is set to either 1 or 0 to make the total number of 1-bits either even (&#8220;even parity&#8221;) or odd (&#8220;odd parity&#8221;).<\/p>\n\n\n\n<p>The purpose of a parity bit is to provide a simple way to check for errors later. When data is stored or transferred electronically, it&#8217;s not uncommon for bits to &#8220;flip&#8221; \u2014 change from a 1 to a 0, or vice versa. Parity checks can detect these errors. For example, to check a binary sequence with even parity, the total number of ones can be counted. If the number of ones is not even, an error is likely to have occurred.<\/p>\n\n\n\n<p>The inherent weakness in this type of error checking is that it can only detect an odd number of errors in the sequence. If an even number of bits are flipped, a parity check will not catch it.<\/p>\n\n\n\n<p>Example parity checking process<br>The data 10101 is given the even parity bit of 1, resulting in the bit sequence 101011.<br>This data is transferred to another computer. In transit, the data is corrupted, and the computer receives the incorrect data 100011.<br>The receiving computer computes the parity: 1+0+0+0+1+1 = 3. It then performs 3 modulo 2 (the remainder of 3 divided by 2), expecting the result 0 which would indicate that the number is even.<br>Instead, it receives the result 3 modulo 2 = 1, indicating that the number is odd. Because it is looking for numbers with even parity, it asks the original computer to send the data again.<br>This time, the data comes through with no errors: 101011. The receiving computer calculates 1+0+1+0+1+1 = 4.<br>4 modulo 2 = 0, indicating even parity. The parity bit is stripped from the end of the sequence, and the data 10101 is accepted.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-rich is-provider-embed-handler wp-block-embed-embed-handler wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<div class=\"nv-iframe-embed\"><iframe loading=\"lazy\" title=\"How to send a self-correcting message (Hamming codes)\" width=\"1200\" height=\"675\" src=\"https:\/\/www.youtube.com\/embed\/X8jsijhllIA?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen><\/iframe><\/div>\n<\/div><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In mathematics parity can refer to the evenness or oddness of an integer, which, when written in its binary form, can be determined just by examining only its least significant bit. In information technology parity refers to the evenness or oddness, given any set of binary digits, of the number of those bits with value&hellip;&nbsp;<a href=\"https:\/\/paritybits.net\/\" class=\"\" rel=\"bookmark\">Read More &raquo;<span class=\"screen-reader-text\">What is Parity.<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":2,"comment_status":"closed","ping_status":"closed","template":"","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","footnotes":""},"class_list":["post-14","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>What is Parity. - Error correction is fun.<\/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:\/\/paritybits.net\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is Parity. - Error correction is fun.\" \/>\n<meta property=\"og:description\" content=\"In mathematics parity can refer to the evenness or oddness of an integer, which, when written in its binary form, can be determined just by examining only its least significant bit. In information technology parity refers to the evenness or oddness, given any set of binary digits, of the number of those bits with value&hellip;&nbsp;Read More &raquo;What is Parity.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/paritybits.net\/\" \/>\n<meta property=\"og:site_name\" content=\"Error correction is fun.\" \/>\n<meta property=\"article:modified_time\" content=\"2023-03-10T15:23:00+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/paritybits.net\/\",\"url\":\"https:\/\/paritybits.net\/\",\"name\":\"What is Parity. - Error correction is fun.\",\"isPartOf\":{\"@id\":\"https:\/\/paritybits.net\/#website\"},\"datePublished\":\"2023-03-09T18:53:11+00:00\",\"dateModified\":\"2023-03-10T15:23:00+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/paritybits.net\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/paritybits.net\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/paritybits.net\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/paritybits.net\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"What is Parity.\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/paritybits.net\/#website\",\"url\":\"https:\/\/paritybits.net\/\",\"name\":\"Error correction is fun.\",\"description\":\"Ever wanted to learn about error correction?\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/paritybits.net\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What is Parity. - Error correction is fun.","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:\/\/paritybits.net\/","og_locale":"en_US","og_type":"article","og_title":"What is Parity. - Error correction is fun.","og_description":"In mathematics parity can refer to the evenness or oddness of an integer, which, when written in its binary form, can be determined just by examining only its least significant bit. In information technology parity refers to the evenness or oddness, given any set of binary digits, of the number of those bits with value&hellip;&nbsp;Read More &raquo;What is Parity.","og_url":"https:\/\/paritybits.net\/","og_site_name":"Error correction is fun.","article_modified_time":"2023-03-10T15:23:00+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/paritybits.net\/","url":"https:\/\/paritybits.net\/","name":"What is Parity. - Error correction is fun.","isPartOf":{"@id":"https:\/\/paritybits.net\/#website"},"datePublished":"2023-03-09T18:53:11+00:00","dateModified":"2023-03-10T15:23:00+00:00","breadcrumb":{"@id":"https:\/\/paritybits.net\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/paritybits.net\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/paritybits.net\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/paritybits.net\/"},{"@type":"ListItem","position":2,"name":"What is Parity."}]},{"@type":"WebSite","@id":"https:\/\/paritybits.net\/#website","url":"https:\/\/paritybits.net\/","name":"Error correction is fun.","description":"Ever wanted to learn about error correction?","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/paritybits.net\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/paritybits.net\/index.php?rest_route=\/wp\/v2\/pages\/14","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/paritybits.net\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/paritybits.net\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/paritybits.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/paritybits.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14"}],"version-history":[{"count":5,"href":"https:\/\/paritybits.net\/index.php?rest_route=\/wp\/v2\/pages\/14\/revisions"}],"predecessor-version":[{"id":29,"href":"https:\/\/paritybits.net\/index.php?rest_route=\/wp\/v2\/pages\/14\/revisions\/29"}],"wp:attachment":[{"href":"https:\/\/paritybits.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}