Bring down the first coefficient. Multiply by a, write it under the next coefficient, add. Repeat. The last number is the remainder.