The document discusses four types of shift operators:
1) Shift Left logically shifts each bit left by one, filling the lowest bit with 0 and discarding the highest bit.
2) Shift Right logically shifts each bit right by one, filling the lowest bit with 0.
3) Shift Arithmetic Right arithmetically shifts each bit right by one, filling the lowest bit with the original highest bit value.
4) Shift Arithmetic Left arithmetically shifts each bit left by one, moving the MSB outside the register and filling the LSB position with 0.
The document discusses four types of shift operators:
1) Shift Left logically shifts each bit left by one, filling the lowest bit with 0 and discarding the highest bit.
2) Shift Right logically shifts each bit right by one, filling the lowest bit with 0.
3) Shift Arithmetic Right arithmetically shifts each bit right by one, filling the lowest bit with the original highest bit value.
4) Shift Arithmetic Left arithmetically shifts each bit left by one, moving the MSB outside the register and filling the LSB position with 0.
The document discusses four types of shift operators:
1) Shift Left logically shifts each bit left by one, filling the lowest bit with 0 and discarding the highest bit.
2) Shift Right logically shifts each bit right by one, filling the lowest bit with 0.
3) Shift Arithmetic Right arithmetically shifts each bit right by one, filling the lowest bit with the original highest bit value.
4) Shift Arithmetic Left arithmetically shifts each bit left by one, moving the MSB outside the register and filling the LSB position with 0.
Assignment no 03 Cyber Security 5A Mr. Matiullah Question no 01: Write the Shift operators with examples ➢ Shift Left ➢ Shift Right ➢ Shift Arithmetic left ➢ Shift Arithmetic Right
➢ Shift Left: A shift left logical of one position moves
each bit to the left by one. The low-order bit (the right- most bit) is replaced by a zero bit and the high-order bit (the left-most bit) is discarded ➢ Shift Right: The Shift Right instruction performs a right shift on the destinations operand, filling the lowest bit with 0. The lowest bit is moved into the Carry Flag. SAL (Shift Arithmetic Left) is identical to the SHL instruction. SAR (Shift Arithmetic Right) performs a right arithmetic shift on its operand ➢ Shift Arithmetic right: SAR (Shift Arithmetic Right) performs a right arithmetic shift on its operand. The ROL instruction shifts each bit to the left, with the highest bit copied in the Carry flag and into the lowest bit ➢ Shift Arithmetic Left: Each bit in the register is shifted to the left one by one in this shift micro-operation. The most significant bit (MSB) is moved outside the register, and the place of the least significant bit (LSB) is filled with 0 …….END…….
Register Transfer Language Register Transfer Bus and Memory Transfers Arithmetic Micro-Operations Logic Micro-Operations Shift Micro-Operations Arithmetic Logic Shift Unit