Question

In: Computer Science

In a computer instruction format, the instruction length is 16 bits and the size of an...

In a computer instruction format, the instruction length is 16 bits and the size of an address field is 4 bits. Is it possible to have: 15 instructions with 3 addresses, 14 instructions with 2 addresses, 31 instructions with one address, and 16 instructions with zero addresses, using this format? Justify your answer.

Solutions

Expert Solution

The above question belongs to the computer architecture and organisation sector of computer science.

Note: Since nothing is mentioned about the addressing modes etc. So we take bare minimum while forming the instructions.

An instruction is primarily composed of two things:

1. The instruction opcode i.e the operation code for the instruction

2. The address of the operand that the instruction is supposed to work upon

The amount of Instruction Bit or length of instruction must be greater than the bits required to represent the above two quantities.

Now Let us examine the cases one by one:

1.) 15 instruction with 3 addresses

To represent uniquely 15 instructions we need at least 4 bits since 2^4 = 16 and 2^3 = 8 so in order to represent 15 opcode we must use 4 bits.

To represent 3 addresses we use 4 bit each i.e 4*3 = 12 bits

Adding the above two quantities = 12+4 =16 bits

Since the instruction length is also 16 it is a valid condition

2.) 14 instruction with 2 addresses

To represent 14 instruction we need 4 bits using the same argument as above.

To represent 2 addresses we need 4 bit each i.e 2*4 = 8 bits

Adding the two = 8+4 = 12 bits

Since 12<16 so the organisation is valid.

3.) 31 instruction using 1 address

To represent 31 instruction we need 5 bits as 2^4=16 and 2^5 = 32 so 5 bits will suffice.

To represent a single address 4 bits are enough

Adding the two we have 9 bits

9<16 the instruction is valid

4.) 16 instruction with 0 address

To represent 16 instruction we need 4 bit as 2^4 = 16

To represent 0 address we have 0 bits

Adding the two 4 bits

Since 4<16 the organisation is valid.

Note : In above question the remaining bits are filled by zeros on the LHS.

Hope the above effort helps to solve your query.

Thanks and regards!!!!!

Any suggestion or question is welcomed in the comment box.


Related Solutions

In a computer instruction format, the instruction length is 11 bits and the size of an...
In a computer instruction format, the instruction length is 11 bits and the size of an address field is 4 bits. Is it possible to have 5 two-address instructions 45 one-address instructions 32 zero-address instructions using the specified format? Justify your answer.
In a computer instruction format, the instruction length is 12 bits and the size of an...
In a computer instruction format, the instruction length is 12 bits and the size of an address field is 5 bits. The system architect has already designed three 2-address instructions and thirty one 1-address instructions. How many 0-address instructions can still be possibly accommodated?
5. On a machine, an instruction is always 16 bits long, and there are 16 registers....
5. On a machine, an instruction is always 16 bits long, and there are 16 registers. There are only two types of instruction supported: dyadic operation, which has 2 operands, and monadic operations, which has only 1 operand. If we want to make sure the machine can support 64 different monadic instructions, then how many dyadic instructions can it support at most? (10%) -------------------------------- 6. Let us assume we have such a machine. The physical RAM has 32 bytes, and...
Computer Architecture 1. Define what a "word" is in computer architecture: The size (number of bits)...
Computer Architecture 1. Define what a "word" is in computer architecture: The size (number of bits) of the address The total number of bits of an instruction (e.g. 16 bits) Word and width are synonymous. A word is the contents of a memory register. 2. What is the difference between a register’s width and a register’s address? (choose all that apply - there may be more than one correct answer) They are both the same! Address is the same for...
13. A digital computer has a memory unit with 32 bits per word. The instruction set...
13. A digital computer has a memory unit with 32 bits per word. The instruction set consists of 260 different operations. All instructions have an operation code part (opcode) and an address part (allowing for only one address). Each instruction is stored in one word of memory. a) How many bits are needed for the opcode? b) How many bits are left for the address part of the instruction? c) What is the maximum allowable size for memory? d) What...
A digital computer has a memory unit with 32 bits per word. The instruction set consists...
A digital computer has a memory unit with 32 bits per word. The instruction set consists of 122 different operations. All instructions have an operation code part (opcode) and an address part (allowing for only one address). Each instruction is stored in one word of memory. a) How many bits are needed for the opcode? b) How many bits are left for the address part of the instruction? c) What is the maximum allowable size for memory? d) What is...
Problem 3. A digital computer has a memory unit with 32 bits per word. The instruction...
Problem 3. A digital computer has a memory unit with 32 bits per word. The instruction set consists of 122 different operations. All instructions have an operation code part (opcode) and an address part (allowing for only one address). Each instruction is stored in one word of memory. a) How many bits are needed for the opcode? b) How many bits are left for the address part of the instruction? c) What is the maximum allowable size for memory? d)...
A direct mapped cache has 16 blocks and block size is 64-bits (8 bytes). a. Where...
A direct mapped cache has 16 blocks and block size is 64-bits (8 bytes). a. Where will the memory block 45 reside in cache? (5 b. Where will be the memory address 1667 mapped in cache
6.35 (Computer-Assisted Instruction) The use of computers in education is referred to as computer-assisted instruction (CAI)....
6.35 (Computer-Assisted Instruction) The use of computers in education is referred to as computer-assisted instruction (CAI). Write a program that will help an elementary school student learn multiplication. Use a SecureRandom object to produce two positive one-digit integers. The program should then prompt the user with a question, such as How much is 6 times 7? The student then inputs the answer. Next, the program checks the student’s answer. If it’s correct, display the message "Very good!" and ask another...
Encode the following instruction (1) identify the instruction format that will be used (2) indicate the...
Encode the following instruction (1) identify the instruction format that will be used (2) indicate the values of each of the fields for that format in decimal (3) convert each of these decimal val- ues to binary (4) represent the entire instruction as one hexadecimal value j L2. # where L2 is at the decimal byte address 1,048,608
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT