Tham khảo tài liệu 'it-programing help part 93', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | 13 he 10 1101 he 2 07 he 10 0111 he 2 bit and 1111 he 2 17 he 10 Related BitAND BitNOT BitShift BitXOR Hex Example x BitOR 3 6 x is 7 because 0011 OR 0110 0111 x BitOR 3 15 32 x 47 because 0011 OR 1111 OR 00100000 00101111 Function Reference BitRotate Performs a bit shifting operation with rotation. BitRotate value shift size Parameters value The number to be operate on. shift Number of bits to rotate to the left negative numbers shift right . If not given the default is 1. size optional A string that determines the rotation size the default is 16 bits . See below. Size parameter B rotate bits within the low-order byte 8 bits . W rotate bits within the low-order word 16 bits . D rotate bits within the entire double-word 32 bits . Return Value Returns the value rotated by the required number of bits. Bit operations are performed as 32-bit integers. Remarks Remember hex notation can be used for numbers. Related BitShift BitAND BitNOT BitOR BitXOR Hex Example x BitRotate 7 2 x 3 because 111b left-rotated twice is 1 1100b 28 y BitRotate 14 -2 y 32771 because 1110b right-rotated twice on 16 bits is 1000 0000 0000 0011b 32771 z BitRotate 14 -2 D z -2147483645 because 1110b right-rotated twice on 16 bits is 1000 0000 0000 0000 0000 0000 0000 0011b 2147483645 Function Reference BitShift Performs a bit shifting operation. BitShift value shift Parameters value The number to be shifted. shift Number of bits to shift to the right negative numbers shift left . Return Value Returns the value shifted by the required number of bits. Bit operations are performed as 32-bit integers. Remarks Remember hex notation can be used for numbers. Right shifts are equivalent to halving left shifts to doubling. Related BitAND BitNOT BitOR BitXOR Hex BitRotate Example x BitShift 14 2 x 3 because 1110b right-shifted twice is 11b 3 y BitShift 14 -2 y 56 because 1110b left-shifted twice is 111000b 56 z BitShift 1 -31 z -2147483648 because in 2 s-complement notation the 32nd digit from the right has