I am looking at some c++ code and I see:
byte b = someByteValue; // take twos complement byte TwosComplement = -b;
Is this code taking t
The correct expression will look
byte TwosComplement = ~b + 1;
Note: provided that byte iis defined as unsigned char
unsigned char