算术溢出与算术进位 [英] Arithmetic Overflow vs. Arithmetic Carry
问题描述
我的演讲幻灯片中的一个给出了算术溢出的例子,并在ARM芯片中引入了条件分支标志的主题,引用如下: 假设为了举例,地址只能容纳8个字节。所以对我来说,似乎喜欢加1到7FFFFFFF给出80000000.我认为80000000仍然适合8字节的地址。 为什么这是一个算术溢出?这张幻灯片是否是错误的?或者是我的理解存在缺陷? 感谢您的回应 One of my lecture slides gives an example of arithmetic overflow and carry in a topic for conditional branching flags on an ARM chip, quoted below: Presumably for the sake of the example, the address can only hold 8 bytes. So to me, it seems likes adding 1 to 7FFFFFFF gives 80000000. I thought 80000000 would still fit into an 8-byte address. Why is this an arithmetic overflow? Is it the wrong way around on the slide? Or is my understanding flawed? Thanks for any responses 这篇关于算术溢出与算术进位的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
V(溢出)
- 7FFFFFFF + 1
- FFFFFFFF + 1