The purpose and basis of source coding is to reduce the redundancy of information as much as possible and realize the effectiveness of information transmission. At present, the effective methods to reduce information redundancy are huffman encoding, arithmetic coding and L-Z coding, which have long been known in information theory, and I personally wrote an implementation of huffman encoding.
2. Digital signal generation and level coding
Digital signals can be transmitted directly through baseband. Baseband refers to the basic frequency band. To put it bluntly, it is transmitted directly through the line without any analog frequency conversion modulation. Baseband transmission is an electric pulse that directly transmits digital signals in the line, and it is the simplest transmission mode. The local area network of short-distance communication adopts baseband transmission, but this mode cannot be transmitted in wireless system and must be modulated. Therefore, in actual communication, mobile communication and wireless communication do not appear in this way. At that time, baseband transmission was only the prototype of real RF signal, and it had to be equipped with an antenna.
In the baseband digital communication system, the code output by the channel encoder needs to be converted into a code suitable for transmission. Commonly used baseband digital coding methods include bipolar non-return-to-zero code, unipolar non-return-to-zero code, bipolar return-to-zero code, unipolar return-to-zero code and Manchester code.
The so-called "unipolar" here means that the digital signal 1 and 0 are represented by positive pulses and zero respectively, and there is no negative pulse; The so-called "bipolar" means that the digital signal 1 and 0 are represented by positive pulses and negative pulses respectively. It must be explained that 0, 1 here is a pure mathematical symbol and concept, and how to turn these concepts and symbols or information into physically suitable energy for transmission or emission in cable or wireless, and positive pulse and negative pulse are the physical meanings.
#include
using namespace std;