P is a 16-bit signed integer. The 2’s complement representation of P is (F87B)16 The 2’s complement representation of 8*P is

This question was previously asked in
GATE CS 2010 Official Paper
View all GATE CS Papers >
  1. (C3D8)16
  2. (187B)16
  3. (F878)16
  4. (987B)16

Answer (Detailed Solution Below)

Option 1 : (C3D8)16
Free
GATE CS Full Mock Test
5.3 K Users
65 Questions 100 Marks 180 Mins

Detailed Solution

Download Solution PDF

The correct answer is option 1

Concept:

When we multiply a number by 2 this means a binary representation of this number is shifted left

shifting depends upon how many time the number is multiplied by 2

Explanation:

Given a hexadecimal number in 2's complement and required in 2's complement

So, nothing want to change it

P = (F87B)16 = (1111 1000 0111 1011)2

8P =23*P

23*P this means that the binary number that is represented by P is shifted 3 times left

So, it becomes

(1111 1000 0111 1011)2 = (1100 0011 1101 1000)2 = (C3D8)16

P = (F87B)16 = (1111 1000 0111 1011)2

Most significant bit is 1 here its mean number is negative

To get the value 2's complement of this is (0000 0111 1000 0101)2

(0000 0111 1000 0101)2 =(-1925)10

8P =8 × -1925 =-15400

now need to find 2's complement of -15400

(15400)10= (0011 1100 0010 1000)2

take 2's complement of (0011 1100 0010 1000)2

(1100 0011 1101 1000)2 = (C3D8)16

Latest GATE CS Updates

Last updated on Jan 8, 2025

-> GATE CS 2025 Admit Card has been released on 7th January 2025.

-> The exam will be conducted on 1st February 2025 in 2 shifts.

-> Candidates applying for the GATE CE must satisfy the GATE Eligibility Criteria.

-> The candidates should have BTech (Computer Science). Candidates preparing for the exam can refer to the GATE CS Important Questions to improve their preparation.

-> Candidates must check their performance with the help of the GATE CS mock tests and GATE CS previous year papers for the GATE 2025 Exam.

Get Free Access Now
Hot Links: teen patti wealth teen patti diya teen patti master old version