Could you please have a look at the following sentences.
He thought it was my birthday. He visited me.
#1 Thinking it was my birthday, he visited me. OR
#1 Having thought it was my birthday, he visited me.
If both are correct, which one is mostly used and do they have different meaning?
Thanks a lot.