KPIT Technologies interview question

What is an encoder?