All Exams Test series for 1 year @ ₹349 only
Question

A micro-instruction format has micro-ops field which is divided into three subfields F1, F2, F3 each having seven distinct micro-operations, condition field CD for four status bits, branch field BR having four options used in conjunction with address field ADF. The address space is of 128 memory locations. The size of micro-instruction is :  

The correct answer is

20 bits

Understanding Micro-instruction Format Size

Let's break down the structure of the micro-instruction described in the question and calculate its total size in bits. The size of a micro-instruction is determined by the total number of bits required for all its fields.

Analyzing the Micro-instruction Fields

The micro-instruction format consists of the following fields:

  • Micro-ops field (divided into F1, F2, F3)
  • Condition field (CD)
  • Branch field (BR)
  • Address field (ADF)

Calculating Bits for Each Field

We need to determine the number of bits required for each field based on the number of distinct options or addresses it needs to represent.

1. Micro-ops Field (F1, F2, F3):

  • Each subfield (F1, F2, F3) has seven distinct micro-operations.
  • To represent 7 distinct operations, we need enough bits such that $2^{\text{number of bits}} \ge 7$.
  • The smallest integer number of bits that satisfies this is $\lceil \log_2 7 \rceil$. Since $2^2 = 4$ and $2^3 = 8$, we need 3 bits to represent 7 distinct options.
  • So, F1 requires 3 bits, F2 requires 3 bits, and F3 requires 3 bits.
  • Total bits for the Micro-ops field = Bits for F1 + Bits for F2 + Bits for F3 = $3 + 3 + 3 = 9$ bits.

2. Condition Field (CD):

  • The CD field is for four status bits. This means it can represent 4 distinct conditions or states.
  • To represent 4 distinct conditions, we need enough bits such that $2^{\text{number of bits}} \ge 4$.
  • The smallest integer number of bits is $\lceil \log_2 4 \rceil = 2$ bits.
  • So, the CD field requires 2 bits.

3. Branch Field (BR):

  • The BR field has four options.
  • To represent 4 distinct options, we need enough bits such that $2^{\text{number of bits}} \ge 4$.
  • The smallest integer number of bits is $\lceil \log_2 4 \rceil = 2$ bits.
  • So, the BR field requires 2 bits.

4. Address Field (ADF):

  • The address space is of 128 memory locations.
  • The ADF field is used in conjunction with the branch field to specify the next micro-instruction address.
  • To address 128 distinct memory locations, we need enough bits such that $2^{\text{number of bits}} \ge 128$.
  • The smallest integer number of bits is $\lceil \log_2 128 \rceil = 7$ bits, since $2^7 = 128$.
  • So, the ADF field requires 7 bits.

Calculating Total Micro-instruction Size

The total size of the micro-instruction is the sum of the bits required for all its fields:

Total Size = Micro-ops (F1+F2+F3) + CD + BR + ADF

Total Size = $9 \text{ bits} + 2 \text{ bits} + 2 \text{ bits} + 7 \text{ bits}

Total Size = $20 \text{ bits}$

Field Description / Options Bits Required
F1 7 distinct micro-operations 3
F2 7 distinct micro-operations 3
F3 7 distinct micro-operations 3
CD 4 status bits / conditions 2
BR 4 branch options 2
ADF 128 memory locations 7
Total Micro-instruction Size $3+3+3+2+2+7 = 20$ bits

Therefore, the size of the micro-instruction is 20 bits.

Revision Table: Key Concepts in Micro-instruction Design

Concept Explanation Relevance
Micro-instruction A low-level instruction that controls the functional units of a processor at the most basic level. The fundamental unit whose size we calculated.
Control Memory A special memory that stores the sequence of micro-instructions (the microprogram). The 128 memory locations mentioned in the address space refer to this memory.
Fields Divisions within a micro-instruction, each controlling a specific function (like operation, condition, branching, next address). Breaking down the micro-instruction into fields (F1, F2, F3, CD, BR, ADF) is essential for size calculation.
Field Encoding How the different options or values within a field are represented in binary (e.g., using binary encoding based on $\log_2$). Used to determine the bits needed for F1, F2, F3, CD, BR, and ADF.
Horizontal vs. Vertical Microprogramming Horizontal micro-instructions are wider, allowing more parallel operations. Vertical are narrower, using opcode-like encoding. The described format with separate fields for multiple operations (F1, F2, F3) leans towards horizontal or partially horizontal microprogramming.

Additional Information: Microprogramming and Control Unit Design

Microprogramming is a technique used in the design of control units for processors. Instead of hardwiring the control logic, the control signals are generated by executing a sequence of micro-instructions stored in a special memory called control memory.

The structure of a micro-instruction significantly impacts the complexity and speed of the control unit. Different field structures allow for different types of control operations:

  • Functional Control Fields: Like F1, F2, F3 in this example, they directly control specific data path operations (like ALU operations, register transfers). Having multiple such fields allows for parallel execution of micro-operations (horizontal microprogramming).
  • Condition Fields: The CD field selects which status bit (e.g., Zero flag, Carry flag) is to be tested. This test result is often used to make a branching decision in the microprogram.
  • Branch Fields: The BR field specifies the type of branching to be performed, such as conditional branch, unconditional jump, or call subroutine.
  • Address Fields: The ADF field provides the address of the next micro-instruction to be fetched from control memory, especially important for jump or call instructions. In conditional branches, this address might be used or ignored based on the condition test result.

The size of the address field is determined by the total number of micro-instructions stored in the control memory, which defines the address space.

Was this answer helpful?

Important Questions from Machine Instructions and Addressing Modes

  1. Arrange the following types of machine in descending order of complexity.

    (A) SISD

    (B) MIMD

    (C) SIMD

    Choose the correct answer from the options given below:

  2. Consider the following program fragment in assembly language:

    mov ax, 0h

    mov cx, 0A h

    doloop:

    dec ax

    loop doloop

    What is the value of ax and cx registers after the completion of the doloop?

  3. Consider the following assembly program fragment:

    stc

    mov al, 11010110b

    mov cl, 2

    rcl al, 3

    rol al, 4

    shr al, cl

    mul cl

    The contents of the destination register ax (in hexadecimal) and the status of Carry Flag (CF) after the execution of above instructions, are:

  4. This instruction is of what type?

    ADD R1, A, B

  5. The following language uses mnemonic OP codes

Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App