It depends. If you are arrested for a misdemeanor, even if you are convicted, you are still eligible to register to vote, including while awaiting trial and while serving a court-ordered sentence of imprisonment. If you are arrested for a felony, even if you are remanded to custody while awaiting trial, you can register and vote until you are convicted. If you are convicted again of a felony, you will have to wait until released again to be able to register to vote or vote.