Majority logic or threshold decoding