零填充左移? [英] Zero Fill Left Shift?

查看:121
本文介绍了零填充左移?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么有两个右移位运算符(右移和零填充右移)但JAVA中只有一个左移运算符???

换句话说,为什么没有<<和<<<在JAVA中存在>>和>>> do ???

Why are there two right shift operators( Right Shift and Zero Fill Right Shift) but only one left shift operator in JAVA???
In other words, why are there not << and <<< exist in JAVA as >> and >>> do???

推荐答案

右移通常会填充符号位,这是最左边的位。进行左移时没有特殊位,因此它始终为零填充。
The right shift will normally fill with the sign bit, which is the left most bit. There is no "special" bit when doing a left shift, hence it is always zero fill.


这篇关于零填充左移?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