Direct-mapping cache I had this question on a previous homework assignment and was unable to answer it. I've done some research and am not really able to find anything that clears this up for me. Would appreciate any help or explanation.

Q2. Consider a direct-mapping cache of 128 lines and a main memory block size of 8 bytes. What cache line number does byte address 120010 map to?
The address generated by the CPU is divided into 3 parts for the identification of its position in the cache. These three field as you mus be knowing are : BYte Offset , Index and TAG . The index bits determine the line number in the cache.
You need to find the number of bits present in the index field.