Binary shifts

8 flashcardsby Faizah
Study these flashcardsFree · spaced repetition · iPhone, Android, Mac & web

All cards

1
binary shifts
- moving the bits stored in a register a given number of places with the registers
2
logical shift
- bits shifted out of the registers replaced with 0
- 10101111 Shifted left 3 place becomes 01111000
3
Logical Shift Left (LSL)
- multiples the number by 2 to the power of n
4
Logical Shift Right (LSR)
Divides the number by 2 to the power of n
5
Arithmetic shift
- the sign of the number is preserved
- 10101111 Shifted right 3 places becomes 11110101
6
left shift
- bits are shifted to the left
- 10101111 Shifted left 3 places becomes 01111000
7
rigth shift
- bits are shifted to the right
- 10101111 Shifted right 3 places becomes 1111010
8
Cyclic shift
- no bits are lost, bits shifted out of one end of the register are introduced at the other end of the register
- 10101111 Shifted left 3 places becomes 01111101
Study all 8 cards for free