首页 > 其他 > 详细

Lsh and Rsh (左移和右移)

时间:2020-12-08 14:05:34      阅读:23      评论:0      收藏:0      [点我收藏+]

Lsh left shifts the integer part of the displayed value (multiplies it by 2) n times, where n is the next input number, and gives an integer result (base is set to Bin):

10 Lsh 3 = gives 80 (10 multiplied by 2 three times).

10.345 Lsh 3 = also gives 80.


Rsh right shifts the value (performs an integer divide by 2) n times.

16 Rsh 2 = gives 4 (16 divided by 2 twice).

16.999 Rsh 2 = also gives 4.




Reference

Lsh and Rsh (左移和右移)

原文:https://www.cnblogs.com/ezhar/p/14101840.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!