var ByteNum: Byte;begin //右移 shr asm mov al, 10000000B {128} shr al, 1 {shr 10000000 一次会得到 01000000} mov ByteNum, al end; ShowMessage(IntToStr(ByteNum)); {64; shr 相当于 ÷2} //左移 shl asm mov al, 00000001B {1} shl al, 1 {shl 一次会得到 00000010} shl al, 1 {shl 两次会得到 00000100} mov ByteNum, al end; ShowMessage(IntToStr(ByteNum)); {4; shl 相当于 ×2}end;