什么是算术运算和逻辑运算

逻辑指令 (Logical Instructions)

a) AND: Logical AND

a)AND:逻辑AND

Atleast one of the operant should be a register or a memory operant both the operant cannot be a memory location or immediate operant.

操作中的至少一个应该是寄存器或内存操作,这两个操作都不能是内存位置或立即操作。

b) OR: logical OR

b)OR:逻辑或

Both inputs are low in this case

在这种情况下,两个输入均为低电平

c) NOT: logical invert

c)不:逻辑反转

Arithmetic and Logical Operations of 8086 - NOT

d) XOR: logical Exclusive OR

d)XOR:逻辑异或

Arithmetic and Logical Operations of 8086 - XOR

e) TEST instruction: Logical compare instruction

e)TEST指令:逻辑比较指令

It will do bit by bit AND operation on the operands. Each bit of the result is then said to be 1 if the corresponding bit else the result bit is said to zero.

它将对操作数进行逐位AND运算。 如果相应的位则结果的每一位都为1,否则结果位为零。

f) SHL: Shift left logical

f)SHL:逻辑左移

It will shift the operant bit by bit to the left and insert the zero in the newly introduced least significant bits. Here operant is not an immediate data.

它将操作数向左移一位,并将零插入到新引入的最低有效位中。 这里操作不是立即数据。

g) SHR: Shift right logical

g)SHR:逻辑右移

h) SAR: Shift Right Arithmetic

h)SAR:右移算术

Same as the logical shift but it inserts the most significant bit of the operand in the newly inserted position.

与逻辑移位相同,但它将操作数的最高有效位插入到新插入的位置。

i) ROR (Rotate Right without carry)

i)ROR(无进位权)

Arithmetic and Logical Operations of 8086 - ROR

j) ROL (Rotate left without carry)

j)ROL(不带进位,向左旋转)

Arithmetic and Logical Operations of 8086 - ROL

k) RCR ( Rotate right through carry)

k)RCR(向右旋转进位)

l) RCL (Rotate left through carry)

l)RCL(通过进位向左旋转)

Arithmetic and Logical Operations of 8086 - RCL

算术运算 (Arithmetic Operations)

(1) ADD

(1)添加

In this operation we perform sum of data in two different registers.

在此操作中,我们在两个不同的寄存器中执行数据求和。

Memory to memory operation is not possible. Source and destination operant cannot be a memory location.

内存到内存操作是不可能的。 源和目标操作数不能是存储位置。

Also the content of segment register cannot be added.

同样,段寄存器的内容也不能添加。

(2) ADC ( Add with carry)

(2)ADC(加进位)

Same as add instruction, but adds the carry flag bit.

与添加指令相同,但加进位标志位。

(3) INC ( Increment)

(3)INC(增量)

Increment the data by 1 and immediate data cannot be an operand here.

将数据加1,立即数不能在此处作为操作数。

(4) DEC ( decrement by 1)

(4)DEC(减1)

Decreases data by 1 and immediate data cannot be an operand.

将数据减1,立即数不能是操作数。

(5) SUB

(5)SUB

It will subtract source operand from destination and result is stored in destination.

它将从目标中减去源操作数,结果存储在目标中。

Both operands may not be a memory operand and destination operand must not be an immediate data.

这两个操作数都可能不是内存操作数,目标​​操作数也不能是立即数。

(6) SBB (Subtract with borrow)

(6)SBB(减去借方)

Borrow flag/ Carry flag is also subtracted.

借位标志/进位标志也被减去。

(7) CMP (compare)

(7)CMP(比较)

For comparison it subtract source operand from the destination, but result is not stored anywhere.

为了进行比较,它从目标中减去源操作数,但结果未存储在任何地方。

(8) ASS (ASCII adjust AL after subtraction)

(8)ASS(减法后的ASCII调整AL)

It converts the result of subtraction of two valid unpacked BCD digits to a single valid BCD no. and takes AL as implicit operand.

它将两个有效的未打包BCD数字相减的结果转换为一个有效的BCD号。 并将AL作为隐式操作数。

(9) AAM (ASCII adjust after multiplication)

(9)AAM(乘法后进行ASCII调整)

AAM converts the result of multiplication of two valid BCD digits to a single valid BCD no. takes AC as implicit operand.

AAM将两个有效BCD数字相乘的结果转换为单个有效BCD号。 将AC作为隐式操作数。

It unpacks the result by dividing AX by 10 placing the quotient into AH and remainder in AL.

它通过将AX除以10来分解结果,将商放入AH并将余数放在AL中。

(10) AAD (ASCII adjust before division)

(10)AAD(除法ASCII调整)

It converts unpacked BCD digits in AH and AL register in a single binary number in AX register in preparation for a division operation.

它将AH和AL寄存器中未打包的BCD数字转换为AX寄存器中的单个二进制数,以准备除法运算。

Before executing AAD placed most significant BCD digit in the AH register and least significant digit in AL register. Then the two BCD digits are combined in a single binary number by setting.

在执行AAD之前,将最高有效的BCD数字放入AH寄存器,将最低有效的数字放入AL寄存器。 然后通过设置将两个BCD数字组合为一个二进制数。

(11) DAA (Decimal adjust accumulator)

(11)DAA(十进制调整累加器)

