Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python int16

bytes = (-32757).to_bytes(2, 'little', signed = True) #store value in 2 bytes
#bytes 2 int
print(int.from_bytes([bytes[0], bytes[1]], 'little', signed=True)) #returns -32767

 
PREVIOUS NEXT
Tagged: #python
ADD COMMENT
Topic
Name
6+2 =