Two's compliment of 8- bit number


Aim:-

To find Two's complement of 8-bit number.


Apparatus:-

microprocessor kit.

Data:-
7501-E4H   and  7501-96H

 

Memory address

 

Machine code

 

Mnemonics

 

Operands

 

Comments

 

7000

 

3A,01,75

 

LDA

 

7501 H

 

Get data in H-L pair

 

7003

 

2F

 

CMA

 

 

 

Take 1’s complement

 

7004

 

3C

 

INR

 

A

 

Take 2’s complement

 

7005

 

32,02,75

 

STA

 

7502 H

 

Store the result in 7502 H

 

7008

 

76

 

HLT

 

 

HALT



Procedure:-

1)How to enter the program.
Esc->S->CR->CR S.address(7000)->CR->Esc->S->CR->CR->Data->CR.

2)How to execute the program.
Esc->Go->CR->CR-> S .address->CR.

3)How to check the result.
S->CR->CR->address(7502)->CR.

Result:- 

7502-1CH and  7502-6AH

Comments

Popular posts from this blog

Estimation of total chlorophyll by Aron's method

Here's what you need to know about sun's coronal heating

what would have happened if gravitation force was 9.9 km/s^2 instead of 9.8 km/s^2