If there are digital cams that can do that, I am unfamiliar with them...
I know the first two were shot with (probably) 35mm cams, using what's called a "macro lens", or perhaps a magnifier tube between the lens and the camera body (changes the focusing of the lens).
SLR (film) cameras boast a huge range of different lens options, plus accessories to alter the properties of those lenses.
The (consumer-grade) digi-cams I have seen are capable of nice digital "snapshots", but it ain't like you can overclock what they do. They are incredibly limited, IMO.