Free Electronic Circuits & 8085 projects

Electronic projects with circuit diagram and 8085 microprocessor projects.

Finding Two’s complement of a number

Published on Nov 12 2009 // Learners

Statement: Find the 2’s complement of the number stored at memory location 4200H and store the complemented number at memory location 4300H.

Sample problem:

(4200H) = 55H

Result = (4300H) = AAH + 1 = ABH

Source program:

LDA 4200H : Get the number

CMA : Complement the number

ADI, 01 H : Add one in the number

STA 4300H : Store the result

HLT : Terminate program execution


9 - Finding Two's complement of a number

Related Programs for Beginners: (Click down)

Store 8-bit data in memory

Pack the unpacked BCD numbers

Left Shifting of a 16-bit data

Left Shifting of a 16-bit data