Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Two's compliment of -5

Answer Posted / 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.
1111 1010

step 2: add 1 to the above binary format.

1111 1010
1
-----------
1111 1011

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
compliment..........


thank u

Is This Answer Correct ?    20 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is memory leak in c?

1172


What is the general form of function in c?

1069


Explain what is the difference between null and nul?

1212


Explain how can I write functions that take a variable number of arguments?

1128


Can you assign a different address to an array tag?

1209


A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers

1278


Explain how can you determine the size of an allocated portion of memory?

1150


Which function in C can be used to append a string to another string?

1272


What is the c language function prototype?

1138


What are global variables and explain how do you declare them?

1180


Why c language?

1114


What are structure members?

1142


How can I find the modification date of a file?

1336


What does %2f mean in c?

1279


How can I recover the file name given an open stream or file descriptor?

1134