Probabilistic Design For Emerging Memory And Nanometer-Scale Logic