What is Running Disparity (RD)?
We define the Running Disparity (or RD) as the difference between the number of logic 1 bits and logic 0 bits between the start of a data sequence and a particular instant in time during its transmission.
In other words, the RD for a character is the difference between the number of logic 1 bits and logic 0 bits in that character.
Hence, if there are more logic 1 bits than logic 0 bits (within a character or string of consecutive bits), we can state that the RD is positive.
If there are more logic 0 bits than logic 1 bits, then we can state that the RD is negative.
Finally, if the number of logic 1 and logic 0 bits are the same, we can state that the RD is neutral or zero.
We can express the Running Disparity as either an integer or as a ratio:
EXPRESSING RD AS AN INTEGER NUMBER:
If you wish to express the RD of a character or string (of consecutive bits) as an integer number, then you can calculate the RD with the following equation:
RD = (Number of Logic 1 bits in the character or string) – (Number of Logic 0 bits in the character or string)
The running disparity of the hexadecimal expression of 0x78 is 0.
To understand why this is the case, if we were to express this value in its binary format, we get 0111 1000. The binary expression (for this value) contains four 0s and four 1s.
Thus, RD = 4 – 4 = 0
On the other hand, the running disparity of the hexadecimal expression of 0x7F is +6.
Again, if we were to express this value in its binary format, we would get 0111 1111. The binary expression (for this value) contains seven 1s and one 0.
Hence, RD = 7 – 1 = +6
EXPRESSING RD AS A RATIO:
If you wish to express the RD of a character or string (of consecutive bits) as a ratio, then you would do the following:
- Count the total number of logical “1s” in the expression.
- Count the total number of logical “0s” in the expression.
And then express this information in the following format:
Number of Logical 1s (in character/string) : Number of Logical 0s (in character/string)
We express the running disparity of the hexadecimal expression of 0x78 as:
4:4, which we can reduce (or simplify) to 1:1.
Likewise, we can compute and express the RD for the value 0x7F as
Some communication and data storage system standards (such as Gigabit Ethernet/1000BASE-X, Fibre-Channel, etc.) require that we maintain the RD as near to neutral as possible.
The system designer must ensure that the ratio of logical 1 bits to logical 0 bits (over time) should be kept close to 1:1.
Thus, the System Designer must follow any character/string with negative disparity with another character/string with an equal amount of positive disparity, and vice-versa.
Keeping RD to a minimum is to maintain dc balance on the transmission medium.
The System Designer must ensure that the RD does not increase without bounds.
The 8B/10B line code is a specific example of a line code that requires and exercises control over RD.
NOTE: Controlling and monitoring RD can also help detect transmission errors.