Your dog gets excited and wags his tail when you say "good boy!" and "treat!" and maybe even "Want to go for a walk?!"

But is it the words he understands or the lilt and obvious happiness he picks up in your voice?

Researchers in Hungary say that dogs understand both the meaning of the words we say, as well as the tone we use when we speak them. So even if you say, "I'm going to work!" in your most upbeat, cheery voice, there's a good chance your dog is going to see right through you and know this isn't good news.

"During speech processing, there is a well-known distribution of labor in the human brain," said lead researcher Attila Andics from Eötvös Loránd University, Budapest, in a statement. "It is mainly the left hemisphere’s job to process word meaning, and the right hemisphere’s job to process intonation."

The study, published in the journal Science, found that praise activates the reward center in the brain only when both the words and the intonation are in sync.

dogs in MRI scanner Dogs in Hungary sit around the MRI scanner used to measure their brain activity. (Photo: Enikő Kubinyi)

Researchers trained 13 dogs — mostly border collies and golden retrievers — to lie quietly in a harness in a functional MRI machine while the machine recorded the dogs' brain activity. A trainer who was familiar to the dogs spoke various words to them with either praising or neutral intonations. Sometimes she said praising words that were often heard by the dogs from their owners, such as "well done!" and "clever!" and other times she used neutral words that the dogs likely didn't understand, which the researchers believed meant nothing to the pets.

The dogs processed the familiar words using the left hemisphere of their brains, no matter how they were spoken. And tone was analyzed in the right hemisphere. But positive words spoken in a praising tone prompted the most activity in the reward center of the brain.

So "good boy!" said in a positive tone got the best response, while "good boy" in a neutral tone got the same response as a word like "however" said in either a positive or neutral way.

“It shows that for dogs, a praise can very well work as a reward, but it works best if both the words and the intonation are praising," Andics said. "So dogs not only tell apart what we say and how we say it, but they can also combine the two, for a correct interpretation of what those words really meant. Again, this is very similar to what human brains do.”

What this means for us is that humans aren't so unusual when it comes to how our brains and language work together.

“Our research sheds new light on the emergence of words during language evolution," said Andics. "What makes words uniquely human is not a special neural capacity, but our invention of using them."

Here's a video of the researchers explaining how the whole thing works:

Mary Jo DiLonardo Mary Jo writes about everything from health to parenting — and anything that helps explain why her dog does what he does.