quarta-feira, 29 de junho de 2016
DELTA CODE CONVERSION
The DELTA code is as follows
DELTA code of 4 is
GAMA CODE -> 110,00 -- 110 occupies 3 bits. 3 in gamma code is 101, therefore 4 in delta code would be
101,00
DELTA code of 5 is
GAMA CODE -> 110,01 - 110 occupies 3 bits. 3 in gamma code is 101, therefore 5 in delta code would be
Explanation of gamma conversion is here
http://netdaniels.blogspot.com.br/2016/06/gamma-code-conversion.html
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
Assinar:
Postagens (Atom)