delivered the opinion of the court:
In each of these consolidated cases (People v. Davis, No. 55318, and People v. Alvardo, No. 55335) the defendant was convicted in the circuit court of Cook County and his conviction was affirmed by the appellate court. This court allowed the defendant’s petition for leave to appeal in People v. Alvardo. In People v. Davis, defendant’s petition for leave to appeal was originally denied, but that order was later vacated and the case was consolidated with People v. Alvardo in this court.
These consolidated cases present a single issue for review: Do sections 5—4—1(c) and 5—8—1(b) of the Unified Code of Corrections (Ill. Rev. Stat. 1979, ch. 38, pars. 1005—4—1(c), 1005—81(b)), requiring the trial court to state its reasons for imposing a particular sentence, impose a mandatory, nonwaivable requirement necessitating remandment upon failure to comply? Section 5—4—1(c) provides:
“In imposing a sentence for a felony, the trial judge shall specify on the record the particular evidence, information, factors in mitigation and aggravation or other reasons that led to his sentencing determination.” (Ill. Rev. Stat. 1979, ch. 38, par. 1005—4—1(c).)
And section 5—8—1(b) provides:
“The sentencing judge in each felony conviction shall set forth his reasons for imposing the particular sentence he enters in the case, as provided in Section 5—4—1 of this Code.” Ill. Rev. Stat. 1979, ch. 38, par. 1005—8—1(b).
Defendant Elvin U. Alvardo was charged by indictment with murder, convicted of voluntary manslaughter after a bench trial, and sentenced to seven years’ imprisonment. Defendant L. C. Davis was charged by indictment with rape and robbery, convicted of both offenses after a jury trial, and sentenced to 28 years on the rape conviction and seven years on the robbery conviction. Neither defendant requested or moved for a statement of the court’s reasons for the sentence imposed; neither defendant objected to the omission at the sentencing hearing; nor did either defendant raise the objection in a post-trial motion.
At the sentencing hearing of Elvin Alvardo, the court read the presentence report, heard arguments in aggravation and mitigation, and heard a statement by the defendant through his interpreter. At the conclusion the court, without a statement of reasons, sentenced the defendant to a term of seven years. At the sentencing hearing of L. C. Davis, the court, after denying defendant’s motion for a new trial, hearing arguments in aggravation and mitigation, and offering the defendant the opportunity to make a statement, pronounced the sentence, without a statement of reasons.
On appeal, the appellate court upheld the conviction of Elvin Alvardo in a Rule 23 order (73 Ill. 2d R. 23). (96 Ill. App. 3d 1198.) With regard to the sentencing issue, the court found that defendant’s failure to request a statement of reasons from the trial court and defendant’s failure to object to the imposition of a sentence not in conformity with section 5—4—1(c) waived the matter for consideration on review.
The conviction of L. C. Davis was also affirmed on appeal. (97 Ill. App. 3d 235.) With regard to the sentencing issue, the appellate court observed that the failure of the trial court to state explicit reasons for imposing a sentence normally requires that the sentence be vacated and that a new sentencing hearing be held. The appellate court determined, however, that the trial court’s failure to announce its reasons for imposing a sentence cannot be raised on appeal unless proper objections were made in the trial court. The court held that the failure of the defendant to request an explanation from the trial court and the failure to raise the issue in a post-trial motion waived any objections on that point. 97 Ill. App. 3d 235, 239.
In interpreting the statute, the appellate courts have split in deciding whether the right to a statement of reasons is waived on appeal if the defendant fails to demand compliance with the statute in the trial court. Appellate court decisions finding that the duty to specify reasons at sentencing is an independent duty imposed upon the trial court by statute which cannot be waived by either party are: People v. Rickman (1979), 73 Ill. App. 3d 755; People v. Slack (1980), 81 Ill. App. 3d 557; People v. Wilson (1981), 93 Ill. App. 3d 161. The remedy for failure to comply is remandment of the case for a proper sentencing hearing.
Appellate court decisions finding that defendant’s failure to present the question to the trial court, thus providing the court with the opportunity to correct the omission, precludes the defendant from raising the issue on appeal are: People v. Taylor (1980), 82 Ill. App. 3d 1075, and People v. Baseer (1980), 90 Ill. App. 3d 866. The courts agree, however, “that the statute entitles defendant to a statement of reasons and that it would be error for the court to refuse to make a statement if requested.” People v. Taylor (1980), 82 Ill. App. 3d 1075, 1078; People v. Baseer (1980), 90 Ill. App. 3d 866, 874.
Urging that the statutory requirement is a mandatory one, defendants rely on this court’s decision in People v. Youngbey (1980), 82 Ill. 2d 556. In that case, this court held the presentence investigation and report to be a mandatory legislative requirement which cannot be waived, absent an agreement between the parties as to the sentence to be imposed. (People v. Youngbey (1980), 82 Ill. 2d 556, 561. ) That section of the statute provides:
“A defendant shall not be sentenced for a felony before a written presentence report of investigation is presented to and considered by the court.” (Emphasis added.) (Ill. Rev. Stat. 1979, ch. 38, par. 1005—3—1.)
That amendment became effective February 1, 1978, and was originally a companion provision to the statutory requirement before us in the instant case. Both provisions are part of a broader statutory scheme which introduced determinate felony sentencing to Illinois. Pub. Act 80—1099, sec. 3, eff. Feb. 1, 1978.
In Youngbey we found the presentence report to be mandatory because it was not solely for the benefit of the defendant but for the enlightenment of the court as well. Because it was intended to serve as a “useful tool for the sentencing judge,” it was not the defendant’s “personal right” which could be waived. (People v. Youngbey (1980), 82 Ill. 2d 556, 565.) Also, it was noted in Youngbey that the statutory language considered in that case was phrased in the negative, thus prohibiting the imposition of sentence in the absence of compliance with the statute. In that case the statute involved used not merely the word “shall,” but coupled it with the negative limitation by providing that the defendant shall not be sentenced unless the statute is complied with. People v. Youngbey (1980), 82 Ill. 2d 556, 562.
In Youngbey we also held that the mandatory presentence report requirement did not constitute a legislative infringement on the judicial function because “[t]he aspect of the sentencing function involved in this section relates solely to a presentencing procedure.” (Emphasis added.) (People v. Youngbey (1980), 82 Ill. 2d 556, 560.) In the cases now before us, the statute does not relate to a presentencing procedure as in Youngbey. The statute now under consideration attempts to dictate the actual content of the judge’s pronouncement of sentence.
Article VI, section 1, of the Illinois Constitution of 1970 provides: “The judicial power is vested in a Supreme Court, an Appellate Court and Circuit Courts.” Judicial power is not defined in the Constitution, but all such power is exclusively and exhaustively granted to the courts. (People v. Cox (1980), 82 Ill. 2d 268, 274; People v. Jackson (1977), 69 Ill. 2d 252, 256.) It is, of course, indisputable that the power to impose sentence is exclusively a function of the judiciary. (People v. Phillips (1977), 66 Ill. 2d 412, 415; People v. Montana (1942), 380 Ill. 596, 608.) To construe the section of the statute under consideration as mandatory would permit a legislative infringement upon the exercise of the judicial function of imposing sentence.
Article II, section 1, of the Illinois Constitution of 1970 provides: “The legislative, executive and judicial branches are separate. No branch shall exercise powers properly belonging to another.” The General Assembly has the power to enact laws governing judicial practice only where they do not unduly infringe upon the inherent powers of the judiciary. (Strukoff v. Strukoff (1979), 76 Ill. 2d 53, 59; People v. Callopy (1934), 358 Ill. 11.) Furthermore, it is the undisputed duty of the court to protect its judicial powers from encroachment by legislative enactments, and thus preserve an independent judicial department. Agran v. Checker Taxi Co. (1952), 412 Ill. 145, 149.
A statute should be interpreted so as to avoid a construction which would raise doubts as to its validity. (Morton Grove Park District v. American National Bank & Trust Co. (1980), 78 Ill. 2d 353, 363.) It is our duty to construe acts of the legislature so as to affirm their constitutionality and validity, if it can be reasonably done, and further if their construction is doubtful, the doubt will be decided in favor of the validity of the law challenged. Continental Illinois National Bank & Trust Co. v. Illinois State Toll Highway Com. (1969), 402 Ill. 2d 385, 389; Illinois Crime Investigating Com. v. Buccieri (1967), 36 Ill. 2d 556, 561.
In the instant case, in contrast to Youngbey, it is clear that the pronouncement of sentence is at the heart of the judicial function. A construction which would hold sections 5—4—1(c) and 5—8—1(b) to constitute a mandatory requirement would clearly render the provisions an unconstitutional invasion of the inherent power of the judiciary. However, a construction which rendered the sections to be solely directory would not.
In Youngbey, in construing the import of the term “shall,” we observed:
“Generally, the use of the word ‘shall’ is regarded as indicative of a mandatory intent. [Citations.] We recognize, however, that this is not an inflexible rule; the statute may be interpreted as permissive, depending upon the context of the provision and the intent of the drafters.” (People v. Youngbey (1980), 82 Ill. 2d 556, 562.)
In the instant case, to hold that the term “shall” denominates a mandatory requirement imposed upon the judiciary at sentencing would be to find the statute to be constitutionally invalid. As we presume that the legislature intended'to enact a valid statute, we read “shall” in this context as permissive rather than mandatory. Sutherland, in his treatise on statutory construction, supports such a result. In his words:
“Constitutional principles requiring separation of powers of government weigh in favor of directory interpretations for statutes which give directions to the courts. A statute directing judicial action, although it may be expressed in preemptory terms, will be construed as permissive or directory only, where constitutional principles of separation of powers require a free and unrestrained exercise of judicial discretion.” 2A A. Sutherland, Statutory Construction sec. 57.16, at 439 (4th ed. 1973).
Here, the defendants failed to request a statement of reasons for the sentences given. The statute not being mandatory, there was no independent duty upon the court to give a statement of reasons. Instead, the right is purely personal to the defendants and thus may be waived. Accordingly, we hold that where a defendant fails to request a statement of reasons for a particular sentence, the issue is waived.
The judgments of the appellate court in these consolidated cases are affirmed.
Judgments affirmed.