Answer:
1. 2588672 bits
2. 4308992 bits
3. The larger the data size of the cache, the larger the area of memory you will need to "search" making the access time and performance slower than the a cache with a smaller data size.
Explanation:
1. Number of bits in the first cache
Using the formula: (2^index bits) * (valid bits + tag bits + (data bits * 2^offset bits))
total bits = 2^15 (1+14+(32*2^1)) = 2588672 bits
2. Number of bits in the Cache with 16 word blocks
Using the formula: (2^index bits) * (valid bits + tag bits + (data bits * 2^offset bits))
total bits = 2^13(1 +13+(32*2^4)) = 4308992 bits
3. Caches are used to help achieve good performance with slow main memories. However, due to architectural limitations of cache, larger data size of cache are not as effective than the smaller data size. A larger cache will have a lower miss rate and a higher delay. The larger the data size of the cache, the larger the area of memory you will need to "search" making the access time and performance slower than the a cache with a smaller data size.
I guess the answer in the blank is Column Heading.
A column letter above the grid, also called the column heading, identifies each column.
Answer:
Java code is given below
Explanation:
import java.util.Random;
class Die{
private int sides;
public Die(){
sides = 6;
}
public Die(int s){
sides = s;
}
public int Roll(){
Random r = new Random();
return r.nextInt(6)+1;
}
}
class DieRoll{
public static void main(String[] args) {
Die die = new Die();
int arr[] = new int[6];
for(int i=0; i<6; i++)
arr[i] = 0;
for(int i=0; i<100; i++){
int r = die.Roll();
arr[r-1]++;
}
for(int i=0; i<6; i++)
System.out.println((i+1)+" was rolled "+arr[i]+" times.");
}
}