Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does JavaScript >> stand for? [duplicate]

I'm translating a JavaScript algorithm into PHP, and I ran into the symbol >>, and I have no clue what it means. It's hard to search Google for symbols, so can anyone tell me what it means?

like image 1000
Dan Avatar asked Apr 28 '26 16:04

Dan


2 Answers

It's a bit shifting operator: http://www.contactor.se/~dast/fpl-old/language/shift.HTML

like image 131
brianreavis Avatar answered Apr 30 '26 05:04

brianreavis


It is a sign-propagating right shift. Many, many, languages have this operator.

Wikipedia has a good article on the subject. My first link has a few examples and an explanation.

like image 35
Nick Presta Avatar answered Apr 30 '26 07:04

Nick Presta