+ 1

# what is 101 in 8 bit binary left shifted by 2?

Sorry i just want to make sure i’m correct. 101 left shifted by 2 is 10100 Thus 01010000 because its 8 bit?

8 Respuestas

+ 2

101 left shiftet by 2 is 20 in decimal. So it is 00010100.
Everytime you shift left it is the same as doubeling the decimal value by two.

+ 1

Thank youuu

+ 1

And as for right shift
For example 101 in 8 bit binary right shifted by 2 would be
00000001 ?

+ 1

What about 101111101101 in 8 bit binary right shifted by 2?
Would it be 1011111011
But would i limit to 8 bit by removing extra bit from the right side?
Al 11011111110?

+ 1

Don’t mind Al

+ 1

The answers should always be binary.
So the final answer is 11101101?
It’s the same as left shift. You limit to 8 bit binary by removing extra bit at the left?

0

banna101 Correct

0

The problem is that the result is bigger than a 8 bit number. If you foce it into an 8 bit number it depends on the language you are using. As far as i know it would cut the leftmost numbers.