There are differences between them. “明白” is more perceptual, conceptual, emotional... Well my English is not enough to explain that. For example, you may say "我懂中文" but you can't say "我明白中文", for Chinese is some kind of knowledge. So "懂" has more meanings than "明白". But mostly you can replace "明白" with "懂".