Do kids know when you're pregnant ?

My son is 2 1/2 and hes been saying there's a baby in my tummy for a couple weeks now and my last period wasn't regular but me and the guy used a condom.