For $7$ bit Hamming code, parity positions are
$1,2,4$
Data positions are
$3,5,6,7$
Given data bits are
$1101$
So,
$D_1=1,\ D_2=1,\ D_3=0,\ D_4=1$
Arrange them as:
$P_1\ P_2\ D_1\ P_4\ D_2\ D_3\ D_4$
$=P_1\ P_2\ 1\ P_4\ 1\ 0\ 1$
For even parity,
$P_1$ checks positions $1,3,5,7$
$P_1+1+1+1=\text{even}$
$P_1=1$
$P_2$ checks positions $2,3,6,7$
$P_2+1+0+1=\text{even}$
$P_2=0$
$P_4$ checks positions $4,5,6,7$
$P_4+1+0+1=\text{even}$
$P_4=0$
Therefore, Hamming code is
$1010101$
Which of the following binary codes for decimal digits are self complementing?
(a) $8421$ code
(b) $2421$ code
(c) excess-$3$ code
(d) excess-$3$ gray code
Choose the correct option:
A self-complementing code is a code in which the $9$'s complement of a decimal digit is obtained by complementing all bits.
$8421$ code is not self-complementing.
$2421$ code is self-complementing.
Excess-$3$ code is also self-complementing.
So, correct codes are:
(b) and (c)
Online Test Series, Information About Examination,
Syllabus, Notification
and More.
Online Test Series, Information About Examination,
Syllabus, Notification
and More.