Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between using mark/space parity and parity none?

What is the purpose having created three type of parity bits that all define a state where the parity bit is precisely not used ?

"If the parity bit is present but not used, it may be referred to as mark parity (when the parity bit is always 1) or space parity (the bit is always 0)" - Wikipedia

like image 957
n0n0bstan Avatar asked Dec 19 '12 13:12

n0n0bstan


People also ask

What is the purpose of the parity bit explain the difference between odd and even parity systems?

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 ("even parity") or odd ("odd parity"). The purpose of a parity bit is to provide a simple way to check for errors later.

What is the purpose of using parity bits?

The parity bit, unlike the start and stop bits, is an optional parameter, used in serial communications to determine if the data character being transmitted is correctly received by the remote device.


1 Answers

There is a very simple and very useful reason to have mark or space parity that appears to be left out here: node address flagging.

Very low-power and/or small embedded systems sometimes utilize an industrial serial bus like RS485 or RS422. Perhaps many very tiny processors may be attached to the same bus.

These tiny devices don't want to waste power or processing time looking at every single character that comes in over the serial port. Most of the time, it's not something they're interested in.

So, you design a bus protocol that uses for example maybe 9 bits... 8 data bits and a mark/space parity bit. Each data packet contains exactly one byte or word (the node address) with the mark parity bit set. Everything else is space parity. Then, these tiny devices can simply wait around for a parity error interrupt. Once it get's the interrupt, it checks that byte. Is that my address? No, go back to sleep.

It's a very power-efficient system... and only 10% wasteful on bandwidth. In many environments, that's a very good trade-off.

So... if you've then got a PC-class system trying to TALK to these tiny devices, you need to be able to set/clear that parity bit. So, you set MARK parity when you transmit the node addresses, and SPACE parity everywhere else.

like image 181
darron Avatar answered Sep 18 '22 08:09

darron