Given the following word addresses: 3, 180, 43, 2,191, 88, 190, 14, 181, 44, 186, 253
professor190 [17]
Answer:
A. index bits = 2, tag bits = 2, block offset bits = 1, it is a miss.
B. index bits = 2, tag bits = 1, block offset bits = 0, it is a hit
C. the miss rate is 0
Explanation:
a. number of blocks = 12
number of blocks per set = 3
number of set = number of blocks / number of blocks per set = 12/3 = 4
word size = 24
block size = 2
the block offset =
block size
=
2 = 1
the index bits =
number of set =
4 = 2
the tag bits = (
word size) - offset - index = (
24) -2 - 1 = 5 -2 - 1 = 2
b. word size = 8
block size = 1
the block offset =
block size
=
1 = 0
the index bits =
number of set =
4 = 2
the tag bits = (
word size) - offset - index = (
8) -2 - 1 = 3 - 0- 2= 1
Answer:
Time plot.
Explanation:
A time plot, also known as a time series can be defined as a graphical representation of a pre-defined value (data) against time.
If we recorded the average U.S. Housing Price every month for the next year, the graphical display which is most appropriate to display the data is a time plot.
Generally, when representing data that changes with respect to time or that are random in nature; a time plot is considered to be the most effective graphical display to use.
In this scenario, the average U.S. Housing Price that is observed should be plotted against the time of occurrence (months) over a year.
Answer:
The C code is below.
Explanation:
#define amplitude 1
02 #define b 1
03 #define c 200
04 class Sinewave
05 {
06 protected:
07
08 double freq;
09 int y;
10
11 public:
12 Sinewave()
13 {
14
15 }
16 void generateSinewave()
17 {
18 COLORREF yellow = RGB(255,255,0);
19 COLORREF lightblue = RGB(173,216,230);
20
21 // make sure the names match
22 SetConsoleTitle(L"ConGraphics");
23 HWND hWnd = FindWindow(NULL, L"ConGraphics");
24 HDC hDC = GetDC(hWnd);
25
26 //for(int x = 0; x < freq; x++)
27 for(int x = 0;; x++)
28 {
29 // center at y = 200 pixels
30
31 y = amplitude*(int)(sin(x/100.0)*100 + 150);
32 SetPixel(hDC, x, y, lightblue);
33
34
35 }
36
37 }
38 };