El hecho de partir de elementos binarios en los números cíclicos es por la facilidad de definir operaciones.
Los operadores más sencillos en números binarios son "AND", "OR" y "XOR".
AND | OR | XOR | ||||||||
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||
0 | 1 | 0 | 0 | 1 | 1 | 0 | 1 | 1 | ||
1 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 1 | ||
1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 |
Si partimos del conjunto de cuatro elementos:
[ {0,0,0,0}, {0,0,0,1}, {0,0,1,1}, {0,1,0,1}, {0,1,1,1} y {1,1,1,1} ]
El operador operará sobre cada elemento,
(No olvidar que los elementos son rotables {0,0,0,1} = {0,0,1,0} = {0,1,0,0} = {1,0,0,0}
a modo de ejemplo:
{0,0,0,1}&{0,0,0,1}={0&0,0&0,0&0,1&1} = {0,0,0,1}
pero también:
{0,0,0,1}&{0,0,1,0}={0&0,0&0,0&1,0&1} = {0,0,0,0}
{0,0,0,1}&{0,1,0,0}={0&0,0&1,0&0,0&1} = {0,0,0,0}
{0,0,0,1}&{1,0,0,0}={0&1,0&0,0&0,0&1} = {0,0,0,0}
Solución:
{0,0,0,1}&{0,0,0,1}={0,0,0,1}25%, {0,0,0,1}75%
Y continuando:
AND | OR | XOR | ||||||||||
0000 | 0000 | 0000 | 0000 | 0000 | 0000 | 0000 | 0000 | 0000 | ||||
0000 | 0001 | 0000 | 0000 | 0001 | 0001 | 0000 | 0001 | 0001 | ||||
0000 | 0011 | 0000 | 0000 | 0011 | 0011 | 0000 | 0011 | 0011 | ||||
0000 | 0101 | 0000 | 0000 | 0101 | 0101 | 0000 | 0101 | 0101 | ||||
0000 | 0111 | 0000 | 0000 | 0111 | 0111 | 0000 | 0111 | 0111 | ||||
0000 | 1111 | 0000 | 0000 | 1111 | 1111 | 0000 | 1111 | 1111 | ||||
0001 | 0000 | 0000 | 0001 | 0000 | 0001 | 0001 | 0000 | 0001 | ||||
0001 | 0001 | 0000 75%, 0001 25% | 0001 | 0001 | 0001 25%, 0011 50%, 0101 25% | 0001 | 0001 | 0000 25%, 0001 75% | ||||
0001 | 0011 | 0000 50%, 0001 50% | 0001 | 0011 | 0011 50%, 0111 50% | 0001 | 0011 | 0001 50%, 0111 50% | ||||
0001 | 0101 | 0000 50%, 0001 50% | 0001 | 0101 | 0101 50%, 0111 50% | 0001 | 0101 | 0001 50%, 0111 50% | ||||
0001 | 0111 | 0000 25%, 0001 75% | 0001 | 0111 | 0111 75%, 1111 25% | 0001 | 0111 | 0011 50%, 0101 25%, 1111 25% | ||||
0001 | 1111 | 0001 | 0001 | 1111 | 1111 | 0001 | 1111 | 0111 | ||||
0011 | 0000 | 0000 | 0011 | 0000 | 0011 | 0011 | 0000 | 0011 | ||||
0011 | 0001 | 0000 50%, 0001 50% | 0011 | 0001 | 0011 50%, 0111 50% | 0011 | 0001 | 0001 50%, 0111 50% | ||||
0011 | 0011 | 0000 25%, 0001 50%, 0011 25% | 0011 | 0011 | 0011 25%, 0111 50%, 1111 25% | 0011 | 0011 | 0000 25%, 0101 50%, 1111 25% | ||||
0011 | 0101 | 0001 | 0011 | 0101 | 0111 | 0011 | 0101 | 0011 | ||||
0011 | 0111 | 0001 50%, 0011 50% | 0011 | 0111 | 0111 50%, 1111 50% | 0011 | 0111 | 0001 50%, 0111 50% | ||||
0011 | 1111 | 0011 | 0011 | 1111 | 1111 | 0011 | 1111 | 0011 | ||||
0101 | 0000 | 0000 | 0101 | 0000 | 0101 | 0101 | 0000 | 0101 | ||||
0101 | 0001 | 0000 50%, 0001 50% | 0101 | 0001 | 0101 50%, 0111 50% | 0101 | 0001 | 0001 50%, 0111 50% | ||||
0101 | 0011 | 0001 | 0101 | 0011 | 0111 | 0101 | 0011 | 0011 | ||||
0101 | 0101 | 0000 50%, 0101 50% | 0101 | 0101 | 0101 50%, 1111 50% | 0101 | 0101 | 0000 50%, 1111 50% | ||||
0101 | 0111 | 0100 50%, 0101 50% | 0101 | 0111 | 0111 50%, 1111 50% | 0101 | 0111 | 0101 50%, 0111 50% | ||||
0101 | 1111 | 0101 | 0101 | 1111 | 1111 | 0101 | 1111 | 0101 | ||||
0111 | 0000 | 0000 | 0111 | 0000 | 0111 | 0111 | 0000 | 0111 | ||||
0111 | 0001 | 0000 25%, 0001 75% | 0111 | 0001 | 0111 75%, 1111 25% | 0111 | 0001 | 0011 50%, 0101 25%, 1111 25% | ||||
0111 | 0011 | 0001 50%, 0011 50% | 0111 | 0011 | 0111 50%, 1111 50% | 0111 | 0011 | 0001 50%, 0111 50% | ||||
0111 | 0101 | 0001 50%, 0101 50% | 0111 | 0101 | 0111 50%, 1111 50% | 0111 | 0101 | 0101 50%, 0111 50% | ||||
0111 | 0111 | 0001 50%, 0101 50% | 0111 | 0111 | 0111 25%, 1111 75% | 0111 | 0111 | 0000 25%, 0011 50%, 1010 25% | ||||
0111 | 1111 | 0111 | 0111 | 1111 | 1111 | 0111 | 1111 | 0001 | ||||
1111 | 0000 | 0000 | 1111 | 0000 | 1111 | 1111 | 0000 | 1111 | ||||
1111 | 0001 | 0001 | 1111 | 0001 | 1111 | 1111 | 0001 | 0111 | ||||
1111 | 0011 | 0011 | 1111 | 0011 | 1111 | 1111 | 0011 | 0011 | ||||
1111 | 0101 | 0101 | 1111 | 0101 | 1111 | 1111 | 0101 | 0101 | ||||
1111 | 0111 | 0111 | 1111 | 0111 | 1111 | 1111 | 0111 | 0001 | ||||
1111 | 1111 | 1111 | 1111 | 1111 | 1111 | 1111 | 1111 | 0000 | ||||
Si nos perdemos con tanto cero y uno si cambiamos:
1: {0,0,0,0}, 2: {0,0,0,1} , 3: {0,0,1,1} , 4: {0,1,0,1}, 5: {0,1,1,1} y 6: {1,1,1,1}
Obtendríamos:
AND | OR | XOR | ||||||||||
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||||
0 | 1 | 0 | 0 | 1 | 1 | 0 | 1 | 1 | ||||
0 | 2 | 0 | 0 | 2 | 2 | 0 | 2 | 2 | ||||
0 | 3 | 0 | 0 | 3 | 3 | 0 | 3 | 3 | ||||
0 | 4 | 0 | 0 | 4 | 4 | 0 | 4 | 4 | ||||
1 | 5 | 0 | 1 | 5 | 5 | 1 | 5 | 5 | ||||
1 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 1 | ||||
1 | 1 | 0 75%, 1 25% | 1 | 1 | 1 25%, 2 50%, 3 25% | 1 | 1 | 0 25%, 1 75% | ||||
1 | 2 | 0 50%, 1 50% | 1 | 2 | 2 50%, 4 50% | 1 | 2 | 1 50%, 4 50% | ||||
1 | 3 | 0 50%, 1 50% | 1 | 3 | 3 50%, 4 50% | 1 | 3 | 1 50%, 4 50% | ||||
1 | 4 | 0 25%, 1 75% | 1 | 4 | 4 75%, 5 25% | 1 | 4 | 2 50%, 3 25%, 5 25% | ||||
1 | 5 | 1 | 1 | 5 | 5 | 1 | 5 | 0111 | ||||
2 | 0 | 0 | 2 | 0 | 2 | 2 | 0 | 2 | ||||
2 | 1 | 0 50%, 1 50% | 2 | 1 | 2 50%, 4 50% | 2 | 1 | 1 50%, 4 50% | ||||
2 | 2 | 0 25%, 1 50%, 2 25% | 2 | 2 | 2 25%, 4 50%, 5 25% | 2 | 2 | 0 25%, 3 50%, 5 25% | ||||
2 | 3 | 2 | 2 | 3 | 4 | 2 | 3 | 2 | ||||
2 | 4 | 1 50%, 2 50% | 2 | 4 | 4 50%, 5 50% | 2 | 4 | 1 50%, 4 50% | ||||
2 | 5 | 0011 | 2 | 5 | 5 | 2 | 5 | 2 | ||||
3 | 0 | 0 | 3 | 0 | 3 | 3 | 0 | 3 | ||||
3 | 1 | 0 50%, 1 50% | 3 | 1 | 3 50%, 4 50% | 3 | 1 | 1 50%, 4 50% | ||||
3 | 2 | 2 | 3 | 2 | 4 | 3 | 2 | 2 | ||||
3 | 3 | 0 50%, 3 50% | 3 | 3 | 3 50%, 5 50% | 3 | 3 | 0 50%, 5 50% | ||||
3 | 4 | 1 50%, 3 50% | 3 | 4 | 4 50%, 5 50% | 3 | 4 | 3 50%, 4 50% | ||||
3 | 5 | 3 | 3 | 5 | 5 | 3 | 5 | 3 | ||||
4 | 0 | 0 | 4 | 0 | 4 | 4 | 0 | 4 | ||||
4 | 1 | 0 25%, 1 75% | 4 | 1 | 4 75%, 5 25% | 4 | 1 | 2 50%, 3 25%, 5 25% | ||||
4 | 2 | 1 50%, 2 50% | 4 | 2 | 4 50%, 5 50% | 4 | 2 | 1 50%, 4 50% | ||||
4 | 3 | 1 50%, 3 50% | 4 | 3 | 4 50%, 5 50% | 4 | 3 | 3 50%, 4 50% | ||||
4 | 4 | 1 50%, 3 50% | 4 | 4 | 4 25%, 5 75% | 4 | 4 | 0 25%, 2 50%, 3 25% | ||||
4 | 5 | 5 | 4 | 5 | 5 | 4 | 5 | 0001 | ||||
5 | 0 | 0 | 5 | 0 | 5 | 5 | 0 | 5 | ||||
5 | 1 | 1 | 5 | 1 | 5 | 5 | 1 | 0111 | ||||
5 | 2 | 2 | 5 | 2 | 5 | 5 | 2 | 0011 | ||||
5 | 3 | 3 | 5 | 3 | 5 | 5 | 3 | 0101 | ||||
5 | 4 | 4 | 5 | 4 | 5 | 5 | 4 | 0001 | ||||
5 | 5 | 5 | 5 | 5 | 5 | 5 | 5 | 0000 | ||||
No hay comentarios:
Publicar un comentario