Encoding is the process of converting data into a digital format for transmission. There are different encoding techniques for analog and digital data. Common digital to digital encoding techniques include NRZ, NRZI, Manchester, and 4B/5B encoding. NRZ assigns a voltage level to represent each bit but can cause issues with long strings of the same bit. NRZI and Manchester encoding add transitions to distinguish bits and allow synchronization. 4B/5B encoding groups bits into blocks and maps them to code words, preventing long runs of the same bit. These encoding techniques allow reliable transmission of digital data over networks.