A kilobyte rewritable atomic memory