This articlerelies largely or entirely on asingle source. Relevant discussion may be found on thetalk page. Please helpimprove this article byintroducing citations to additional sources. Find sources: "Modulo-N code" – news ·newspapers ·books ·scholar ·JSTOR(October 2025) |
Modulo-N code is alossy compression algorithm used to compresscorrelated data sources usingmodular arithmetic.
When applied to two nodes in anetwork whose data are in close range of each other modulo-N code requires one node (say odd) to send the coded data value as the raw data; the even node is required to send the coded data as the. Hence the name modulo-N code.
Since at least bits are required to represent a numberK in binary, the modulo coded data of the two nodes requires bits. As we can generally expect always, because. This is how compression is achieved.[1]
A compression ratio achieved is
At the receiver, by joint decoding, we may complete the process of extracting the data and rebuilding the original values. The code from the even node is reconstructed by theassumption that it must be close to the data from the odd node. Hence the decoding algorithm retrieves even node data as
The decoder essentially finds the closest match to and the decoded value is declared as
For a mod-8 code, we haveEncoder
D_o=43,D_e=47M_o=43,M_e=47 mod(8) = 7,
Decoder
M_o=43,M_e=47 mod(8) = 7, D_o=43,D_e=CLOSEST(43,8⋅k + 7) D_o=43,D_e=47Modulo-N decoding is similar tophase unwrapping and has the same limitation: If the difference from one node to the next is more thanN/2 (if the phase changes from one sample to the next more than), then decoding leads to an incorrect value.