1answer.
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
Varvara68 [4.7K]
2 years ago
5

Determine the number of cache sets (S), tag bits (t), set index bits (s), and block offset bits (b) for a 1024-byte 4-way set as

sociative cache using 32-bit memory addresses and 8-byte cache blocks.
Computers and Technology
1 answer:
Cerrena [4.2K]2 years ago
7 0

Answer:

The answer is The Cache Sets (S) = 32, Tag bits (t)=24, Set index bits(s) = 5 and Block offset bits (b) = 3

Explanation:

Solution

Given Data:

Physical address = 32 bit (memory address)

Cache size = 1024 bytes

Block size = 8 bytes

Now

It is a 4 way set associative mapping, so the set size becomes 4 blocks.

Thus

Number of blocks = cache size/block size

=1024/8

=128

The number of blocks = 128

=2^7

The number of sets = No of blocks/set size

=128/4

= 32

Hence the number of sets = 32

←Block ←number→

Tag → Set number→Block offset

←32 bit→

Now, =

The block offset = Log₂ (block size)

=Log₂⁸ = Log₂^2^3 =3

Then

Set number pc nothing but set index number

Set number = Log₂ (sets) = log₂³² =5

The remaining bits are tag bits.

Thus

Tag bits = Memory -Address Bits- (Block offset bits + set number bits)

= 32 - (3+5)

=32-8

=24

So,

Tag bits = 24

Therefore

The Cache Sets = 32

Tag bits =24

Set index bits = 5

Block offset bits = 3

Note: ←32 bits→

Tag 24 → Set index  5→Block offset 3

You might be interested in
You have to calculate the total amount you spent at the mall today. Which function should you use to do so?
rosijanka [135]
If it has to be exactly then C-sum
3 0
3 years ago
Read 2 more answers
Assure that major, minor, sub1 and sub2 each contain four digit numbersIf less than four digits are entered in major OR minor OR
Zigmanuir [339]

Answer:

import re

#section 1

while True:

   try:

       major=input('Enter Major: ')

       if re.search(r'^\d{1,4}$',major):

           minor=input('Enter minor: ')

       else:

           raise

       try:

           if re.search(r'^\d{1,4}$',minor):

               sub1=input('Enter sub1: ')

           else:

               raise

       

           try:

               if re.search(r'^\d{1,4}$',sub1):

                   sub2=input('Enter sub2: ')

               else:

                   raise

           

               try:

                   if re.search(r'^\d{1,4}$',sub2):

                       break

                   else:

                       raise

               except:

                   print('enter a correct sub 2')

           except:

               print('enter a correct sub1')        

       except:

           print('Enter a correct minor ')            

   except:

        print('enter a correct Major')

#section 2

sub1= f"{int(sub1):04d}"

sub2= f"{int(sub2):04d}"

major= f"{int(major):04d}"

minor= f"{int(minor):04d}"

if major == '0000' and minor == '0000' and sub1=='0000' and sub2=='0000':

   print('INVALID!!! Acount Number')

else:

   print('-----------------------')

   print('Your Account Number is')

   print(major, minor, sub1, sub2)

   print('-----------------------')

Explanation:

The programming language used is python 3

The Regular  Expression Module was imported to allow us perform special operations on string variables.

This is the pattern that was used to check if an input was valid or invalid re.search(r'^\d{1,4}$',string)

what this pattern does is that it ensures that:

  1. (\d) represents digits that is any number from 0-9.
  2. ( ^ ) ensures that it starts with a digit.
  3. ({1,4}) accepts digits with length ranging from 1-4. i.e you can enter at least one digit and at most four digits.
  4. ($) ensures that the input ends with a digit
  5. string is the text that is passed to the pattern

we also made use of fstrings

sub1= f"{int(sub1):04d}"

the above line of code takes 'sub1' in this case, and converts it temporarily to an integer and ensures it has a length of 4 by adding 0's in front of it to convert it to a four digit number.

These are the major though areas, but i'll explain the sections too.

#section 1

In this section the WHILE loop is used in conjunction with the TRY and EXCEPT block and the IF statement to ensure that the correct input is given.

The while loop will keep looping until the correct input is inserted  before it breaks and each input is tested in the try and except block using the if statement and the regular expression pattern I explained, as a result, you cannot input a letter, a blank space, a punctuation or numbers with length greater than 4, it has to be numbers within the range of 1-4.

#section 2

The second section converts each entry to a four digit number and checks with an if statement if the entry is all zeros (0000 0000 0000 0000) and prints invalid.

Otherwise, it prints the account number.

check the attachment to see how the script runs.

4 0
2 years ago
How can you add and remove categories from a previously created chart? A. Click the Format tab. B. Click the Chart Styles button
hoa [83]
<span>Click the Chart Filters button.</span>
7 0
3 years ago
Read 2 more answers
What are the features of a computer speaker​
Aliun [14]
Some computer speakers have equalization features such as bass and treble controls. Bluetooth speakers can be connected with a computer by using an Aux jack and compatible adaptor. More sophisticated computer speakers can have a subwoofer unit, to enhance bass output.
Hope that helps....it on googIe
6 0
2 years ago
Which operating system might cause the desktop background to change unexpectedly?
Hunter-Best [27]
I used computers for 3 years now and i think its B
4 0
2 years ago
Other questions:
  • Designing the moving parts of a car—including the engine, drivetrain, steering, and brakes—is done by what type of engineer?
    11·2 answers
  • When you set the position property for a block element to fixed, the element
    5·1 answer
  • For which of the following careers is technology’s connectivity factor most important?
    13·2 answers
  • The CUSTOMERS and SALES tables contain these columns:
    6·1 answer
  • You are splitting up all your apples equally between 3 people. which statement below will calculate how many apples will be left
    12·1 answer
  • Write, in your own words, a one-two paragraph summary on the Running Queries and Reports tutorials. Apply critical thinking and
    10·1 answer
  • Which tool allows users to share code and also serves as a social networking
    10·1 answer
  • Xbox one is not turning on and power brick is orange why is that?​
    6·1 answer
  • A machine that converts energy to useful work.
    9·2 answers
  • Help fast pls
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!