Explore BrainMass
Share

Explore BrainMass

    Hardware Theory

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    I have been having a lot of problems with this and really have no clue as to what to do.. Please include steps as well as answer.. Thanks

    Design an expanding opcode to allow all the following to be encoded in a 36-bit instructions:

    7 instructions with three 15-bit addresses and two 3-bit register number
    500 instructions with two 15-bit addresses and one 3-bit register number
    50 instructions with no addresses or registers.

    Thanks in advance

    © BrainMass Inc. brainmass.com October 9, 2019, 3:52 pm ad1c9bdddf
    https://brainmass.com/computer-science/coding-and-information-theory/hardware-theory-15748

    Solution Preview

    For the first group of instructions, besides the opcode, you need
    <br>
    <br>3*15 + 2*3 = 45 + 6 = 51 bits
    <br>
    <br>For the second group, besides the opcode, you need
    <br>
    <br>2*15 + 3 = 30 + 3 = 33 bits
    <br>
    <br>For the second group, besides the opcode, you need
    <br>
    <br>0 bits.
    <br>
    <br>Right here, you can say that the problem is not well formed, because you cannot put 51 bits of information in a 36-bit instruction. You COULD say that some of the 15-bit addresses come from a particular register or from the stack. Since that was not specifically allowed in the problem, I am assuming that those options are not available to you.
    <br>
    <br>So, what WOULD be the minimum instruction size to allow you to use expanding opcode techniques to get this variety of instructions encoded?
    <br>
    <br>It only takes 3 bits to distinguish 7 instructions ...

    Solution Summary

    Hardware Theory is addressed.

    $2.19