CIS 0823. Mathematics for a Digital World

Information Science

1. Binary code

binary code, digital system, ASCII code, encoding & decoding

2. Error detection/correction code

Errors in transmission and storage when using binary code.

Error detection with parity-check sums: adding an extra bit to keep an even parity (or odd parity).

How error-correcting code works: (1) divide bits in code into (overlapping) groups, (2) decide the parity of every group, (3) confirm parity during encoding and decoding.

Example: When the message is a1a2a3a4, the code word is a1a2a3a4c1c2c3, where
c1 = a1+a2+a3, c2 = a1+a3+a4, c3 = a2+a3+a4

figure-17-1 (11K) figure-17-2 (6K) figure-17-3 (6K) figure-17-4 (6K)
1: message, 2: code word, 3: received code, 4: error correction

figure-17-5 (38K)

The weight of a binary code is the minimum number of 1's that occur among all nonzero code words of that code.

Assume the weight of a binary code is t. The code will detect (though not fix) t-1 errors. If t is odd, the code will correct (t-1)/2 errors, if t is even, the code will correct (t-2)/2 errors. For example, the weight of the above code (Table 17.1, page 534) is 3, so it can either detect 2 errors or correct 1 error.

The distance between two binary strings of equal length is the number of positions in which the two strings differ.

Nearest-Neighbor Decoding Method

Another distance-based explanation of error correcting code.

3. Compression coding

Data compression: lossless vs. lossy (example: ZIP vs. MP3)

Delta Encoding

Huffman Coding

4. Cryptography

Caesar cipher

Modular Arithmetic: m mod n is the remainder when m is divided by n.

Vigenere cipher

ABCDEFG HIJKLMN OPQRSTU VWXYZ
0123456 78910111213 14151617181920 2122232425

Credit card number, in binary code, can be encrypted and decrypted by adding the same binary key.

Public Key Encryption

Cryptogram

Homework: Chapter 17 Exercises No. 11, 21, 29, 32, 43