Author: Gerd Isenberg
Date: 01:43:27 09/23/02
Go up one level in this thread
On September 22, 2002 at 20:48:48, Russell Reagan wrote: >On September 22, 2002 at 15:57:09, Matthias Gemuh wrote: > >>What is ">>>" ? > >In Java there are two right shift operators. One is the signed right shift (>>) >and the other is the unsigned right shift (>>>). If you do a >> b in Java, and a >is a negative number, a will be negative after the >> call. If you do a >>> b, a >will be positive always. More specifically, >> fills the leftmost bits with >whatever the sign bit is (0 or 1, for positive and negative, respectively), and >>>> fills with zeros always. > >The >> operator preserves the sign (positive or negative). The >>> operator does >not. > >The >>> operator is the equivalent of >> in C/C++, I believe. Someone will >correct me if I'm wrong. > ">>>" in Java is unsigned shift right. ">>" is signed shift right. Gerd >Russell
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.