An encoder includes a mapping module that receives input words including
first input words and second input words. The mapping module maps the
first input words to first output words that are run-length limited and
have a digital sum that is equal to zero. The mapping module maps the
second input words to second output words that are run-length limited and
have one of a positive and a negative digital sum. An inverter module
selectively inverts the second output words based on a cumulative digital
sum of the second output words.