Year 11 Exam  >  Year 11 Notes  >  Computer for GCSE/IGCSE  >  Binary Shifts

Binary Shifts | Computer for GCSE/IGCSE - Year 11 PDF Download

Binary Shifts

  • A binary shift involves multiplying or dividing binary numbers.
  • In a binary shift, all bits in a binary number are moved a certain number of positions to the left or right.
  • During a logical binary shift to the left, bits shifted from the end are lost, and zeros fill in at the opposite end.
  • Conversely, during a logical binary shift to the right, bits shifted from the beginning are lost, and zeros fill in at the opposite end.
  • When performing a logical binary shift, a positive binary integer is multiplied or divided based on the shift direction. Shifting left is akin to multiplying by a power of 2, while shifting right is akin to dividing by a power of 2.
  • In a logical binary shift, either the most significant bit(s) or least significant bit(s) are lost, depending on the shift direction.

Binary Shift Walkthrough

  • When you shift a binary number to the left or right, you are essentially multiplying or dividing it by a power of 2.
  • Shifting the binary number 11001100 to the left by two positions results in 00110000. The two bits shifted from the end are lost, and two zeros are added at the opposite end.
  • For example, shifting 11001100 to the left by two positions is equivalent to multiplying it by 2 raised to the power of 2 (4). The result, 00110000, is four times the original value.
  • On the other hand, shifting the same binary number to the right by two positions gives 00110011. The two bits shifted from the beginning are lost, and two zeros are added at the opposite end.
  • Shifting 11001100 to the right by two positions is akin to dividing it by 2 raised to the power of 2 (4). The result, 00110011, is equal to the original value divided by 4.

Question for Binary Shifts
Try yourself:
What happens during a logical binary shift to the left?
View Solution

The document Binary Shifts | Computer for GCSE/IGCSE - Year 11 is a part of the Year 11 Course Computer for GCSE/IGCSE.
All you need of Year 11 at this link: Year 11
92 docs|30 tests

Top Courses for Year 11

FAQs on Binary Shifts - Computer for GCSE/IGCSE - Year 11

1. What is binary shifting in computer science?
Ans. Binary shifting is a method used in computer science to quickly multiply or divide numbers by powers of 2. It involves moving the digits of a binary number to the left or right, effectively doubling or halving the number.
2. How is binary shifting used in programming languages?
Ans. Binary shifting is commonly used in programming languages for optimizing code and improving performance. It is frequently used in operations such as multiplication and division by powers of 2.
3. What are the two types of binary shifting operations?
Ans. The two types of binary shifting operations are logical shift and arithmetic shift. In a logical shift, the vacant bit positions are filled with zeros, while in an arithmetic shift, the vacant bit positions are filled based on the sign bit.
4. Can binary shifting be used to quickly calculate powers of 2?
Ans. Yes, binary shifting can be used to quickly calculate powers of 2 by shifting the bits to the left by the desired number of positions. Each shift to the left effectively doubles the number.
5. How does binary shifting help in memory management in computer systems?
Ans. Binary shifting can help in memory management by efficiently allocating memory blocks that are powers of 2 in size. This can reduce memory fragmentation and improve the overall performance of the system.
92 docs|30 tests
Download as PDF
Explore Courses for Year 11 exam

Top Courses for Year 11

Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev
Related Searches

Extra Questions

,

Exam

,

Summary

,

MCQs

,

Sample Paper

,

mock tests for examination

,

Binary Shifts | Computer for GCSE/IGCSE - Year 11

,

Objective type Questions

,

ppt

,

Free

,

video lectures

,

Binary Shifts | Computer for GCSE/IGCSE - Year 11

,

past year papers

,

Binary Shifts | Computer for GCSE/IGCSE - Year 11

,

Viva Questions

,

Semester Notes

,

study material

,

pdf

,

shortcuts and tricks

,

practice quizzes

,

Important questions

,

Previous Year Questions with Solutions

;