The present invention is directed to compounds and pharmaceutical formulations comprising these compounds which are useful as O-linked N-acetylglucosaminidase (O-GlcNAcase) inhibitors, and thus may be useful for the treatment of certain disorders such as Alzheimer's disease including reducing NFTs and/or hyperphosphorylated tau. The invention is also directed to use of the compounds as O-GlcNAcase imaging agents.