C - converting to 2s compliment
Posted
by tom
on Stack Overflow
See other posts from Stack Overflow
or by tom
Published on 2010-04-05T21:50:45Z
Indexed on
2010/04/05
21:53 UTC
Read the original article
Hit count: 188
Filed under:
c
I've decided to do it this way
- flip numbers 0=1, 1=0
- add 1 to LSB
- if carry, loop until array[i]==0
But i'm stuck on the last point, how can I say that in a conditional loop?
© Stack Overflow or respective owner