+23 votes
3.7k views

A CPU has $24$-$bit$ instructions. A program starts at address $300$ (in decimal). Which one of the following is a legal program counter (all values in decimal)?

1. $400$
2. $500$
3. $600$
4. $700$
asked
edited | 3.7k views

## 4 Answers

+25 votes
Best answer
Option $(C)$. $24$ bits = $3$ bytes instructions. So, PC will have multiples of $3$ in it.
answered by Active (3.3k points)
edited by
+2
Why would PC increment in steps of Instruction size ?

1. Shouldn't program counter increment in steps of word size ?

2. In CISC machine instructions are not of uniform length, the question does not mention uniform instruction length. so what if few instructions were of few of only two bytes ?
+7
Aren't you reading the question? It says "24 bit" instructions. And PC always increments in instruction size as it is nothing but pointer to instructions.
0
Why wont we consider it bit wise ,is memory by default byte addressable....Plz explain me
0
PC content would always be $300+(k-1)*3$ where $kth$ instruction we want to fetch. And this is divisible by 3.
+10 votes

C) is the ans

size of instruction  =  24/8 = 3 bytes.

Program Counter can shift 3 bytes at a time to jump to next instruction.

So the given options must be divisible by 3. only 600 is satisfied.

answered by Active (4.2k points)
0
Can you explain  why you divided 24 by 8?
+1
Converting bit to byte and as a instruction size is 3 bytes each,program counter will shift 3 bytes each time so address will be multiple of 3.
0 votes
After each instruction cycle the PC needs to be updated to point to the next instruction in memory.

INSTRUCTION SIZE : 24BITS or 3Bytes

Address of next instruction : 303 then 306 and so on.

So it is an AP series and only 600 comes under this series. So answer is C
answered by Junior (595 points)
0 votes

Actually the question is incomplete. It should be mentioned in the question that the

CPU is byte-addressible so that the PC will increment byte by byte. Now because the instruction is 3byte, the PC has to increment 3 times.

So the answer is 600, since it is the only option which is multiple of 3.

answered by (49 points)
Answer:

+8 votes
1 answer
1
+19 votes
3 answers
2
+25 votes
2 answers
3
+26 votes
2 answers
4
+14 votes
2 answers
5
+33 votes
2 answers
6
+16 votes
1 answer
7