Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Parity bit
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Bit added to a binary string for error detection}} {{broader|Parity (mathematics)}} {{more citations needed|date=January 2022}} {| class="wikitable" style="float: right; text-align: center; margin: 1em;" |- ! rowspan="2" | 7 bits of data<br/> ! rowspan="2" | (count of 1-bits) ! colspan="2" | 8 bits including parity |- ! even ! odd |- | 0000000 |0 | 0000000'''0''' | 0000000'''1''' |- | 1010001 | 3 | 1010001'''1''' | 1010001'''0''' |- | 1101001 |4 | 1101001'''0''' | 1101001'''1''' |- | 1111111 |7 | 1111111'''1''' | 1111111'''0''' |} A '''parity bit''', or '''check bit''', is a [[bit]] added to a string of [[binary code]]. Parity bits are a simple form of [[Error detection and correction|error detecting code]]. Parity bits are generally applied to the smallest units of a communication protocol, typically 8-bit [[octet (computing)|octets]] (bytes), although they can also be applied separately to an entire message string of bits. The parity bit ensures that the [[Hamming weight|total number of 1-bits]] in the string is [[Even and odd numbers|even or odd]].<ref>{{Cite book |title=Principles of communication : systems, modulation, and noise |last1=Ziemer |first1=RodgerE. |last2=Tranter |first2=William H. |date=17 March 2014 |isbn=9781118078914 |edition=Seventh |location=Hoboken, New Jersey |oclc=856647730}}</ref> Accordingly, there are two variants of parity bits: '''even parity bit''' and '''odd parity bit'''. In the case of even parity, for a given set of bits, the bits whose value is 1 are counted. If that count is odd, the parity bit value is set to 1, making the total count of occurrences of 1s in the whole set (including the parity bit) an even number. If the count of 1s in a given set of bits is already even, the parity bit's value is 0. In the case of odd parity, the coding is reversed. For a given set of bits, if the count of bits with a value of 1 is even, the parity bit value is set to 1 making the total count of 1s in the whole set (including the parity bit) an odd number. If the count of bits with a value of 1 is odd, the count is already odd so the parity bit's value is 0. Even parity is a special case of a [[cyclic redundancy check]] (CRC), where the 1-bit CRC is generated by the [[polynomial]] ''x''+1.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)