Integer overflow concept

后端 未结 2 1721
天涯浪人
天涯浪人 2021-01-29 13:16

How int overflow works. I mean to ask what would be the final result of an integer value if an overflow happens? I need to understand it on paper. Like I\'m given a multiple cho

2条回答
  •  孤独总比滥情好
    2021-01-29 14:13

       DecVal   BinVal
        11   -> 1011
    XOR 5    -> 0101
               -------
        14   -> 1110
    

    fyi, This does not really have anything to do with int overflow.

提交回复
热议问题