Re:Two's complement – You beauty
by throwawayish on Wednesday January 11, 2017 @08:25AM
(#13373713)
Indeed. For this use case to_bytes would be correct (writing this in the most verbose way possible :)
Note how well-defined and independent of the actual machine this conversion is. Since you define everything - length, byte order and whether to get two's complement or not - you'll get the same output everywhere.
[ Parent
| on HN ]
There are no comments on this comment yet.