Search for more details......

What is the parrity bit?



Parity bit is a simple error detection method used in data transferring devices. While data transferring one device to another device, that data could be changed(there are many reasons to differ data during transmission) during the transmission. How can we know that data received by the second device is changed or not.

How does it work?


When the parity checking enabled, transmit 8 bits, that contains 7bits of data and a parity. Most significant bit is the parity bit.(Left most bit).

    |data bits|
 10010110
^
Parity bit




There are two types parity bit.

  • Even parity
  • Odd parity


Even Parity

Parity bit set to 1, if count of ones in 7 data bits is odd, else parity bit set to 0.

Example

We have 0110010, 7bits of data.

Count of ones=3

So parity bit is 1(3 is odd)

So we found that 10110010 with parity bit.

Now look at this again. Count 1's in resulting value. It is 4.

4 is an Even number, that's why this parity type called Even Parity.


Odd Parity

As same as even parity, odd parity pit set to 1 if count of 1's bit in data value is even.

Example

0110010

Count of 1's=3.

So parity bit is 0(3 is odd)

So result is 00110010

Check 1's of in this value. Odd!



There are software and hardware parity checkers in data transferring systems.


No comments:

Post a Comment