This is a question on a hand out, it asks:
What is the machine code that corresponds to the AVR Assembly Language Instruction
inc r22? Enter your answer as a 16 bit binary number. There must be no spaces or punctuation marks - just enter sixteen 1's or 0's.
I found the corresponding machine code which is
1001 010d dddd 0011. I added the binaries together for 22 which is 16 + 6 so:
10000 + 110 = 010110
I assume from here that you just sub it into the d's hence,
1001 010d dddd 0011 1001 0101 0110 0011
And there's the 16 bit answer. Is this correct, or have I done this the wrong way?