In all cases of conviction of a misdemeanor, an appeal taken shall stay the judgment appealed from. The appellant, if sentenced to imprisonment for his offense, or to stand committed until his fine and costs shall be paid, may be relieved from such imprisonment or commitment, pending his appeal, by paying the trial court costs and giving bond, with sufficient resident sureties or one or more guaranty or surety companies authorized to do business in this state, to be approved by the clerk of the court from which the appeal is taken, payable to the state in the penalty of not less than one hundred dollars ($100.00) nor more than one thousand dollars ($1,000.00), to be determined by such clerk, with reference to the grade of the offense, as indicated by the judgment, and the ability of the appellant to give bond, conditioned to surrender himself to the sheriff of the county to suffer the judgment or sentence, if it shall be affirmed by the supreme court, within one (1) week after the judgment of affirmance shall be certified to the circuit court, or to appear before the circuit court at the next term after a judgment of reversal in such case shall be certified to the circuit court, to answer the charge of the state, and so to continue until discharged.