Constant-weight code: Difference between revisions

Content deleted Content added
No edit summary
Line 23:
== m of n codes==
 
An '''''m'' of ''n'' code''' is a separable [[error detection]] code with a code word length of ''n'' bits, where each code word contains exactly ''m'' instances of a "one." A single bit error will cause the code word to have either ''m'' + 1 or ''m'' – 1 "ones.". An example ''m''-of-''n'' code is the [[Two-out-of-five code|2 of 5 code]] used by the [[United States Postal Service]].
 
The simplest implementation is to append a string of ones to the original data until it contains ''m'' ones, then append zeros to create a code of length ''n''.