Computational logic with square rings of nanomagnets. (3rd May 2018)