bit shifts and their logical operators
this program below moves the last (junior) and the penultimate bytes variable i type int.im trying to understand why the programmer wrote this

    i = (i & LEADING_TWO_BYTES_MASK) | ((i & PENULTIMATE_BYTE_MASK) >> 8) | ((i & LAST_BYTE_MASK) << 8);

 
in the program below can anyone explain to me in plain english whats going on in the program below

    #include <stdio.h>
    #include <cstdlib>
    
    #define LAST_BYTE_MASK 255 //11111111
    #define PENULTIMATE_BYTE_MASK 65280 //1111111100000000
    #define LEADING_TWO_BYTES_MASK 4294901760 //11111111111111110000000000000000
    
    
    int main(){
    	unsigned int i = 0;
    	printf("i = ");
    	scanf("%d", &i);
    	i = (i & LEADING_TWO_BYTES_MASK) | ((i & PENULTIMATE_BYTE_MASK) >> 8) | ((i & LAST_BYTE_MASK) << 8);
    	printf("i = %d", i);
    	system("pause");
    }

thanks in advance
bit shifts and their logical operators
===

this program below moves the last (junior) and the penultimate bytes variable i type int.im trying to understand why the programmer wrote this

    i = (i & LEADING_TWO_BYTES_MASK) | ((i & PENULTIMATE_BYTE_MASK) >> 8) | ((i & LAST_BYTE_MASK) << 8);

 
in the program below can anyone explain to me in plain english whats going on in the program below

    #include <stdio.h>
    #include <cstdlib>
    
    #define LAST_BYTE_MASK 255 //11111111
    #define PENULTIMATE_BYTE_MASK 65280 //1111111100000000
    #define LEADING_TWO_BYTES_MASK 4294901760 //11111111111111110000000000000000
    
    
    int main(){
    	unsigned int i = 0;
    	printf("i = ");
    	scanf("%d", &i);
    	i = (i & LEADING_TWO_BYTES_MASK) | ((i & PENULTIMATE_BYTE_MASK) >> 8) | ((i & LAST_BYTE_MASK) << 8);
    	printf("i = %d", i);
    	system("pause");
    }

thanks in advance