A shift instruction can specify the count in one of three ways. One form of shift instruction implicitly specifies the count as a single shift. The second form specifies the count as an immediate value. This last form allows the shift count to be a variable that the program supplies during execution. Only the low order 5 bits of CL are used.
CF always contains the value of the last bit shifted out of the destination operand.
Otherwise, OF is cleared. Following a multibit shift, however, the content of OF is always undefined. The shift instructions provide a convenient way to accomplish division or multiplication by binary power. Note however that division of signed numbers by shifting right is not the same kind of division performed by the IDIV instruction. See Figure 3-6 .