2 583
edições
(level order) |
(add len11) |
||
Linha 289: | Linha 289: | ||
510 | 11111111 | 32648 | 511 | 3333 | ff | 510 | 11111111 | 32648 | 511 | 3333 | ff | ||
</pre> | </pre> | ||
== Comprimento 11 == | |||
Inteiros Smallint possuem 2 bytes (16 bits), como 1 bit é consumido pelo sinal (sempre positivo) e outros 4 bits pelo ''cache-length'' (comprimentos 0 a 11), restam 16-1-4=11 bits. | |||
Abaixo as representações decimal e binária deste formato, mostrando como o valor numérico (coluna ''hint_dec'') segue exatamente a ordem lexicográfica. | |||
<pre> | |||
bitstring | hint_dec | hint_bin | |||
-------------+----------+-------------------- | |||
| 0 | 0 00000000000 0000 | |||
0 | 1 | 0 00000000000 0001 | |||
00 | 2 | 0 00000000000 0010 | |||
000 | 3 | 0 00000000000 0011 | |||
0000 | 4 | 0 00000000000 0100 | |||
00000 | 5 | 0 00000000000 0101 | |||
000000 | 6 | 0 00000000000 0110 | |||
0000000 | 7 | 0 00000000000 0111 | |||
00000000 | 8 | 0 00000000000 1000 | |||
000000000 | 9 | 0 00000000000 1001 | |||
0000000000 | 10 | 0 00000000000 1010 | |||
00000000000 | 11 | 0 00000000000 1011 | |||
00000000001 | 27 | 0 00000000001 1011 | |||
0000000001 | 42 | 0 00000000010 1010 | |||
00000000010 | 43 | 0 00000000010 1011 | |||
00000000011 | 59 | 0 00000000011 1011 | |||
000000001 | 73 | 0 00000000100 1001 | |||
0000000010 | 74 | 0 00000000100 1010 | |||
00000000100 | 75 | 0 00000000100 1011 | |||
00000000101 | 91 | 0 00000000101 1011 | |||
0000000011 | 106 | 0 00000000110 1010 | |||
00000000110 | 107 | 0 00000000110 1011 | |||
00000000111 | 123 | 0 00000000111 1011 | |||
00000001 | 136 | 0 00000001000 1000 | |||
000000010 | 137 | 0 00000001000 1001 | |||
... | |||
1111111011 | 32618 | 0 11111110110 1010 | |||
11111110110 | 32619 | 0 11111110110 1011 | |||
11111110111 | 32635 | 0 11111110111 1011 | |||
11111111 | 32648 | 0 11111111000 1000 | |||
111111110 | 32649 | 0 11111111000 1001 | |||
1111111100 | 32650 | 0 11111111000 1010 | |||
11111111000 | 32651 | 0 11111111000 1011 | |||
11111111001 | 32667 | 0 11111111001 1011 | |||
1111111101 | 32682 | 0 11111111010 1010 | |||
11111111010 | 32683 | 0 11111111010 1011 | |||
11111111011 | 32699 | 0 11111111011 1011 | |||
111111111 | 32713 | 0 11111111100 1001 | |||
1111111110 | 32714 | 0 11111111100 1010 | |||
11111111100 | 32715 | 0 11111111100 1011 | |||
11111111101 | 32731 | 0 11111111101 1011 | |||
1111111111 | 32746 | 0 11111111110 1010 | |||
11111111110 | 32747 | 0 11111111110 1011 | |||
11111111111 | 32763 | 0 11111111111 1011 | |||
</pre> | |||
[[Categoria:Código natural]] | [[Categoria:Código natural]] |
edições