0
$\begingroup$

I've seen both ways of counting the bits when determining where to place the parity bits in a 1 bit error correction Hamming code. Some people count the bits starting from the left, others do it by starting from the right.

When to use one or the other? Does this depends on the Endian ordering?

$\endgroup$
0
$\begingroup$

Yes, it is about what bit-endianness you choose. Just make sure you are using the same interpretation on both ends.

(However if on 'Endian ordering' you meant byte order, that does not really apply here. As most Hamming codes do not transfer a whole number of data bytes, it is far simpler to think about the input as a stream of bits)

$\endgroup$
  • $\begingroup$ Thanks. Just to be sure : to determine which are the parity bits, I count them from right to left if I'm in Big Endian and from left to right if I'm in Little Endian? Or is it the other way around? What confuses me a little is that I've read this in the "Computer Organization and Design" book : "Start numbering bits from 1 on the left, as opposed to the traditional numbering of the rightmost bit being 0". $\endgroup$ – hav000ookk Jun 5 '17 at 12:38
  • $\begingroup$ @hav000ookk "big endian" and "little endian" are about the order of bytes (in memory, or anywhere else). What you see here is bit numbering, which is more commonly called LSB 0 or MSB 0, but can be referred as little bit-endian and big bit-endian too (in this case saying/writing the 'bit' part is important). $\endgroup$ – tevemadar Jun 5 '17 at 13:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.