in Digital Logic edited by
16,314 views
53 votes
53 votes

$P$ is a $16$-bit signed integer. The $2$'s complement representation of $P$ is $(F87B)_{16}$. The $2$'s complement representation of $8\times P$ is

  1. $(C3D8)_{16}$
  2. $(187B)_{16}$
  3. $(F878)_{16}$
  4. $(987B)_{16}$
in Digital Logic edited by
16.3k views

2 Comments

$Remark:$

One arithmetic shift to left multiplies the number by 2, but we lose left most bits one by one

                        (AshiftL#2, R0)

Answer is (A).

PS: Arithmetic shift to left is same as Logical shift to left.

17
17

Left shift moves the MSB to $2x$ the weight. Doing it thrice would give us $8x$ the weight.

5
5

3 Answers

84 votes
84 votes
Best answer
Multiplication can be directly carried in $2$’s complement form. $\textsf{F87B} = 1111 1000 0111 1011$ can be left shifted $3$ times to give $8P = 1100 0011 1101 1000 = \textsf{C3D8}.$

Or, we can do as follows:

MSB in $\textsf{(F87B)}$ is $1.$ So, $P$ is a negative number. So, $P = -1 \ast 2$'s complement of $\textsf{(F87B)} = -1 \ast (0785) = -1 \ast (0000 0111 1000 0101)$

$8 \ast P = -1 \ast  (0011 1100 0010 1000) (P$ in binary left shifted $3$ times$)$

In $2$'s complement representation , this equals, $1100 0011 1101 1000 = \textsf{C3D8}$

Correct Answer: $A$
edited by
by

4 Comments

@hem  Does it mean that the value of 8p and 9p will be same ? Please clear ,thank you !

0
0
while performing Left shift Trailing bits will be filled with zeros, on right shift leading bits will filled with zeros.
1
1
on right shift leading bits will filled with zeros – this happens only when number is unsigned
0
0
16 votes
16 votes

$P=(F87B)_{16}=(1111|1000|0111|1011)_{2}:$ 2's compliment representation

What is this number ?

$(0000|0111|1000|0100)_{2}+1=(0000|0111|1000|0101)_{2}=1925$

$So, P\ is =-1925$

$-1925\times 8=-15400$

Find 2's compliment representation of $-15400$

$+15400=(0011|1100|0010|1000)_{2}$

$(1100|0011|1101|0111)_{2}+1=(1100|0011|1101|1000)_{2}=(C3D8)_{16}$

 

Correct Answer is (A)

2 votes
2 votes

Other way to see.

Answer - A

Answer:

Related questions