Do guys like to be complimented?

my boyfriend will sometimes put himself down, saying he's not smart or something, but I know that he is very smart so I'll say, sort of jokingly but I really do mean it, that he's smart and he'll kick ass on his test or homework or whatever. do guys like it if their girlfriend compliments them or would they rather she just shut up? I just want my boyfriend to feel good about himself because I think he's really smart and can do anything he wants.