Table of Contents
Encoding Techniques
Encoding techniques are methods used to convert data into a specific format for efficient storage, transmission, or processing. These techniques are widely applied in fields such as telecommunications, data storage, and information security to optimize performance and ensure data integrity.
In addition to encoding, encryption is a crucial technique used to secure data by converting it into a coded format that is only decipherable with the appropriate key, ensuring privacy and protection against unauthorized access.
BCD
BCD (Binary-Coded Decimal) is a method of encoding decimal numbers where each digit is represented by its own binary sequence, typically using 4 bits. This coding simplifies the conversion between binary and decimal systems, making it useful in applications like digital clocks, calculators, and financial systems, where precise decimal representation is important. BCD is particularly favored in hardware-level computations for improved accuracy in handling decimal data.
Lecture Notes
Exercises
In a communication system, we want to transmit numbers from 40 to 119 using a fixed-length BCD code with parity checking.
a) What will be the length of the encoded messages if each decimal digit is encoded with 4 bits in BCD encoding?
b) Create a possible structure of the code table that assigns the binary representation of digits to the numbers. What will be the code for the numbers 42, 87, 100, and 111 in the system?
c) What will be the entropy and redundancy of this code if the occurrence of numbers in the range 40 $\leq$ n $\leq$ 69 is four times more frequent than the occurrence of numbers in the range 70 $\leq$ n $\leq$ 119?
d) How many bits would the messages be if we used pure binary coding with parity checking?
Huffman
Huffman coding is a lossless data compression algorithm that assigns variable-length codes to input characters based on their frequencies: more frequent characters receiving more shorter codes. This technique efficiently reduces the size of data for storage or transmission. It is widely used in applications such as file compression (e.g., ZIP), multimedia encoding (e.g., JPEG and MP3), and in communication systems where optimizing bandwidth is crucial.
Lecture Notes
Exercises
Explain Huffman encoding by encoding the message COMPRESSION_IS_COOL!
Explain Huffman encoding by encoding the message HELLO_WORLD_HELLO_EVERYONE!
LZW
LZW (Lempel-Ziv-Welch) coding is a lossless data compression algorithm that replaces repeated sequences of data with shorter codes, thus reducing file size without losing information. It is widely used in applications such as image compression (e.g., GIF), PDF files, and in systems that require efficient storage and transmission, like data archives and network protocols.
Lecture Notes and Videos
Exercises
1.1. Explain LZW encoding by encoding the message ABABABAB!
1.2. Decode the received message using only the initial dictionary!
2.1. Encode the message ABRACADABRAABRACADABRA with LZW coding!
2.2. Decode the received message using only the initial dictionary!
RSA
RSA (Rivest-Shamir-Adleman) is a widely used asymmetric cryptographic algorithm that secures data through a pair of public and private keys, enabling secure encryption and decryption. Its strength lies in the difficulty of factoring large prime numbers, providing robust protection for sensitive information. RSA is commonly applied in secure communication protocols, such as SSL/TLS for internet security, digital signatures, and email encryption.
Lecture Notes
Exercises
In an RSA code, p=11, q=31, e=7, d=103. Encrypt the message 252 with the private key!
In an RSA code, p=11, q=29, e=3, d=187. After encoding with the public key, we receive the message 81. What was the original message?