16 bit entropy calculation