The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+1 vote
42 views

Consider a processor with $150$ registers and having $76$ different types of operations. Each instruction has five distinct fields, namely, opcode, two source register identifiers, one destination register identifier, and a thirteen-bit immediate value. Each instruction must be stored in memory in a byte-aligned fashion. If a program has $200$ instructions, the amount of memory (in bytes) consumed by the program text is:

  1. $1000$
  2. $1100$
  3. $1200$
  4. $1300$
asked in CO & Architecture by Boss (17.2k points)
edited by | 42 views

1 Answer

+1 vote
Best answer
The register field needs 8 bits and opcode bit needs 7 bits.
The size needed for instruction:
$7+8+8+8+13=44 bits$
To allign it byte-wise: we need to pad extra 4 bits to make it multiple of 8. Thus the size of instruction becomes= 48 bits= 6 bytes.
Thus for 200 instructions the size needed is: $200*6=1200\: bytes$
answered by Boss (17.2k points)
selected by
Answer:

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,117 questions
53,218 answers
184,618 comments
70,454 users