"Convert the following machine code into instructions"
b) 000h = 0000 0000 = NOP
Correct
c) 1283h = 01 0010 1000 0011
I beleive this is a IORWF which has the following value:
00 0100 DFFF FFFF
00 0010 1000 0011 is IORWF STATUS, d
01 0010 1000 0011 is BCF STATUS, 05 where bit 05 is the RP0 bit.
This means D = 1 and F= 10 1000 0011
Make your mind up which opcode you are examining 0283 or 1283!
Wrong for the OP code first stated 1283h, there is no d bit.
And wrong for the second opcode 0283
D=1 and F= 000 0011 (3 in decimal)
What does this actually mean?
For all PIC instructions, when d=0 the result of the instruction is placed in the W register, and when d=1 the result is put into the register f.
To find which register is "3" look in the register file summary for your PIC, on the sheet I have beside me (16C84, no heckling from the gallery now!), "03" is the STATUS register.
(Just looked at the sheet for a 16F887 and 03 is the STATUS reg there, again, probably the same on all PICs).
JimB
Having re-hashed this reply, I think I have given a reasonable answer to a confused question.