java 位运算两数字相加_使用8086微处理器将两个16位数字相加而不带进位

java 位运算两数字相加

Problem statement:

问题陈述:

To perform addition operation between two 16 bits numbers without carry using 8086 Microprocessor.

使用8086微处理器无需进位即可在两个16位数字之间执行加法运算。

Algorithm:

算法:

  1. Load the first data into register AX from memory.

    从存储器将第一个数据加载到寄存器AX中。

  2. Load the second data into register BX from memory.

    将第二个数据从内存加载到寄存器BX中。

  3. ADD content of register BX with the content of register AX.

    将寄存器BX的内容与寄存器AX的内容相加。

  4. Now load the result value from AX to memory.

    现在将结果值从AX加载到内存。

Program:

程序:

	MOV     AX, 2050
	MOV     BX, 2052
	ADD     AX, BX
	MOV     2054, AX
	HLT

Observation:

观察:

    INPUT: 
    2050:02
    2051:02
    2052:02
    2053:02

    OUTPUT: 
    2052:04
    2053:04

Hence we successfully added two 16 bits numbers without using carry.

因此,我们成功地将两个16位数字相加而不使用进位

翻译自: https://www.includehelp.com/embedded-system/addition-of-two-16-bits-numbers-without-carry-using-8086-microprocessor.aspx

java 位运算两数字相加

你可能感兴趣的:(算法,java,python,大数据,hadoop)