Logical and arithmetic shifts (Edexcel GCSE Computer Science): Quizzes
📚Quizzes
Practise the questions
12 questions from this quiz
ShowHide
Practise the questions
12 questions from this quiz
Why are bit shifts commonly used in computer programming?
Why are bit shifts commonly used in computer programming?
For efficient multiply/divide operations
In a logical shift left, what happens to leftmost bits?
In a logical shift left, what happens to leftmost bits?
They are discarded
In a logical shift left, what fills the empty spaces on the right?
In a logical shift left, what fills the empty spaces on the right?
0s
What is 0001 0100 after a logical shift left by 2 places?
What is 0001 0100 after a logical shift left by 2 places?
0101 0000
In a logical shift right, what fills the empty spaces on the left?
In a logical shift right, what fills the empty spaces on the left?
0s
What is 1011 1000 after a logical shift right by 3 places?
What is 1011 1000 after a logical shift right by 3 places?
0001 0111
How does arithmetic shift right differ from logical shift right?
How does arithmetic shift right differ from logical shift right?
Fills left with MSB, not 0s
What does the Most Significant Bit (MSB) represent in signed binary?
What does the Most Significant Bit (MSB) represent in signed binary?
The sign (positive or negative)
What is 1000 1000 after an arithmetic shift right by 1 place?
What is 1000 1000 after an arithmetic shift right by 1 place?
1100 0100
How does arithmetic shift left compare to logical shift left?
How does arithmetic shift left compare to logical shift left?
They work exactly the same
What can happen when shifting bit patterns representing numbers?
What can happen when shifting bit patterns representing numbers?
Loss of precision
What mathematical operation does a left shift generally perform?
What mathematical operation does a left shift generally perform?
Multiply by powers of 2
