Complementing a bit is just changing its state. If it's 1, it becomes 0. If 0, 1.what's complementing the output bit ?
Can you think of a way to do this in one instruction?
Complementing a bit is just changing its state. If it's 1, it becomes 0. If 0, 1.what's complementing the output bit ?
That is correct. When working with microcontrollers it is very important to pay attention to details.The loop is executed 256 times. if number=0 then when -1 is taken away from it, the content of R0 becomes the binary value of 11111111 and 255 decimal, so far loop is executed once, then there are the other 255 times that the loop would be executed making it 256 times in total.
What you really mean to say is 1 is taken away from it.if number=0 then when -1 is taken away from it,...