Azzera filtri
Azzera filtri

How to get number of parity bits for given number of string length

8 visualizzazioni (ultimi 30 giorni)
Hello,
Number of parity bits for a given number of string length?
Suppose I am giving '7' as number of string length, the i am looking for
any one can help
thanks
  2 Commenti
Jan
Jan il 22 Gen 2019
Does "number of string length" mean "string length"?
You can define as many parity bits as you want. So it depends on the protocol how many are used.
Raghwan Chitranshu
Raghwan Chitranshu il 23 Gen 2019
yeah ... its String length ... if N is string length then ?

Accedi per commentare.

Risposte (1)

Walter Roberson
Walter Roberson il 23 Gen 2019
"parity bit" is a family of techniques, not one particular technique.
A parity bit calculation involves the bitwise exclusive "or" of a number of positions in the data, and the parity bit is then set so that when it is included in the calculation, the end result is either 1 ("odd parity") or 0 ("even parity"). But where the parity bits are placed relative to the other bits is up to the implementation, and which bits are taken together to form a particular parity bit is up to the installation, including the possibility that some inputs bits might contribut to multiple output bits.
For example it would be a valid scheme to say that odd parity is to be calculated for the first 9 bits, and even parity is to be calculated for the next 5 bits, and then odd parity is to be calculated on bits 1:2:19 and then even parity is to be calculated on bits 2:2:20 and then those 4 parity bits are to be placed after the 20 input bits to form a 24 bit system in which bits 1:14 contribute to two different parity bits but bits 15:20 contribute to only 1 parity bit.
We therefore cannot answer the question of how many parity bits should be used for a given string length: it depends on what parity pattern you are using.
Historically it has not been uncommon for packet-oriented protocols to have either one octet (8 bits) or one nibble (4 bits) of parity per packet.
Parity is typically only used for basic sanity checks, not for any serious purpose. There are other techniques that work much better for error detection and error correction.

Tag

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by