*Devise a code for the digits 0 to 9 whose Hamming distance is 2.*(adsbygoogle = window.adsbygoogle || []).push({});

My efforts to answer this problem are kind of hard to explain, but I'll try. First I wrote out the digits 0 to 9 in binary. Then I tried to find a number that was only 2 numbers different from each one (get 2 ones when XOR them), but there was no single code that worked for all 9 numbers. I found one that worked from 0 to 7, but once the digits changed to 1000 it didn't work anymore.

Am I even approaching this right? Please help.

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Hamming code and distance

Loading...

Similar Threads - Hamming code distance | Date |
---|---|

What should be the rules to write excellent code? | Mar 12, 2018 |

Converting a DFA to efficient code? | Mar 11, 2018 |

Python How can I run Python by getting values from Matlab | Mar 7, 2018 |

PID Codes | Feb 22, 2018 |

Efficiently computing the parity of the Hamming weight of a binary sequence | Aug 11, 2012 |

**Physics Forums - The Fusion of Science and Community**