Question: Shifting a binary number to the left by n bits, and adding 0s from the right in place of shifted bits is equivalent to multiplying

Shifting a binary number to the left by n bits, and adding 0s from the right in place of shifted bits is equivalent to multiplying that number by 2n . For example, 0010 (210) becomes 1000 (810) when shifted by two bits to the left (n=2, multiplier = 22 = 4). Similarly, shifting a binary number to the right by n times, and adding 0s from the left in place of shifted bits is equivalent to dividing that number by 2n . Show, by way of examples, why this does not work for 2s complement signed integers. (0.25 point)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!