2.3k views

A micro instruction is to be designed to specify:

1. none or one of the three micro operations of one kind and
2. none or upto six micro operations of another kind

The minimum number of bits in the micro-instruction is:

1. $9$
2. $5$
3. $8$
4. None of the above
edited | 2.3k views

Actually the given question incorporates the concept of horizontal μprogramming (also known as decoded form of control signals) and vertical μprogramming (also known as encoded form of control signals)

The $(a)$ part says :

none or one of the three micro operations of one kind

This is referred to encoding form of vertical one since at most one signal can be active in vertical microprogramming since it involves use of external decoder to select one control signal out of the given control signals..

No of bits required for vertical  microprogramming given n number of control signals $=\lceil ( \log_{2} n )\rceil$

Here, $n = 3$

So, no of bits required for part $(a)$ $=\lceil( \log_{2} 3)\rceil= 2$

Now coming to $(b)$ part , it says :

none or upto six micro operations of another kind

at maximum we can have at most $6$ microoperations of another kind at a time. To accommodate that we need decoded form of control signals which is horizontal signals.

So, no of bits required for $(b)$ part

$=$ No of control signals of $(b)$ kind $= 6$

Therefore overall bits required to accommodate both $(a)$ and $(b),$
$= 2 + 6=8-bits$

Besides this, address field, flags etc are also there in a control word. That is why it is asked in the question :

minimum number of bits in the micro-instruction required

Hence, minimum no of bits required  $= 8-bits$

edited
+2
thank u @Habib
0
I have one silly doubt. Why can't we reuse those 6 bits used for horizontal micro-prog for vertical micro-prog too? We can simply add one more bit to identify the kind of control signal and put rest unused bits to don't care (if any). Then we would require only 7 bits.

What is wrong with my approach?
+2
@Tuhin Dutta , bcoz it is quite possible that both horizontal and vertical classes of control signals can be activated at the same time..

Thus to avoid ambiguity , they needed to be given bits separately i.e. for horizontal class of control signals as well as for vertical one..
0

Habibkhan,  here you are considering one control signal is capable of generating one micro-operation entirely. But in horizontal microprogramming, is it not necessary that in the control signals multiple bits have to be set to denote one micro-operation ? Or does one control signal always generate one micro-op?

0

In case of horizontal micro programming, number of bits for control signals field of a control word depends on how many control inputs it has, like if we have two control inputs like load and increment then we will give 2 bits in control signals field in case of horizontal micro programming

here in this question, it is hybrid micro programming(combination of Horizontal and vertical micro programming)

In which case, the first condition is about 3 signals can be needed one after the other, so we need 2 bits

In the second case is about 6 signals at the same time(needs parallelism), we need 6 bits. and hence 6 +2 =8 bits

In question it is given that there are two kinds of instruction, let me classify them in two groups G1, G2. In G1 there are 3 microinstructions and in other group G2 there are 6 microinstructions.

in G1: None or one microinstruction is active at a time,  we can implement Vertical programming here as atmost one signal active at a time.

in G2: none or more than one (upto 6) microinstructions active at a time ,  we need Horigontal programming as upto 6 are needed.

Therefore toal bits = 2+6 = 8.

(Note that, if we implement Horizontal in G1 also then G1 itself would need 3 bits, and total bits will be 9 (That is option A). But they ask for minimum, therefore we should implement Vertical programming whenever chances.)

Option C is right choice.

0
Nice explanation thanks, Sachin Mittal!!

The first condition (None or any one out of 3 operations) gives 4 variations to consider. This uses 2 bits.
The second condition (Any combination of 6 other operations) gives 64 variations to consider. This uses 6 bits.
In total 8 bits.
0
can u pls exlain a bit more why in the second case 6 bits are [email protected] sarkar

1
2