1. ## Shift Function

I do not think I am using the "shift" correctly in my program ? I am trying to cycle the bytes so I would get the value of the bit pattern once I shift the bytes. something to the effect :

01 00 00 00 = 1

once it hit FF it would "shift" the bytes so I would get :

00 01 00 00 = 256
00 02 00 00 = 512

and so on ...................

I am thinking about adding a function and not trying to do it all in the main ? Anyone have any ideas ? Thank you for the help!

Code:
```#include <stdio.h>

int main()
{
int i;
for (i =0; i< 256; i++)
printf( "The Value is:   %02X 00 00 00     %14d     %14u\n", i,i,i);

if ( i == 255)
i = i >> 2;
for (i =0; i< 256; i++)
printf( "The Value is:  00 %02X 00 00      %14d     %14u\n", i,i,i);

if ( i == 255)
i = i >> 2;
for (i =0; i< 256; i++)
printf( "The Value is:  00 00 %02X 00      %14d     %14u\n", i,i,i);

if ( i == 255)
i = i >> 2;
for (i =0; i< 256; i++)
printf( "The Value is:  00 00 00 %02X       %14d     %14u\n", i,i,i);

getch();
return (0);
getch();
}```

2. for ( i = 0 ; i < 0x100 ; i++ )

Then
for ( ; i < 0x10000 ; i += 0x100 )

Then
for ( i < 0x1000000 ; i += 0x10000 )

etc

3. No 'if' statements are required. When the loops exit the number is equal to the number in the less-than comparison, i.e. 256.

Instead of this "%02X 00 00 00" You'll want something like this: "%08X"

You can remove the second getch. No code ever executes after a return.

4. You're re-initializing i to 0 in every loop.
And one space for indentation is just not sufficient.
Plus it's messed up, because for every indentation level, there should be more spaces, not less.