For a pipelined CPU with a single ALU, consider the following situations :
(i)The j + 1st instruction uses the result of the jth instruction as an operand.
(ii)The execution of a conditional jump instruction.
(iii)The jth and (j + 1)th instruction require the ALU at the same time.
Which of the above can cause a hazard?
-
Solution
•In the first situation, RAW (Read After Write) hazard occurs as the (j + 1)th instruction uses the result of jth instruction and operand, thus data dependency occurs here.
•In the second situation, conditional statement occurs as there is the execution of a conditional jump instruction which causes flushing.
•The third statement causes a WAR (Write After Read) hazard as both the jth and (j+ 1)th instruction require ALU at the same time.Thus, all the three statements cause hazard.
If (73)x= (54)2, then what is the value of x and y?
-
Solution
(73)8= 7× 81+ 3× 80= 56 + 3 = 59
(54)11= 5 × 111+ 4 × 110= 55 + 4 = 59
The binary string 0 10000100 00011011 000000000000000 is the 32-bit floating point representation of which of the following numbers in decimal under IEEE floating point standard?
-
Solution
\(35 = 32 + 2 + 1 = 2^{5}+ 2^{1}+ 2^{0}= (100011)_{2}\)
\(0.375 = 0.25 + 0.125 =\left ( \frac{1}{4} \right )+\left ( \frac{1}{8} \right )= 2^{–2}+ 2^{–3}= (0.011)_{2}\)
So, 35.375 = (100011.011)2
= (1.00011011)2× 25= (1.00011011)2× 2(132 – 127)
= (1.00011011)2× 2[(128 + 4) –127]
= (1.00011011)2× 2[(10000100)2]-127
= 0 10000100 00011011 000000000000000
Consider a byte addressable memory.Memory addresses are 32 bit wide. A cache set contains 2 cache lines. The size of cache is 8192 lines (128 kB). The tags in cache are ____ wide.
-
Solution
Byte offset in a line = log2(2 × 8)= 4 bits
Cache set index is log2\(\left ( \frac{8192}{2} \right )\) = 12 bits
Bits remained for tag = 32 – 12 – 4 = 16 bit
The minimum number of 2 input NAND gates required for realizing the expression f = AB + CDE is ________.
-
Solution
Hence, 5 NAND gatesare required
-
Solution
9.045
A graph G = (V, E) satisfies |E| ≤ |V| – 6. The min-degree of G is defined as \(\underset{min}{v∈V}\) {degree(v)}.Therefore, min-degree of G cannot be _______
-
Solution
Given : | E | < 3 | V | –6
From graph,number of edges = \(\frac{n \left( n - 1 \right)}{2}\)(a) V = 3, E = 3
∴ |3| ≤ 9 – 6 → True
(b) V = 4, E = 6
∴ |6| ≤ 12 – 6 → True
(c) V = 5, E = 10
∴ |10| ≤ 15 – 6 → Not True
(d) V = 6, E = 15
∴ |15| ≤ 18 – 6 → not True
So, minimum degree of G cannot be 5
The determinant of the matrix is__________
-
Solution
=-48
Newton-Raphson iteration formula for finding \(\sqrt{c}\),where c > 0 is
-
Solution
\(x=\sqrt[3]{c},x^{3}=c\)
Let F(x)=\(x^{3}-c\)
\(x_{n+1}=x_{n}-\frac{F(x_{n})}{F'(x_{n})}\)
\(F(x_{n})=x_{n}^{3}-c\)
\(x_{n+1}=x_{n}-\frac{x_{n}^{3}-c}{3x_{n}^{2}}=\frac{3x_{n}^{3}-x_{n}^{3}}{3x_{n}^{2}}=\frac{2x_{n}^{3}+c}{3x_{n}^{2}}\)
The formula used to compute an approximation for the second derivative of a function f at a point X0 is
-
Solution
\(F'(x)=\frac{f(x_{0}+h)f(h)}{h}\)