- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
快速提问,我正在阅读 Richard C. Detmer 编写的题为“80x86 汇编语言和计算机体系结构简介”的教科书,第 21 和 22 页谈到了借用的概念,但它并没有真正描述什么确实如此。以下是正文:
In a computer, subtraction a - b of numbers a and b is usually performed by taking the 2's complement of b and adding the result to a. This corresponds to adding the negation of b. For example, for the decimal subtraction 195 - 618 = -423,
00C3 - 026A
is changed to addition of FD96, the 2's complement of 026A.
00C3 + FD96 = FE59
The hex digits FE59 represent -423. Looking at the previous addition in binary, you have
0000 0000 1100 0011 + 1111 1101 1001 0110 = 1111 1110 0101 1001
Notice that there was no carry in the addition. However, this subtraction did involve a borrow. A borrow occurs in the subtraction a - b when b is larger than a as unsigned numbers. Computer hardware can detect a borrow in subtraction by looking at whether a carry occurred in the corresponding addition. If there is no carry in the addition, then there is a borrow in the subtraction. If there is a carry in the addition, then there is no borrow in the subtraction. (Remember that "carry" by itself means "carry out.")
Here is one more example. Doing the decimal subtraction 985 - 411 = 574 using word-length 2's complement representations,
03D9 - 019B
is changed to addition of FE65, the 2's complement of 019B.
03D9 + FE65 = 1023E
0000 0011 1101 1001 + 1111 1110 0110 0101 = 1 0000 0010 0011 1110
Discarding the extra 1, the hex digits 023E represent 574. This addition has a carry, so there is no borrow in the corresponding subtract.
什么是减法借位?我想当例如 00C3 - 026A 时,A 大于 3,所以我们必须从相应的 C 中“借用”,使其成为 B 并使其现在成为 13(基数 16)减去 A。我们可以做到,但是发生了“借”。在这个特定的例子中,确实发生了对本书上下文的借用。但是当我们看下一个例子时,他们给了我们 03D9 - 019B,B 比 9 大,所以我们必须从 D 中“借用”,使它成为 C 并使 9 成为 19(以 16 为底)减去 B。那我们可以做到,并且发生了“借用”,但书上说没有发生借用。
什么是借用?我知道你知道是否发生了加法中是否发生了进位但是做原始减法,什么是真正的借位。我什么时候可以确定是否发生过?
例如,您知道发生进位是因为有一个额外的十六进制数字。长度超出了您的两个十六进制数字的长度(希望留在其中的长度)。
谢谢。
-丹
最佳答案
在书中,他所说的借用不同于传统意义上的借用。他说只有当 ENTIRE 减法的结果为负数(换句话说,b > a)时才会发生借位,而不一定是个别数字的结果。
关于assembly - 什么是十六进制减法中的借位? (集会),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21863607/
这些指令有什么区别?以 ARM9 处理器为例,它不应该是: ASM: mov r0, 0 C: r0 = 0; ASM: ld r0, 0 C: r0 = 0; ? 我不知道为什么要使用一个或另一个:
快速提问,我正在阅读 Richard C. Detmer 编写的题为“80x86 汇编语言和计算机体系结构简介”的教科书,第 21 和 22 页谈到了借用的概念,但它并没有真正描述什么确实如此。以下是
我想不通为什么我的程序会在我希望它在 ecx 的值等于 0 后退出时进入无限循环?请帮忙? section .data ;get external functions extern printf gl
我的解决方案中有 2 个项目: 程序集(基本库) 测试程序集(NUnit) 我在第一个项目中将测试程序集声明为 friend 程序集: [assembly: InternalsVisibleTo ("
我的解决方案中有 2 个项目: 程序集(基本库) 测试程序集(NUnit) 我在第一个项目中将测试程序集声明为 friend 程序集: [assembly: InternalsVisibleTo ("
我几周前通过的单元测试现在失败了。当单元测试尝试创建工作空间权限时,现在会失败。我使用相同的 api-key,它具有订阅级别的访问权限,因此授权不是问题。以下是当我尝试创建工作空间权限时 WSAPI
使用集会 Node 工具包,当我尝试将新的变更集(带有新的内联变更)添加到现有的用户故事时,我收到返回的错误消息。当我注释掉新的更改时,更改集会按预期添加。这似乎与我无法弄清楚的更改数据有关。 添加通
我是 Rally 世界的新手,正在努力了解如何使用 RallyRestAPI。有许多示例说明如何查询 Rally 以获取我认为最有帮助的相关信息。我想要做的是创建一个 C# 命令行工具来将用户添加到项
尝试运行对集会的读取调用时,我不断从 Node 收到以下错误响应: Error: getaddrinfo ENOTFOUND rally1.rallydev.com rally1.rallydev.c
我正在尝试使用 python 工具包查询特定迭代中的所有任务以进行集会 REST API .迭代将在运行时选择。 但是我无法设置正确的查询。我觉得我在这里遗漏了一些小而重要的东西。 这是代码: que
我正在通过 Ruby 使用 Rally API ( http://developer.help.rallydev.com/ruby-toolkit-rally-rest-api-json )。我想查询
我是一名优秀的程序员,十分优秀!