Developments in digital communications occur at a very rapid pace. High-speed communications operate preferably in fixed connection through fiber optic means. Since this type of communication is quite costly to implement even in developed countries, the power-line infrastructure - through which every household is connected to the power grid at low voltages - could be used as a communication medium since it uses an existing infrastructure. The quality of the transmission over power lines depends amongst others, on the noise level at the receiver and the attenuation of the electrical signal at different frequencies. The higher the noise level, the harder it is to detect the received signal. The use of spectral shaping and distance-preserving mappings techniques to design new codes and then combine them with certain modulation schemes produce a new class of codes with better error correction capability and better spectrum shape. These codes can make use of the Viterbi decoding algorithm in a very harsh environment like the power-line communication channel.