Answers were Sorted based on User's Feedback
Answer / vignesh1988i
first write the given number in it's binary format.
am considering only 8 bit at a time ,
5- 0000 0101
step 1: convert this binary format to one's compliment (ie)
change 0 to 1 and 1 to 0.
step 2: add 1 to the above binary format.
so this binary format will get stored in memory and the sign
bit will be set to 1.
always the negative number will be stored only in 2's
|Is This Answer Correct ?||20 Yes||2 No|
Answer / ramprasad g
-5 will be stored as 2's complement of 5
2's complement of -5, is thus 2 times 2's complement of 5.
so the ans is 5 itself.
|Is This Answer Correct ?||11 Yes||0 No|
Answer / ataraxic
Or in other words
|Is This Answer Correct ?||6 Yes||3 No|
2's compliment of a -ve no is, positive value of the same
int no1, res;
printf("ENTER THE NEGATIVE NO: \n");
no1 = ~(no1);
res = no1 | 0x01;
printf("\nRESULT: %d", res);
|Is This Answer Correct ?||0 Yes||5 No|
In the following control structure which is faster? 1.Switch 2.If-else and which consumes more memory?
related proverb of "dont count your chicken before it hatches"
Explain Linker and Loader
Why void main is used in c?
my project name is adulteration of chille powder.how can i explain it to the hr when he asks me about the project?
What is the purpose of void in c?
What are c preprocessors?
why program counter is 16 bit?
An entire structure variable can be assigned to another structure variable if __________
in linking some of os executables are linking name some of them
what is software?
Write a program to find whether the given number is prime or not?