edited by
9,751 views
31 votes
31 votes

An instruction set of a processor has $125$ signals which can be divided into $5$ groups of mutually exclusive signals as follows:

Group $1$ $:$ $20$ signals, Group $2$ $:$ $70$ signals, Group $3$ $:$ $2$ signals, Group $4$ $:$ $10$ signals, Group $5$ $:$ $23$ signals.

How many bits of the control words can be saved by using vertical microprogramming over horizontal microprogramming?

  1. $0$
  2. $103$
  3. $22$
  4. $55$
edited by

2 Answers

Best answer
49 votes
49 votes

In horizontal microprogramming we need $1$ bit for every control word, therefore total bits in

Horizontal Microprogramming $=20+70+2+10+23=125$

Now lets consider vertical microprogramming, In vertical microprogramming we use Decoder $\text{(n to$\ 2^n$)}$ and output lines are equal to number of control words. A input is given according to what control word we have to select.

Now in this question these $5$ groups contains mutually exclusive signals, i.e, they can be activated one at a time for a given group, we can safely use decoder.

$\text{group }1=\lceil \log_{2} 20\rceil=5$ (Number of input bits for decoder, given output
is number of control word in given group)

$\text{group }2=\lceil \log_{2} 70\rceil=7$

$\text{group }3=\lceil \log_{2} 2\rceil=1$

$\text{group }4=\lceil \log_{2} 10\rceil=4$

$\text{group }5=\lceil \log_{2} 23\rceil=5$

Total bits required in vertical microprogramming $= 5+7+1+4+5=22$

So number of control words saved $=125-22=103$

Hence, (B) is answer.

edited by
0 votes
0 votes
  1. Bits needed for horizontal microprogramming:

    • Each signal needs a dedicated bit, so 125 signals require 125 bits.
  2. Bits needed for vertical microprogramming:

    • Only one bit is needed to select a group, and then a separate field within the control word specifies the signal within that group.
    • 5 bits to select a group (log2(5) = 2.32, but we need at least 3 bits to represent 5 groups)
    • 20 bits for Group 1 (log2(20) = 4.32, so 5 bits)
    • 7 bits for Group 2 (log2(70) = 6.13, so 7 bits)
    • 1 bit for Group 3 (log2(2) = 1)
    • 4 bits for Group 4 (log2(10) = 3.32, so 4 bits)
    • 5 bits for Group 5 (log2(23) = 4.52, so 5 bits)
    • Total bits: 5 + 5 + 7 + 1 + 4 + 5 = 27 bits
  3. Bits saved:

    • 125 bits (horizontal) - 27 bits (vertical) = 103 bits

Therefore, using vertical microprogramming saves 103 bits of control words compared to horizontal microprogramming in this case.

Answer:

Related questions

6.4k
views
1 answers
25 votes
Ishrat Jahan asked Nov 3, 2014
6,401 views
A hardwired CPU uses $10$ control signals $S_1$ to $S_{10}$, in various time steps $T_1$ to $T_5$, to implement $4$ instructions $I_1$ to $I_4$ ...
8.8k
views
1 answers
32 votes
Ishrat Jahan asked Nov 2, 2014
8,808 views
A CPU has only three instructions $I1, I2$ and $I3,$ which use the following signals in time steps $T1-T5$:$I1 : T1$ : Ain, Bout, Cin $T2$ : PCout, Bin $T3$ ... T2 ).I1 + (T2 + T4).I3 + T3$(T1 + T2 ).I2 + (T1 + T3).I1 + T3$
9.4k
views
5 answers
22 votes
Ishrat Jahan asked Nov 3, 2014
9,403 views
Consider a $2$-way set associative cache memory with $4$ sets and total $8$ cache blocks $(0-7)$ and a main memory with $128$ blocks $(0-127)$. What memory blocks will be present in the ... 0$ $5$ $7$ $9$ $16$ $55$3$ $5$ $7$ $9$ $16$ $55$
8.8k
views
3 answers
21 votes
Ishrat Jahan asked Nov 3, 2014
8,759 views
We have two designs $D1$ and $D2$ for a synchronous pipeline processor. $D1$ has $5$ pipeline stages with execution times of $3$ nsec, $2$ nsec, $4$ ... $D1$ for executing $100$ instructions?$214$ nsec$202$ nsec$86$ nsec$-200$ nsec