#include <stdio.h>
void main(void){
int x = 100;
printf("%d",(x+(~x+1)));
}
Answer:
(~x+1) == one's compliment + 1 == two's compliment of x.
The sum of any number and it's 2's compliment is zero.
Complexity: INTERMEDIATE.
Saturday, January 5, 2008
Subscribe to:
Post Comments (Atom)
.jpg)
No comments:
Post a Comment