For the 8 bit word 00111001,the check bits stored with it would we 0111. Suppose when the word is read from memory, the check bits are calculated to be 1101. What is the data word that was read from memory?
Given 8 bit word 00111001. encoded in d8=0 d7=0 d6=1 d5=1 d4=1 d3=0 d2=0 d1=1.
Parity is calculated as 01111 which are written as p8p4p2p1.
encode the string as
check bit at other end is 1101.
xor(1101,0111)=1010 . its decimal conversion is 10. so 10th bit is changed.
10th bit is d6. so we flip it. and we get
In this encoding process,
We are going to append the check bits in our original strong.
Check bits are positioned using the power of 2, i.e, from right to left it will be 2^0 = 1, 2^1 = 2, 2^2 = 4, 2^3 = 8.
So from right side we reserve 1,2,4,8 positions and the original string will be allocated the rest of the places.
So, we will get -
(start from right to left)