Ran across some code on Stack Overflow today that had me stumped. This is a few lines from the code.

Code:
var enc1 = chr1 >> 2;
var enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
var enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);

string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
I've been playing with these operators in the console and a pattern appears to be there but its not quite clear.
Can someone point me to an article or give me a term for these operators so I can look them up? Thanks!