« first day (2932 days earlier)      last day (1692 days later) » 

4:48 PM
Hi, is any one here available to help me to clarify this function?

You need to know the bit pattern, in this case, pattern for bit 4 is 16 (2 at the power of 4). So:

var cloudmaskL8 = function(image) {
var qa = image.select('BQA');
var pattern = ee.Number(2).pow(4).toInt();
var mask = qa.bitwise_and(pattern).rightShift(4);
return image.updateMask(mask.not());
}
Then you can make a function to decode any other bit.
 

« first day (2932 days earlier)      last day (1692 days later) »