且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

字节溢出时实际发生了什么?

更新时间:2022-03-28 21:53:37

这很简单.它只是进行加法运算,并得到一个8位以上的数字.第九位(为1)刚刚下降",剩下剩下的8位组成数字94.

It's quite simple. It just does the addition and comes off at a number with more than 8 bits. The ninth bit (being one) just 'falls off' and you are left with the remaining 8 bits which form the number 94.

(是的,这是无害的)