shell两个数字相乘
Problem statement:
问题陈述:
To perform multiplication operation between two 8 bits numbers using logical instructions on 8085 microprocessor.
使用8085微处理器上的逻辑指令在两个8位数字之间执行乘法运算。
Algorithm:
算法:
Load first number in accumulator.
将第一个数字加载到累加器中。
Move the content of accumulator in register B.
将累加器的内容移到寄存器B中。
Load the second number in accumulator.
将第二个数字加载到累加器中。
Rotate the accumulator left without carry.
向左旋转蓄能器,不带进位。
Repeat step 4.
重复步骤4。
Store the result in memory.
将结果存储在内存中。
HLT.
HLT。
Program:
程序:
LDA 2050
MOV B, A
LDA 2051
RLC
RLC
STA 3050
HLT
Observation:
观察:
INPUT:
2050:05
2051:04
OUTPUT:
3050:14
Hence we successfully multiplied two 8 bits numbers using logical instruction.
因此,我们使用逻辑指令成功地将两个8位数字相乘 。
shell两个数字相乘