Can you get a mortgage with bad credit?

Can you get a mortgage with bad credit?