220k views
4 votes
a) what fraction of all instructions uses data memory? (2 points) b) what fraction of all instructions uses instruction memory? (1 point) c) what fraction of all instructions uses the sign extend? (2 points)

User Baz
by
8.3k points

1 Answer

4 votes

a) 44% of instructions use data memory (Load, Store, Branch). b) 56% of instructions use instruction memory (R-type, I-type, Jump). c) 24% of instructions use sign extend (I-type).

a) To find the fraction of all instructions that use data memory, you sum the fractions for Load, Store, and Branch instructions:

Fraction using data memory = Fraction Load + Fraction Store + Fraction Branch

= 24% + 15% + 5%

= 44%

Therefore, 44% of all instructions use data memory.

b) To find the fraction of all instructions that use instruction memory, you sum the fractions for R-type, I-type (non-ld), and Jump instructions:

Fraction using instruction memory = Fraction R-type + Fraction I-type (non-ld) + Fraction Jump

= 27% + 24% + 5%

= 56%

Therefore, 56% of all instructions use instruction memory.

c) To find the fraction of all instructions that use sign extend, you consider the I-type (non-ld) instructions:

Fraction using sign extend = Fraction I-type (non-ld)

= 24%

Therefore, 24% of all instructions use sign extend.

The complete question is:

Consider the following instruction mix:

R-type I-type (non-ld) Load Store Branch Jump total

27% 24% 24% 15% 5% 5% 100%

a) What fraction of all instructions uses data memory?

b) What fraction of all instructions uses instruction memory?

c) What fraction of all instructions uses the sign extend?

User Amit Horakeri
by
7.2k points