# Please explain syntax for (X ^ (X \>\> 31)) - (X \>\> 31)

**URL:** <https://forum.kirupa.com/t/please-explain-syntax-for-x-x-31-x-31/298208>\
**Category:** flash\
**Created:** [October 15, 2009, 5:14am UTC](https://forum.kirupa.com/t/please-explain-syntax-for-x-x-31-x-31/298208 "2009-10-15T05:14:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shaedo](https://avatars.discourse-cdn.com/v4/letter/s/e19b73/32.png) [@Shaedo](https://forum.kirupa.com/u/Shaedo)\
**Post date:** [October 15, 2009, 5:14am UTC](https://forum.kirupa.com/t/please-explain-syntax-for-x-x-31-x-31/298208/1 "2009-10-15T05:14:32Z")

</div>

Hi could someone please explain in very very basic terms (or direct me to tutorial) what is happening in this syntax:

```auto
(X ^ (X >> 31)) - (X >> 31)

```

this was part of and example on how to optimist code (posted in this forum awhile ago), specifically for replacing either:

```auto
Math.abs(X);

```

or

```auto
X<0 ? -X : X;

```

I understand how the brackets work, and that X is a variable (I presume a Number).  
I assume that ‘^’ == ‘to the power of’.  
I dont understand why they are using \>\> or 31 at all.

Thanks for your time,  
S.
