Algorithm for low energy writing in nonvolatile memory | IEEE Conference Publication | IEEE Xplore