补码加减法符号位进位
Problem statement:
问题陈述:
To find the 2’s compliment of 8 bits number with carry using 8085 microprocessor.
使用8085微处理器查找带有进位的2的8位数字的补码。
Algorithm:
算法:
Load number in accumulator.
累加器中的装载编号。
Compliment the content of accumulator.
补充累加器的内容。
Add 01 to the content of accumulator.
在累加器的内容中添加01。
Store the 2s compliment in memory location 3050.
将2的补语存储在内存位置3050中。
The carry which is generated during calculating the 2s compliment is stored at memory location 3051.
在计算2s补充时产生的进位被存储在存储位置3051中。
Terminate the program.
终止程序。
Program:
程序:
LDA 2050
CMA
ADI 01
MOV L, A
MVI A, 00
ADC A
MOV H, A
SHLD 2051
HLT
Observation:
观察:
INPUT:
2050:07
OUTPUT:
2051:00
2052:F9
Hence we successfully calculated 2s compliment of 8 bit number with carry on 8085 microprocessor.
因此我们进行了8085微处理器成功地计算了8位的2s补码 。
补码加减法符号位进位