I have a module that takes 2 X 8bit numbers in Decimal format, with a specific structure
each number must start with the same 4 bits = 0011 followed be a varible 8 bits followed by 4 bits that are ignored so set to 0000
So to caculate the 16bit number is simple enough
the varible number * 16 will shift it the 4 bits to the left, and adding 12288 = 0011|000000000000 will give me the desired result.
so if my input number is 19 for example
19 X 16 + 12288 = 12592 = 0011000100110000
the next step is to split it in to two X 8 bit numbers
00110001 | 00110000 = 49, 48
how in python can i go from 12592 to 49,48 efficiently.
Never worked in binary in a script so all a bit new.
Cheers