updated and added more examples for memory and registers