Open main menu

CDOT Wiki β

Changes

Bitwise Operations

146 bytes added, 14:23, 18 September 2023
OR
|Mask ||bgcolor="yellow"|1||bgcolor="yellow"|1||bgcolor="yellow"|1||bgcolor="yellow"|1||0||0||0||0
|-align="center"
|Output||bgcolor="yellow"|1||bgcolor="yellow"|1||bgcolor="yellow"|1||bgcolor="yellow"|1||bgcolor="yellow"|10||bgcolor="yellow"|01||bgcolor="yellow"|10||bgcolor="yellow"|01
|}
A rotate-left by 1 bit performed on a byte will move bit 0 to bit 1, bit 1 to bit 2, bit 2 to bit 3, and so forth. Bit 7 will move to bit 0.
 
Note that in some processors, a status register bit is included in the rotation, allowing rotates to be strung together in multi-byte sequences.
=== Shift ===