corrected 'assert' and fixed broken assertions :)
simplify transposed bits calculation