In my Stack Exchange experience, I have written countless duplicates I didn't Even know about because they had a very different title to the one I used. (Poorly written titles.) How can I be sure my question isn't a duplicate before I ask it, even if the titles are very different?
Search. Sadly, Stack Exchange's search feature is not nearly as awesome at finding relevant things as Google, so I usually do a Google search for something like this:
site:stackoverflow.com interrupt vector table
site: operator makes Google only look for pages on
stackoverflow.com. (Replace that with the site you're thinking about asking on.) Try several different wordings of your question; try mentioning different symptoms or components if it's a mildly complicated thing you're dealing with. And once you do decide to post, mention what you found and what you tried.
As an additional option to Ben's answer, while Stack Exchange's search isn't as awesome, funnily enough the automatic search that happens while you type your question title is quite good.
So, when asking a question, type your title first, then look at the list that comes up. Try typing your title multiple times to get different results, and look at any questions that seem similar.
In addition, while writing your question, you'll also see similar questions load up in the sidebar. Again, this search tends to be quite good, so keep an eye on this as it changes while you type.
In the end, sometimes you'll try as hard as you can to find a duplicate, only to post your question.... and someone says there's a duplicate. As long as you've searched, this isn't a bad thing: it's simply users who are experienced with the topic knowing that there's a dupe because they've come across it before, or knowing what alternative terms to try searching for. This is a good thing, because now you've created a dupe pointer that will assist other users in the future (and this is why dupes often stick around, unlike other closed questions).