I think it really depends on what your relationship with work and your boss is, and also on the nature of your work, whether you go and tell them sooner or later.
As far as I know, this sort of information should be treated very confidentially, but what extent, I'm not sure... I'd have thought that HR would have to treat it confidentially.
However, I once worked at a company where, if you told the HR manager about being pg, the whole senior management team would find out, she was a terrible blabbermouth.
When I fell pg last year, I didn't tell anyone at work here, apart from our Health & Safety person (I work in a lab with lots of chemicals) and one colleague, who was covering for me, doing the things I wasn't comfortable with. When I then had the mc, I still didn't tell anyone, to this day my boss doesn't know why I was off for over 4 weeks at the beginning of the year.
This time, I'm not planning on telling anyone until I have all the results from the 12-week scan, bloods, nuchal measurements etc.
But I am very lucky that I work at university, where no one really pays any attention to when you come in or leave, or what you do during the day, so I'm not too worried about people noticing, everyone is so wrapped up in their own project.
However, if I do get that new job, it might be a whole different matter... 