HSC Science (Computer Science) 12th Board ExamMaharashtra State Board
Share
Notifications

View all notifications

Write Alp to Find 2'S Complement of a 16 Bit Number Stored in De Pair. Store Result in Hl Pair. - HSC Science (Computer Science) 12th Board Exam - Computer Science 2

Login
Create free account


      Forgot password?

Question

Write ALP to find 2's complement of a 16 bit number stored in DE Pair. Store result in HL Pair.

Solution

Mnemonics Comment
Opcode Operand
MOV A, E ; Copy E content to Accumulator
CMA ; Compliment Accumulator
MOV L, A ; Copy Accumulator to L Register
MOV A, D ; Copy D content to Accumulator
CMA ; Compliment Accumulator
MOV H, A ; Copy Acc. to HL Pair
INX H ; Increment HL pair by 1
RST 1.0 ; Restart
  Is there an error in this question or solution?

APPEARS IN

 2014-2015 (March) (with solutions)
Question 5.1.2 | 5.00 marks
Solution Write Alp to Find 2'S Complement of a 16 Bit Number Stored in De Pair. Store Result in Hl Pair. Concept: Instruction Set and Programming of 8085.
S
View in app×