ummmmmm i can do it in assembly

Code:

mov ax, 0011111111000000b ;this moves 3FC0
sl ax, 1 ;this is a logical shift left of 1.... 1 can be replaced with any number
sr ax, 1 ;this is a logical shift right of 1.... 1 can be replaced with any number

remember when shifting , the byte that is being shifted is going to the CB Flag (Carry Bit). hope that helps.