Cache Simulation

Explanation

Each Simulation Assumes the Cache is initially Empty.

The cache definition is stated as 4 positive intergers that describes the cache

Input the cache description as well as the cache and click Simulate

The output will be a String containing the letter C, M or both.

For each memory access in the input, the page will print a 'C' if it is served by the cache, and print 'M' if it is served by the memory.

Example

Follow this layout in order for the simulator to work.

-Warning-



Output:

MMMM

CMCM

MC

Input




Simulate

Output

Index Size:
Offset Size:
Tag Size: