Professional Documents
Culture Documents
MODULE 8 Binary Coding
MODULE 8 Binary Coding
Coding Theory
and
Cryptography
At the end of the period, the students should be able to
26 = 64 25 = 32 24 = 16 23 = 8 22 = 4 21 = 2 20 = 1
eights fours twos ones
Converting Decimal Number to Binary Number
Solution A. Base 2 Method
26 = 64 25 = 32 24 = 16 23 = 8 22 = 4 21 = 2 20 = 1
Step 1: Choose a base 2 number in the binary number system that is less than or equal
to 9. Make it sure that each group must have 4 members. That is,
23 = 8 22 = 4 21 = 2 20 = 1
- Divide the given decimal number into 2 and determine if there is a remainder. If there is no
remainder, put “0” and if there is, put “1”
Therefore, 25 = 11001
Converting Binary Number to Decimal Number
B an 2n an 1 2n 1 an 2 2n 2 ...... a0
Solution.
Example: Code the message “LOVE GOD” using the binary code.
Letter L O V E G O D
Decimal 76 79 86 69 71 79 68
Binary 01001100 01001111 01010110 01000101 01000111 01001111 01000100
Step 2. 26 = 64 + 23 = 8 + 22 = 4
Step 3. 01001100
01001100010011110101011001000101010001110100111101000100
Decoding of Message Using Binary Codes
4. Make a message that contains 3 words. Use the binary equivalent of the
letters in encoding or decoding the message.