You might have heard that dogs don't really care what you say to them as long as you sound excited. But they deserve more credit than that.

Dogs know the difference between real words and neutral or nonsense words, and you need to say the right things while praising them if you really want them to feel rewarded.

That's one finding from scientists in Hungary who are taking a peek inside the minds of our furry friends.

>> Read more trending stories

Over the past few years, scientists around the world have started studying brain scans of dogs, watching which parts of the brain light up when the dog sees certain images or hears certain sounds.

The research is all due to the fact that, with enough treats, you can train a dog to do just about anything — including wear medical headgear while lying perfectly still in a loud, cramped machine.

The studies so far have shown how in tune with us dogs really are. For instance, one study found dogs' brains have a special way to process human faces, just like humans do.

They understand language a lot like we do, too. In the new study, the dogs processed words and intonation in different parts of the brain and combined the two to get meaning. That's pretty much how humans do it.

It makes sense, though, given that dogs have been hanging out with humans for tens of thousands of years. Along the way, they've learned all about keeping their humans happy.