The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+5 votes
157 views

Please Explain in detail

asked in CO and Architecture by (443 points) | 157 views
+2

If you are wondering why it is getting multiplied by 32, it is because we can use the 5 address bits for instruction in 25 ways.

2 add will be 6 bit

1 add will be 11 bit 

0 add will be 16 bit.

0
Thank  you so much. Yeah I was stuck at that point only.
0
@gauravkc

Why do we need to calculate the number of free opcodes ? What do we get from that ? I saw this in another question as well.. I am sorry, this maybe a trivial question for you people, but I am really a novice in COA.

One more thing.. Since the 0-address instruction doesn't use the address field, then why do we need to multiply the number of free opcodes (obtained after 1-address instructions) by 32 ?

1 Answer

0 votes
given it is 16 bit instruction format means no of en codings will be 2^16

5 bits are reserved for address field

so  en codings for 2 2 address instructions will be 2^5*2^5*2=2048

      en codings  for 1024 1 address instructions will be 2^5*1024=2^15=32768

then en codings for 0 address instructions will be=(total en codings-(en codings for 2 address+en codings for 1 address)

ans=2^16-(2048+32768)

     =65536-34816=30720
answered by (417 points)

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
49,811 questions
54,528 answers
188,403 comments
75,479 users