Computer Science : S1 : L5 : Binary Shifts
A logical binary shift is when all the binary numbers in a stored register shift one or more places to the left or the right. When it goes to the left it * 2 for one place 4 for two places 8 for three places … For the right the number /2 for one place /4 for 2 places /8 for 3 places … A 0 appears in any empty spaces , and whatever the highest number was (for 8 bit) gets lost
Binary shifts occur to multiply or divide positive integers. If you're going to the left you're multiplying, if you're going to the right you're dividing.
What can it be used for ?
Binary shifts are used for multiplication and division however Binary shifts only work up to a certain number as if we lose vital information it loses integrity and produces incorrect information.