Used to convert the result of the addition of 2 packed BCD no. to valid BCD no. if lower nibble AL > 9.

用于转换添加2个压缩BCD编号的结果。 到有效的BCD号 如果下半字节AL> 9。

(12) DAS (Decimal address after subtraction)

(12)DAS(减后的十进制地址)

It converts the result of subtraction of two packed number to a valid BCD no.

它将两个打包数字相减的结果转换为有效的BCD号。

Conclusion:

结论:

In this article I have discussed briefly about almost all arithmetic and logical instructions of 8086 microprocessor. I hope they have covered all we need to know about the operations performed by 8086 microprocessor if you have any further queries shoot them in the comment section below. See you in my next article till then stay healthy and keep learning!

在本文中,我简要讨论了8086微处理器的几乎所有算术和逻辑指令 。 我希望它们涵盖了我们需要了解的关于8086微处理器执行的所有操作,如果您有其他疑问,请在下面的评论部分中进行介绍。 在下一篇文章中再见,然后保持健康并继续学习!

翻译自: https://www.includehelp.com/embedded-system/arithmetic-and-logical-operations-of-8086-microprocessor.aspx

什么是算术运算和逻辑运算

什么是算术运算和逻辑运算_8086微处理器的算术和逻辑运算相关推荐

  1. 存储器间接寻址方式_8086微处理器的程序存储器寻址模式

    存储器间接寻址方式 The Program Memory Addressing mode is used in branch instructions. These branch instructio ...

  2. 微内核和宏内核的区别_8086微处理器中的过程和宏之间的区别

    微内核和宏内核的区别 Prerequisite 先决条件 Procedure in 8086 Microprocessor 8086微处理器中的过程 Macros in 8086 Microproce ...

  3. 通用apdu指令_8086微处理器中的通用指令格式

    通用apdu指令 Introduction: 介绍: In this article, we are going to discuss about the 6 general formats of i ...

  4. 8086 寻址方式_8086微处理器的不同寻址模式

    8086 寻址方式 Introduction: 介绍: Addressing mode tells us what is the type of the operand and the way the ...

  5. call和ret指令_8086微处理器中的CALL和RET指令

    call和ret指令 8086微处理器中的CALL指令 (The CALL instruction in the 8086 microprocessor) The CALL instruction i ...

  6. 递归转化成非递归过程_8086微处理器中的递归和重入过程

    递归转化成非递归过程 As we all know that a procedure is a set of instruction written separately which can be u ...

  7. 逻辑地址物理地址计算_8086微处理器中的物理地址计算问题

    逻辑地址物理地址计算 Q1) The value of Code Segment (CS) Register is 4042H and the value of different offsets i ...

  8. jave 逻辑运算 vs 位运算 + Python 逻辑运算 vs 位运算

    JAVA中&&和&.||和|(短路与和逻辑与.短路或和逻辑或)的区别 博客分类: 面试题目 Java.netBlog  转自 :http://blog.csdn.net/web ...

  9. Linux逻辑运算优先级,linux中的逻辑运算和正则表达式

    1.与.或.非.异或 && 与:当两边同为真的时候,结果为真 || 或:当两边都为假的时候,结果为假. ! 非:取反 ^ 异或:当左右都相同的时候,结果为假:当左右不相同的时候,结果为 ...

最新文章

  1. 防火墙 iptables 禁止某个域名访问
  2. Abiword 编辑事件设计
  3. 七、深入JavaScript的DOM(三)
  4. matlab的数学函数,matlab中常见数学函数的使用
  5. 产生复选框的html,html根据复选框勾选顺序生成字符串
  6. 基于容器服务 ACK 发行版打造 CNStack 社区版
  7. Java虚拟机(九)——方法区
  8. HTML5超级玛丽简易版(有源码)
  9. UI设计素材专辑|轻松解决键配色方案
  10. 第11章 使用Vsftpd服务传输文件
  11. 系统分析员备考之经济管理篇(一)
  12. nltk——文本分类
  13. linux环境蝉道搭建及关联钉钉
  14. 各大PT网站信息记录(不断更新中)
  15. [4G5G专题-31]:物理层-物理信道、信号、映射概述
  16. TiDB x 微众银行 | 耗时降低 58%,分布式架构助力实现普惠金融
  17. 我们该如何看待加密VC青睐的那些NFT项目?
  18. (STM32)从零开始的RT-Thread之旅--SPI驱动ST7735(3)使用DMA
  19. MARIADB日志配置
  20. 北京科技大学计算机专业 考研真题,北京科技大学计算机科学与技术考研真题及答案.pdf...

热门文章

  1. 关于ubuntu自定义service服务时找不到/usr/lib/systemd/system目录的问题
  2. com.sec.android.app.smartclipservice,EPR Aerospace News
  3. 玩转linux文件描述符和重定向,玩转Linux文件描述符和重定向
  4. java 去掉 t_关于Java:在LocalDateTime中不能删除“ T”
  5. mysql 副本 同步_副本机制与副本同步
  6. python收集数据程序_基于Python语言的互联网数据收集软件的设计
  7. Spark初识-Spark基本架构概览使用
  8. Markdown 使用教程
  9. MySQL Index Condition Pushdown
  10. 发现保存GIF格式后相素发生变化咋办