python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Why the status flags in AVR are on after one's-complementing a zeroed register?
I have a code in assembly and I have to find out why the status flags are on
One of the codes is
LDI R16, 0
COM R16
the result was 0xFF
But I don’t understand why the S and C flags were on.
m A
Votes: 0
Answers: 1
Why complement of 0 is -1?
I was learning about bitwise operators and I learnt that complement of 0 is 1 and 1 is 0. But when I tried using ~0 on IDLE, it printed -1 and when i typed ~1 it gave -2..
Satyam Shankar
Votes: 0
Answers: 1