projog

4.18. >> - right shift bits.

Examples

?- X is 13 >> 0.
X = 13

yes

?- X is 13 >> 1.
X = 6

yes

?- X is 13 >> 2.
X = 3

yes

?- X is 13 >> 3.
X = 1

yes

?- X is 13 >> 4.
X = 0

yes

Note bit shifting using a negative value gives different results than in some other Prolog implementations.

?- X is 13 >> -1.
X = 0

yes