binary shift right of two places on the binary number 00110100.
Describe a shift that can be used to double the value of the binary number 00100100.
Complete a 2 place right shift on the binary number 11001011.
verry confused plz help plx plz plz i watchd every video got iit wrong plz help
Since it is a BINARY number ....every position to the left is TWICE the one to the right (edited)
example 010 is twice 001 100 is twice 010
so shift the number to the left ONE space to double it
00100100 to double it shift it one space left
Binary shift right two places
Imagine a wall being placed on the right of a binary number.
Whenever a number gets left shifted, a zero comes out of the wall to fill the gap between the wall and the number.
Whenever a number gets right shifted, the last digit just goes through the wall and never come back again.
Now, let's try left shifting and right shifting some numbers.
right shift of two places on 00110100.
The bar denotes the "wall", and blue digits means the digit is gone.
right shift once
right shift once more
The result should be \(001101\), but because you needs 8 bits for a byte, it becomes \(00001101\). We add zeroes in front when we don't have enough digits.
Hints for the others:
Q2) Think of what a left shift and a right shift really does on the value of the binary number by trying out few examples.
Q3) Similar to Q1.
EDIT: Italicized text is what I changed.
We need 8 digits, but we only had 6, which is 001101.
When we don't have enough digits, we add zeroes in front of the number. This is because doing this does not affect the value of the number.
We add 2 zeroes in front, so it gives 00001101.