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$

1 Answer 1

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$
2
  • $\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
    Commented Jun 5, 2017 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
    Commented Jun 5, 2017 at 13:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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