Template 'N' is for unsigned 32-bit integers (ie. no negative values).
You'll need to use 'l' or 'i' or 'j' for signed 32-bit integers. See the pack documentation to select the appropriate one for your purpose.
In reply to Re: How to convert between decimal and binary for negative numbers?
by BrowserUk
in thread How to convert between decimal and binary for positive/negative numbers?
by thanos1983
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |