nephish schrieb:

thanks for any tips on this.

I'll try.

In BCD a (decimal) digit is stored in a halfbyte (or a 'nibble'). So, in a byte
you can store two decimal digits. For instance 42 would be

nibble1 nibble2
0100     0010
4            2

>>> c=0b01000010
>>> c
66
>>> c >> 4               # first nibble
4
>>> c & 0b1111     # second nibble
2


So, a speed of 57% should be
LSB= 0111 0000
MSB= 0000 0101
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to