0 votes
87 views
in C program by (98.9k points)
edited
How can we store a negative integer?

1 Answer

0 votes
by (1.7k points)
selected by
 
Best answer
To store a negative integer, we need to follow the following steps. Calculate the two’s complement of the same positive integer.

Eg: 1011 (-5)

Step-1 − One’s complement of 5: 1010

Step-2 − Add 1 to above, giving 1011, which is -5

Related questions

0 votes
0 answers 44 views
0 votes
0 answers 53 views
asked May 15, 2022 in C program by Doubtly (98.9k points)
0 votes
1 answer 122 views
0 votes
1 answer 128 views
+1 vote
1 answer 85 views
+1 vote
1 answer 95 views

Doubtly is an online community for engineering students, offering:

  • Free viva questions PDFs
  • Previous year question papers (PYQs)
  • Academic doubt solutions
  • Expert-guided solutions

Get the pro version for free by logging in!

5.7k questions

5.1k answers

108 comments

498 users

...