converting memory to int