logic shift and rotate instruction
-
Upload
jiaahrajpout123 -
Category
Technology
-
view
15 -
download
0
Transcript of logic shift and rotate instruction
Presented to:Prof. Muhammad Ramiz
Presented by:Wajeeha Ali(90)Afira Rashid (93)Amna jutt(98)Zarish zahid (81)
Wajeeha Ali(G1F15BSCS0090)
Logic, Shift, and Rotate Instructions
Logic instruction
To manipulate individual bits Binary Value 0 treated as false Binary Value 1 treated as true
AND OR XOR NOT TEST
SHIFT AND ROTATE INSTRUCTION:
Shift:Shift the bits in destination operand by one or more positions either to the left or right.
Syntax:
SHL DESTINATION,CLSAL DESTINATION,CLSHR DESTINATION,CLSAR DESTINATION,CL
ROTATE:
Bit shifted out from one end of the destination operand is put back on the other end.
SYNTAX:
ROL DESTINATION,CLROR DESTINATION,CL
Program:
An AL Program that prompts the user to enter two binary numbers of up to 8 digits each, and print their sum on the next line in binary. If the user enters an illegal character, he or she should be prompted to begin again. Each input ends with a carriage return.