プレイ日記
MSWS coolestkid123
What does >> mean???
1そうだね
プレイ済み
返信[1]
親投稿
Hanzo rzsense
">>" and "<<" are binary bit shift operators. "4" in decimal is equal to "0100" in binary, and "4>>3" shifts "0100" three bits to the right. The result of the operation is "0001" in binary ("1" in decimal).
0そうだね
未プレイ
返信[2]
親投稿
Hanzo rzsense
I'm sorry I've shifted only two bits. The result of the operation "4>>3" is "0000" in binary ("0" in decimal).
1そうだね
未プレイ
返信[3]
親投稿
MSWS coolestkid123
Although that is cool, how would it even be necessary!!! (Thanks though, I get it)
1そうだね
プレイ済み
返信[4]
親投稿
12Me23 12Me23
It's useful for compressing data; you can store two 16 -bit numbers in a single integer by doing something like: integer=number1 OR (number2<<16) And then extract them by doing: number1=integer AND &HFFFF number2=(integer>>16) AND &HFFFF
2そうだね
プレイ済み