The 2's complement representation of the decimal value -15 isa)111...
is the correct ans.In 2's complement representation, positive numbers are represented in simple binary form and negative numbers are represented in its 2's complement form. So, for -15, we have to complement its binary value -01111 and add a 1 to it, which gives 10001. Option D.
View all questions of this test
The 2's complement representation of the decimal value -15 isa)111...
2's Complement Representation
- The 2's complement representation of a negative number is obtained by taking the 1's complement of the absolute value of the number and adding 1 to the result.
- For example, to find the 2's complement representation of -15, we first find the absolute value of 15, which is 15 itself.
- Then we find the 1's complement of 15, which is obtained by flipping all the bits in the binary representation of 15.
- The binary representation of 15 is 1111, so the 1's complement of 15 is 0000.
- Finally, we add 1 to the 1's complement to get the 2's complement representation of -15, which is 0001.
Binary Representation of -15
- The binary representation of -15 in 2's complement notation is obtained by taking the 2's complement of 15.
- We have already seen that the 2's complement of 15 is 0001.
- However, since we are representing a negative number, we need to use the sign bit, which is the leftmost bit in the binary representation.
- In 2's complement notation, the sign bit is 1 for negative numbers and 0 for non-negative numbers.
- Therefore, the binary representation of -15 is 10001, where the leftmost bit is the sign bit.
Answer
- The correct answer is option 'D', which is 10001.
- This is the binary representation of -15 in 2's complement notation.
To make sure you are not studying endlessly, EduRev has designed Computer Science Engineering (CSE) study material, with Structured Courses, Videos, & Test Series. Plus get personalized analysis, doubt solving and improvement plans to achieve a great score in Computer Science Engineering (CSE).