code:     public final GF2nElement convert(GF2nElement elem, GF2nField basis)
          throws RuntimeException
      {
          if (basis == this)
          {
              return (GF2nElement)elem.clone();
          }
          if (fieldPolynomial.equals(basis.fieldPolynomial))
          {
              return (GF2nElement)elem.clone();
          }
          if (mDegree != basis.mDegree)
          {
              throw new RuntimeException("GF2nField.convert: B1 has a"
                  + " different degree and thus cannot be coverted to!");
          }
  
          int i;
          GF2Polynomial[] COBMatrix;
          i = fields.indexOf(basis);
          if (i == -1)
          {
              computeCOBMatrix(basis);
              i = fields.indexOf(basis);
          }
          COBMatrix = (GF2Polynomial[])matrices.elementAt(i);
  
          GF2nElement elemCopy = (GF2nElement)elem.clone();
          if (elemCopy instanceof GF2nONBElement)
          {
              // remember: ONB treats its bits in reverse order
              ((GF2nONBElement)elemCopy).reverseOrder();
          }
          GF2Polynomial bs = new GF2Polynomial(mDegree, elemCopy.toFlexiBigInt());
          bs.expandN(mDegree);
          GF2Polynomial result = new GF2Polynomial(mDegree);
          for (i = 0; i < mDegree; i++)
          {
              if (bs.vectorMult(COBMatrix[i]))
              {
                  result.setBit(mDegree - 1 - i);
              }
          }
          if (basis instanceof GF2nPolynomialField)
          {
              return new GF2nPolynomialElement((GF2nPolynomialField)basis,
                  result);
          }
          else if (basis instanceof GF2nONBField)
          {
              GF2nONBElement res = new GF2nONBElement((GF2nONBField)basis,
                  result.toFlexiBigInt());
              // TODO Remember: ONB treats its Bits in reverse order !!!
              res.reverseOrder();
              return res;
          }
          else
          {
              throw new RuntimeException(
                  "GF2nField.convert: B1 must be an instance of "
                      + "GF2nPolynomialField or GF2nONBField!");
          }
  
      }
  
  