in CO and Architecture
467 views
0 votes
0 votes
Consider a CPU which supports fixed length instructions. For this CPU a compiler generates 175 instructions for a user program. All the instructions are stored in the memory in byte aligned fashion, occupying a total of 525 bytes space in memory. The minimum possible length of one instruction for the CPU is _______ bits?
in CO and Architecture
467 views

1 Answer

5 votes
5 votes

 

We have 175 instructions for the user program 
The memory is byte – addressable
the total no of bytes the instructions are occupying are 525 Bytes which means each instruction is taking 525/175=3 memory locations of 8 B each

 



The program counter points to the start of a specific memory location which has a unique instruction in it.so the internal fragmentation caused by any instruction cant be filled by other instructions

Hence to occupy 3 chunks of 8B we need to fill atleast 1 bit in the third chunk which provides the minimal size of an instruction.

Correct answer will be $17$ bits.



 

Related questions