answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Volgvan
2 years ago
10

If there are 8 opcodes and 10 registers, a. What is the minimum number of bits required to represent the OPCODE? b. What is the

minimum number of bits required to represent the Destination Register (DR)? c. What is maximum number of UNUSED bits in the instruction encoding?
Computers and Technology
1 answer:
Nimfa-mama [501]2 years ago
7 0

Answer:  

For 32 bits Instruction Format:

OPCODE   DR               SR1                   SR2      Unused bits

a) Minimum number of bits required to represent the OPCODE = 3 bits

There are 8 opcodes. Patterns required for these opcodes must be unique. For this purpose, take log base 2 of 8 and then ceil the result.

Ceil (log2 (8)) = 3

b) Minimum number of bits For Destination Register(DR) = 4 bits

There are 10 registers. For unique register values take log base 2 of 10 and then ceil the value.  4 bits are required for each register. Hence, DR, SR1 and SR2 all require 12 bits in all.  

Ceil (log2 (10)) = 4

c) Maximum number of UNUSED bits in Instruction encoding = 17 bits

Total number of bits used = bits used for registers + bits used for OPCODE  

     = 12 + 3 = 15  

Total  number of bits for instruction format = 32  

Maximum  No. of Unused bits = 32 – 15 = 17 bits  

OPCODE                DR              SR1             SR2              Unused bits

  3 bits              4 bits          4 bits           4 bits                17 bits

You might be interested in
A half-life is the amount of time it takes for a substance or entity to fall to half its original value. Caffeine has a half-lif
Ivan

Answer:

// program in C++.

#include <bits/stdc++.h>

using namespace std;

// main function

int main() {

 // variable

float n;  

cout<<"Enter the initial value:";

//Read the input from the user  

cin>>n;

//Declare variables for storing values at 6, 12 and 18 hours

float hours_6, hours_12, hours_18;  

//Set precision level of floating point number

cout << fixed;

    cout << setprecision(6);

 //calculate values at 6, 12 and 18 hours

hours_6 = n / 2.0;

hours_12 = hours_6 / 2.0;

hours_18 = hours_12 / 2.0;

//display the output

cout<<"After 6 hours: "<<hours_6<<"mg"<<endl;

cout<<"After 12 hours: "<<hours_12<<"mg"<<endl;

cout<<"After 18 hours: "<<hours_18<<" mg"<<endl;

return 0;

}

Explanation:

Read an input from the user. Set the precision to 6 for displaying the result up to 6 decimal places. The first half life at 6 hours can be calculated by dividing the input by 2. The half life at 12 hours can be found out by dividing the half life value at 6 hours by 2. Similarly at 18 hours, we find the half life value by dividing the half life value at 12 hours by 2.

Output:

Enter the initial value:100                                                                                                

After 6 hours: 50.000000 mg                                                                                                

After 12 hours: 25.000000 mg                                                                                              

After 18 hours: 12.500000 mg  

5 0
2 years ago
First, open two separate terminal connections to the same machine, so that you can easily run something in one window and the ot
dusya [7]
Dnt listen to da file shi
7 0
2 years ago
Given the dictionary, d, find the largest key in the dictionary and associate the corresponding value with the variable val_of_m
geniusboy [140]

Answer:

Here is the Python program:

d = {5:3, 4:1, 12:2}

val_of_max = d[max(d.keys())]

print(val_of_max)

Explanation:

The program works as follows:

So we have a dictionary named d which is not empty and has the following key-value pairs:

5:3

4:1

12:2

where 5 , 4 and 12 are the keys and 3, 1 and 2 are the values

As we can see that the largest key is 12. So in order to find the largest key we use max() method which returns the largest key in the dictionary and we also use keys() which returns a view object i.e. the key of dictionary. So

max(d.keys()) as a whole gives 12

Next d[max(d.keys())]  returns the corresponding value of this largest key. The corresponding value is 2 so this entire statement gives 2.

val_of_max = d[max(d.keys())] Thus this complete statement gives 2 and assigns to the val_of_max variable.

Next print(val_of_max) displays 2 on the output screen.

The screenshot of program along with its output is attached.

4 0
2 years ago
Form the recurrence relations (RRs) for the number of vertices and the number of edges of a hypercube of n dimensions, Hn. Solve
Rus_ich [418]
I'll write it below Step-by-step explanation: Q1 a side that has 10 sides and 10 angles is called decagon. Q2 it is nonagon Q3 it is Pentagon Q4it is heptagon
8 0
2 years ago
Which of the following Teacher Tips would NOT be helpful when trying to select content from the Chrome Web Store? "Can be used a
gayaneshka [121]

Answer:

I'd say all of them have somewhat of a profound amount of viability and usefulness when it comes to teachers trying to find appropriate content, but "Can be used across subject areas" is not distinct enough, and is to broad/unclear, since quite obviously if teachers are looking for content for there students they will be looking for apps that are used for teaching certain subject areas. Every app used for teaching will be used for certain subject areas, so stating that statement is a mere waste of time & space. Where as "This app is not available in the Chrome Web Store" is pretty helpful to know, because knowing if an app is available or not is really important. "Helped my struggling students really understand the concept of color harmony." may be helpful if you are trying to find an app that correlates to science as the concept of color harmony is science. And  "Doesn’t have much of a learning curve" shows that the app can be used long-term and is informative.

4 0
2 years ago
Other questions:
  • your monthly living expenses are $1500 on an income of $1,650 per month. your goal is to have an emergency fund of 4 times your
    5·1 answer
  • What was one important academic skill the blogger learned?
    9·1 answer
  • What are common names for some primary discrete components used on circuit boards?
    13·1 answer
  • Jamie is preparing a presentation on his laptop for his college annual event. He inserts audio and video files into the presenta
    11·2 answers
  • A Class B network needs to be subnetted such that it supports 100 subnets and 100 hosts/ subnet. Which of the following answers
    8·1 answer
  • C++ :Write a program that simulates flipping a coin to make decisions. The input is how many decisions are needed, and the outpu
    13·1 answer
  • Write a while loop that prints user_num divided by 2 until user_num is less than 1. The value of user_num changes inside of the
    5·1 answer
  • For example, consider a file with protection mode 644 (octal) contained in a directory with protection mode 730. How might the f
    9·1 answer
  • Which of the following is true of how computers represent numbers?
    9·2 answers
  • I have a variable and set it equal to 5. 1 then send it as an argument to a function that adds 5 to the variable passed in. Outs
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!