search
Log In
32 votes
5.9k views

$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
5.9k views
9

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

1

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

2 Answers

57 votes
 
Best answer
Multiplication can be directly carried in 2's complement form. F87B = 1111 1000 0111 1011 can be left shifted 3 times to give 8P = 1100 0011 1101 1000 = C3D8.

Or, we can do as follows:

MSB in (F87B) is 1. So, P is a negative number. So, P = -1 * 2's complement of (F87B) = -1 * (0785) = -1 * (0000 0111 1000 0101)

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

In 2's complement representation , this equals, 1100 0011 1101 1000 = C3D8

Correct Answer: $A$

edited by
8
The first one was quite easier. :)
0
why binary left shift why not right shift ?
17
Left shift means adding a 0 at right end, which is equivalent to multiply by 2 in binary. Right shift will be doing division by 2.
1
ya rgt thanks:)
1
suppose iif the question asks 10*P then ??
22
@Puja you can do it  (10*P = 8*P + 2*P) where (8*P) you shift 3 digit left and then for (2*P) you can shift it 1 digit left and then add it.
2
sir I want to know why should be shift 3 times ?

if it is 9 then ?
1
@hem chandra

Left shift  is equal to multiplication and right shift equals to division in binary numbers, for the factor of 2 like 2 , 2^2, 2^3 .............

Since here it is 8 , it is 2^3. So we need to shift 3 times
4
if there is 9p then 8p+1p = 2^3p+2^0p (overall three left shifts)
1
Thank You so much for this explanation :)
1

Puja Mishra 

If you do 10*P then You will get

= 8*P + 2*P

= 1 1011 0100 1100 1110

This is the Case of Overflow as said in Question P is 16 Bit Signed Integer.

So i guess there will be one option of overflow in this scenario.

0
@krishn.jh It won't be overflow because for overflow $C_{in} \neq C_{out}$ but here $C_{in} = C_{out} = 1$
0
@Akhilesh so you mean to say

if you do 8*P + 2*P then no overflow will occur?
0
It will be end carry, which is discarded in 2's complement.

And in 2's complement we can forget all 1s in MSBs, except one 1.
Eg. 111011 = 1011

Thus, we can forget the end carry in our result of 8P+2P because sign(negative here) as well as value is still preserved.
0
@Akhilesh ok yes i know as concept says preceding 1's does not affect the values in 2's Complement as they make one partial block.

i got it as after discarding the carry 1, it is not going to affect the final result.

But Be careful  as if sum is 0 carry 1 in MSB place then surely there would be Overflow.
0
1010=10

then after left shift by 1 bit it becomes 0100=4 ,why didnt i get 20?
0
Great Answer!
0
Can we do division directly on 2's complement form also?
0
shifting mechanism can't be applied in case of 13*P, right ??
0

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

0 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)

Answer:

Related questions

39 votes
9 answers
1
9.3k views
In the sequential circuit shown below, if the initial value of the output $Q_1Q_0$ is $00$. What are the next four values of $Q_1Q_0$? $11$, $10$, $01$, $00$ $10$, $11$, $01$, $00$ $10$, $00$, $01$, $11$ $11$, $10$, $00$, $01$
asked Sep 29, 2014 in Digital Logic jothee 9.3k views
20 votes
4 answers
2
4.5k views
What is the boolean expression for the output $f$ of the combinational logic circuit of NOR gates given below? $\overline{Q+R}$ $\overline{P+Q}$ $\overline{P+R}$ $\overline{P+Q+R}$
asked Sep 29, 2014 in Digital Logic jothee 4.5k views
35 votes
1 answer
3
8.7k views
The main memory unit with a capacity of $4$ $\text{megabytes}$ is built using $1M \times$ $\text{1-bit}$ DRAM chips. Each DRAM chip has 1K rows of cells with $1K$ cells in each row. The time taken for a single refresh operation is $100$ $\text{nanoseconds}$. ... in the memory unit is $100$ nanoseconds $100\times 2^{10}$ nanoseconds $100\times 2^{20}$ nanoseconds $3200\times 2^{20}$ nanoseconds
asked Sep 29, 2014 in Digital Logic jothee 8.7k views
18 votes
4 answers
4
3.1k views
The minterm expansion of $f(P,Q,R) = PQ +Q \bar{R}+P\bar{R}$ is $m_2+m_4+m_6+m_7$ $m_0+m_1+m_3+m_5$ $m_0+m_1+m_6+m_7$ $m_2+m_3+m_4+m_5$
asked Sep 29, 2014 in Digital Logic jothee 3.1k views
...