def longToBinary(l):
if l < 0:
raise ValueError('This function only supports positive integers')
bytes = long_to_bytes(l)
if ord(bytes[0]) > 127:
return '\x00' + bytes
else:
return bytes