Originally Posted by
laserlight
Yes, and also bitwise and. A tutorial on the topic should be enough to get you going, so just search the Web
Muy bien i was able to come up with a program to find no. representation of machine but when i run it on several machines in my lab they all give ans of 2's complement. Now i suppose to explain why and here is code based on your sugestion.
Code:
#define NUMERO 0xF
int main() {
switch (-1&0xF) {
case NUMERO: printf("2's complement\n"); break;
case NUMERO-1: printf("1's complement\n"); break;
default: printf("signed magnitude\n"); break;
}
}