Direct-mapped caches are the opposite extreme from fully associative caches. In a direct-mapped cache, each memory address can only be stored in one location in the cache. As shown in Fig. 4, when a memory operation is sent to a direct-mapped cache, a subset of the bits in the address is used to select the line in the cache that may contain the address, and another subset of the bits is used to select the byte within a cache line that the address points to. In general, the n lowest-order bits in the address are used to determine the position of the address within its cache line, where n is the base-2 logarithm of the number of bytes in the line. The m next-higher-order bits, where m if the base-2 logarithm of the number of lines in the cache, are used to select the line in which the address may be stored, as shown in Fig. 5