when using integer class such as int8 in matlab, and some calculation result is bigger than the upper range (for int8 , the upper range is 127), matlab would automatically set the value to the maximum.
but in some cases, i want to get a negetive result, like many programming languages do
i want c to be -128 because 01111110+00000010=10000000 and it's -128 for int8
this could be done by a "bitadd" like
function int1 = bitadd(int1,int2)
however this is very inefficient, since a while loop in the function
Setting the result to maximum should be additional correction, so is there a faster method to do bitwise add without such correction?