29-04-2016  (2347 lectures) Categoria: Articles

Joc del Guess

Retalla les 5 cartes a mostrades a continuació.
Dona  les 5 cartes a un amic, i demana-li que pensi un número secret entre 1 i 31, i que et torni totes les cartes en que apareix aquest número.
Pots endevinar el número secret mitjançant la suma de tots els primers números de les cartes que t'ha tornat. Per exemple, si et torna les cartes 1ª i 3ª de la fila de dalt, llavors el nombre secret seria el 20, ja que els primers números d'aquestes cartes són 16 i 4, que sumen 20.

El sistema EDAC dels ordinadors (Error detection and correction) funciona mitjançant un principi molt similar

 


Com funciona?

Remember how to write the numbers from 1 to 31 in binary? See the chart below if you forgot. The sequence of 1's and 0's in a binary number tell us which powers of 2 add up to make the number. For example, 19 = 16+2+1, so in binary we write 10011.

Now notice that the number 19 appears only on the first, fourth, and fifth cards above. That is, 19 appears on the cards with first numbers 16, 2, and 1, and it does not appear on the cards 8 or 4.

The 5 cards correspond to the powers of 2. The numbers that are on the first card (with "16" as the first number) are the ones that have a "1" in the 16's position when we write it in binary. The numbers on the "8" card are those with a "1" in the 8 position in binary. And so on for the other cards. So, when you add up first numbers on the cards that a "secret" number is on, you are adding up the powers of two that add up to the secret number!

Contant en Binari:




versió per imprimir

Comentaris publicats

    Afegeix-hi un comentari:

    Nom a mostrar:
    E-mail:
    Genera una nova imatge
    Introduïu el codi de seguretat
    Accepto les condicions d'ús següents:

    Per a participar en els comentaris l'usuari es compromet a complir i acceptar les següents normes bàsiques de conducta:

    • Respectar les opinions de la resta dels participants al fòrum, tot i no compartir-les necessàriament.
    • Abstenir-se d'insultar o utilitzar un llenguatge ofensiu, racista, violent o xenòfob, i no tenir cap conducta contrària a la legislació vigent i a l'ordre públic.
    • No enviar cap contingut amb copyright sense el permís del propietari. Si es considera oportú facilitar continguts d'internet amb copyright, cal escriure la URL completa perquè els altres usuaris puguin enllaçar-hi i descarregar-se els continguts des de la pàgina propietària.
    • Publicitat: No es permet enviar continguts promocionals i/o publicitaris.