The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
90 views
Consider a hypothetical CPU which supports 2 address, 1 address and 0 address instructions. A 16 bit instruction is placed in 128 word memory. If there exists 2 two address instructions and 100 one address instructions, then how many 0 address instructions can be designed?
in CO and Architecture by (35 points) | 90 views

1 Answer

+2 votes

Instruction size = 16 bits

Address size = 128 word =7 bits

Total Two address instruction = 16 - (7 + 7) bits = 2 bits = 4

But we use only 2 two address instruction.

Remaining 2 can be used for 1 address instruction and also 7 bits by reducing an address field.

Total 1 address instruction = 2 * 2$^{7}$ = 256

But we use 100 one address instruction.

Remaining 156 along with 7 bits by reducing an address field can be used for zero address instruction.

So Total zero address instruction = 156 * 2$^{7}$ = 19968

by Junior (961 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
50,093 questions
55,332 answers
190,852 comments
86,256 users