how do i get the rgb values from a 16 bit pixel ?

i know its rrrrr gggggg bbbbb

is there a shift operator to shift the bits to the left and right ?

&h is hexa
&o us octa

but how do i use binary ???

please advise