You would need to select a theme
Answer:
here is code in C++.
#include <bits/stdc++.h>
using namespace std;
int main()
{
// variables to store number of each video
int new_video,old_video;
double total_charge;
cout<<"Please enter number of new video:";
// read number of new video
cin>>new_video;
cout<<"Please enter number of old video:";
// read number of old video
cin>>old_video;
// total change
total_charge=(3.0*new_video)+(2.0*old_video);
cout<<"total cost is: "<<total_charge<<endl;
return 0;
}
Explanation:
Declare two variables "new_video" and "old_video" to store the number of each type of video.Read the value of both from user.Then calculate total charge by multiply 3.0 to number of new video & 2.0 to number of old video and add both of them. This will be the total charge.
Output:
Please enter number of new video:4
Please enter number of old video:6
total cost is: 24
Answer:
2
Explanation:
The system only uses 2 numbers which are 0 and 1 instead of the usual 10 numbers; 0, 1, 2, 3, 4, 5, 6, 7, 8 & 9.
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.