The logical address space has a size of 64MB, which consists of 512 pages. The physical memory is composed of 1024 frames. How many bits are required in the logical address and the physical address?