1补码 2补码
1的8位补码 (1's compliment of 8 bits number)
Problem statement:
问题陈述:
To perform 1'scompliment of 8 bits number using 8085 microprocessor.
使用8085微处理器执行1的8位数字补码。
Algorithm:
算法:
Load the accumulator with the first data.
向累加器加载第一个数据。
Compliment the content of accumulator.
补充累加器的内容。
Now load the result value in memory location.
现在将结果值加载到内存位置。
Program:
程序:
LDA 2050
CMA
STA 2052
Observation:
观察:
INPUT:
2050:05
OUTPUT:
2052:FA
Hence, we successfully find the compliment of 8 bits number.
因此,我们成功地找到了8位数字的补充 。
2的8位补码 (2's compliment of 8 bits number)
Problem statement:
问题陈述:
To perform 2'scompliment of 8 bit number using 8085 microprocessor.
使用8085微处理器执行8位数字的2的补码。
Algorithm:
算法:
Load the accumulator with the first data
向累加器加载第一个数据
Compliment the content of accumulator
补充累加器的内容
ADD 01 to the content of accumulator
向累加器的内容添加01
Now load the result value in memory location
现在将结果值加载到内存位置
Program:
程序:
LDA 2050
CMA
ADI 01
STA 2052
Observation:
观察:
INPUT:
2050:05
OUTPUT:
2052:FB
Hence, we successfully find the 2's compliment of 8 bits number
因此,我们成功找到8位数字的2的补码
翻译自: https://www.includehelp.com/embedded-system/1-s-and-2-s-compliment-of-8-bits-number-in-8085-microprocessor.aspx
1补码 2补码