|
>>> is unsigned to the right, which is the left fill 0.
>> << is a signed move, fill the sign bit when the vacancy.
>>> >> << These are all operating binary sequence moves, but do we get them in real development?
We know that on the network, sending is a byte stream, such as sending int a = 32;
An int occupies 4 bytes, such as high to Low: B1 B2 B3 B4
For Java, it will be sent in order from highest to lowest, so obviously we must be able to decompose an int into b1,b2, b3,b4; At the same time, the receiver must know how to assemble the B1 B2 B3 B4 into the original data!
"Different languages may send the same byte order, for example, C + + may send from low to High"
Look at a program:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/71/6F/wKioL1XQUuDDNToHAAHQmQ84foQ137.jpg "title=" Sogou _ 2015-08-16_16-59-14.png "alt=" Wkiol1xquuddntohaahqmq84foq137.jpg "/>
The result of the operation is:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/71/6F/wKioL1XQUwKw686QAABz614RB3U260.jpg "title=" Sogou _ 2015-08-16_16-59-48.png "alt=" Wkiol1xquwkw686qaabz614rb3u260.jpg "/>
|