Daily Archives: August 5, 2020

two’s complement overflow detection

two’s complement overflow有兩種情況會發生 carry in without carry out carry out without carry in 用8 bit signed int為例 -100 + (-30) 1001 1100 + 1110 0010 ———— 1 0000 0000 <- carry bit C S = 1 0111 1110 C的位置是carry out(就是我們一般說的carry), … Continue reading

Posted in C Language | Leave a comment