Here is a C++ program I see today:

```
for (int i = 0; i < LEVELS; ++i)
{
    int pyr_rows = rows >> i;      // what is the usage of >> i here ? 
    int pyr_cols = cols >> i;      // why we what to use it in this way.

    depths_curr_[i].create (pyr_rows, pyr_cols);
}

```

What I am curious about is the usage of operator >> here. I tried a simple program and type the results:

```
    int rows = 5;
int cols = 3;
for (int i=0; i<5; i++)
{
    int pyr_rows = rows >> i;
    std::cout << "current i is:" << i << std::endl;     
    std::cout << "pyr_rows is: " << pyr_rows << std::endl << std::endl;

    int pyr_cols = cols >> i;
    std::cout << "current i is:" << i << std::endl;
    std::cout << "pyr_cols is: " << pyr_cols << std::endl << std::endl;

}

```

And the result is like this:

```
current i is:0
pyr_rows is: 5

current i is:0
pyr_cols is: 3

current i is:1
pyr_rows is: 2          // from now on 
                        // the outputs of pyr_rows and pyr_cols are weird to me
current i is:1
pyr_cols is: 1           

current i is:2
pyr_rows is: 1          

current i is:2
pyr_cols is: 0

current i is:3
pyr_rows is: 0

current i is:3
pyr_cols is: 0

current i is:4
pyr_rows is: 0

current i is:4
pyr_cols is: 0

```

Why the output is like this? Can anyone explain it? And why we want to use this in this way? Any situation we prefer to do it?