Decimal to Binary signed 2's complement

Firstly, in order to make code more readable and importable it is important to surround your code with three backticks
```
like this
```

You can edit and correct your post by clicking the pencil icon.

See this post for more details - How to share code or flow json



var input = Number(msg.payload);
msg.payload = input.toString(2).padStart(16,"0") ;
return msg;