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

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 (15.3k points)
edited by | 41 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 (15.3k points)
selected by

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
47,929 questions
52,326 answers
67,797 users