quarta-feira, 29 de junho de 2016

GAMMA CODE CONVERSION


Hi!
Following the explanation of the link above I figured out how to convert numbers to gamma code.
Ex:
Number 4
UNARY CODE -> 11110
BINARY CODE -> 100
OFFSET -> 00
LENGTH -> 110
GAMA CODE -> 110,00
OFFSET -> IT IS THE BINARY CODE WITHOUT THE FIRST BIT FROM LEFT TO RIGHT. 100 becomes 00.
LENGTH -> NUMBER OF BITS THAT THE OFFSET OCCUPIES, in this case, 00 occupies  2 bits
GAMA CODE IS LENGTH, OFFSET, Therefore 110,00

Nenhum comentário:

Postar um comentário