engineering computer science MCQ #125

What is the total number of bits required for a direct mapped cache with 128 sets, 4 blocks per set, and 16 bytes per block?

engineering computer science MCQ #125

  1. Question 1

    Q1. What is the total number of bits required for a direct mapped cache with 128 sets, 4 blocks per set, and 16 bytes per block?

    • A) Should be option_a, Corrected: 128 * (16 * 8 + tag bits)
    • B) log2(128) + 2 + log2(16)
    • C) 128 * (16 * 8 + log2(128))
    • D) log2(128) + 4 + log2(16)

    Answer: 128 * (16 * 8 + log2(128))

    Explanation: Total bits = number of sets * (block size in bits + tag bits). Here, it's 128 * (16 * 8 + tag bits), where tag bits = log2(total main memory / (number of sets * block size)).