CS601 Assignment. 2

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

‭(CS601 Assignment:No:2)‬

‭Solution:No:1‬
‭K ( Data word ) = 8‬
‭R (Redundancy) = 2 ( 0, 1)‬
‭N = k + r‬
‭N = 8 +2‬
‭N = 10‬
‭Total code words id = 2^ 10‬
‭=1025‬
‭1)‬ ‭Valid code – words‬
‭Valid code – words = 2^ k‬
‭=2 ^8‬
‭= 256‬

‭2)‬ ‭Invalid code - words‬


‭Invalid code – words = 2^n – 2^ k‬
‭Put n = k + r‬
‭Invalid code word = 2^ ( k + r ) – 2 ^ k‬
‭= 2^ ( 8 + 2 ) – 2^ 8‬
‭=2^ (10) – 2^ 8‬
‭= 1025 – 256‬
‭= 768‬
‭Invalid code word = 768‬

‭Solution:No:2‬
‭ alculate The Hamming distance given in the below table for each of the‬
C
‭following code words?‬
‭Code Words‬ ‭Hamming Distance‬
‭d (10000, 00000)‬ ‭The hamming distance is‬‭1‬
‭d (10101, 10000)‬ ‭The hamming distance is‬‭2‬
‭d ( 00000, 11111)‬ ‭The hamming distance is‬‭5‬
‭d (00000, 00000)‬ ‭The hamming distance is‬‭0‬
‭d (000, 011)‬ ‭The hamming distance is‬‭2‬

You might also like