Compute Shannon Entropy