Nerds are fucking funny. Your nerd spent a lot of his younger life being an outcast because of his strange affinity with the computer. This created a basic bitterness in his psyche that is the foundation for his humor. Now, combine this basic distrust of everything with your nerd’s other natural talents and you’ll realize that he sees humor is another game.
Humor is an intellectual puzzle, “How can this particular set of esoteric trivia be constructed to maximize hilarity as quickly as possible?” Your nerd listens hard to recognize humor potential and when he hears it, he furiously scours his mind to find relevant content from his experience so he can get the funny out as quickly as possible.
This quick wit is only augmented by the fact that…
Your nerd has an amazing appetite for information. Many years ago, I dubbed this behavior NADD, and you should read the article to learn more and to understand what mental muscles your nerd has developed.