function v = CS5300_B(q)
%

if q==0
    v = 0;
else
    v = -(q*log2(q)+(1-q)*log2(1-q));
end
