51单片机循环左移右移
时间: 2023-09-28 11:06:57 浏览: 442
在51单片机中,可以使用循环左移和循环右移来实现某些功能。循环左移操作符为"<<",每执行一次左移指令,操作数最高位移入CY,CY中原来的数丢失,最低位补0,其他位依次向左移动1位。循环右移操作符为">>",类似地,每执行一次右移指令,操作数最低位移入CY,CY中原来的数丢失,最高位补0,其他位依次向右移动1位。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [51单片机使用循环左移_crol_(a,b)和循环右移函数_cror_(a,b)实现双向流水灯](https://download.csdn.net/download/qq_55339324/74955140)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [C51中左右移运算](https://blog.csdn.net/wangyuetuan2008/article/details/111098453)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文