Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
589 views
in Technique[技术] by (71.8m points)

cpu architecture - Computer system architecure exam question help me

Assume that a computer architect has already designed 6 two address and 30 zero address instructions using the instruction length of 11 bits and size of the address field of 4 bits. The maximum number of one address instruction that can be added to the instruction set is:


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

With an address field of 4 bits, a 2-address opcode has 8 bits of address; thus 3 bits (11 - 2*4) to specify the opcode. Note that because the 8 address bits can have any value, one of these 3 bit opcodes must be reserved for specifying 0 or 1 address opcodes. 6 were already defined, so 2^3 - (6 + 1) is the number of available 2-address opcodes.

That leaves 8 bits to encode the zero and one address opcodes. 1 bit can be used to discriminate; leaving 7 bits for zero address opcodes, and 7-4 bits for one address opcodes.

So, the total available opcode space is (2^3 - (6 + 1)) + (2^7 - 30) + (2^(7-4)).

That should be more than enough clarity for you to work out the answer.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...