这个问题来 self 的数字逻辑课,但我不明白。请帮助我理解它在问我什么。
假设 A1 和 A2 是八进制简写。
Perform the following 1's complement fixed-point integer arithmetic operations and note whether magnitude overflow has occurred in each case: (Hint: Use 7's complement arithmetic on the other octal shorthand),
i) A3= A1+A2 ii) A3= A1-A2
我以为你只在想做减法时取补码。我不能只做八进制形式的减法吗?有人可以帮助我理解所问的问题吗?
最佳答案
这是一个技巧问题;或者你错误地引用了它。我怀疑你的导师会问前者;所以一定是后者。
回想一下,1 的补码和是两个操作数(这里是 A1 和 A2)的异或。并且没有进位,因此在 1 补码世界中没有大小溢出这样的事情。
https://stackoverflow.com/questions/9145324/
相关文章:
emacs - 在 emacs(或 DDD)中使用 gdb 时无法设置断点
maven - 使用 build-helper-maven-plugin 和 multi modul
encryption - Microsoft CNG BCryptEncrypt 返回密文 == 明
python - 如何使用 setuptools 和 setup.py 从包中排除单个文件
vb.net - 创建后如何释放 MS Access LDB 锁定文件
image-processing - 使用小波和曲波进行特征提取