MCS012 Explain the immediate addressing and indirect addressing

 IGNOU BCA second semester subject MCS12 IMPORTANT Questions with answers





Question: Explain the immediate addressing and indirect addressing with the help of one example of each.


Answer πŸ‘‡


Immediate addressing:

Immediate addressing is a method of addressing in computer programming where the actual value is directly provided as part of the instruction itself. In this mode, the operand is specified within the instruction, and the CPU directly uses that value for the operation. This means that the data is not fetched from memory or another register.


Example:

Let's say we have a simple assembly instruction that adds the value 10 to a register called "A". The instruction might look like this:


ADD A, 10


In this example, the number 10 is provided directly in the instruction itself. When the CPU encounters this instruction, it immediately adds the value 10 to the contents of register A without fetching the data from memory.


Indirect Addressing:

Indirect addressing is a method of addressing in computer programming where the operand specifies the memory address where the actual data is stored. Instead of directly providing the data, the instruction contains the memory address where the data resides. The CPU fetches the value from the specified memory address and uses it for the operation.


Example:

Consider a scenario where we have a register called "B" that contains the memory address of a variable, and we want to add the value stored at that memory address to another register called "A".


ADD A, [B]


In this example, the value in register B is the memory address where the actual data is stored. The CPU fetches the value from the memory location specified by the contents of register B and adds it to the contents of register A.


To summarize, immediate addressing involves directly providing the value in the instruction itself, while indirect addressing involves providing the memory address where the data is stored, and the CPU fetches the data from that memory location.


MCS012 more important Questions with answers πŸ‘‡πŸ‘‡πŸ‘‡πŸ‘‡

Explain the disk layout of magnetic disk.Also, explain the physical characteristics of magnetic disk.


Define the following terms:1.Scan code in the context of a keyboard, 2.Impact printer








πŸ‘‰ join telegram group


πŸ‘‰πŸ‘‰ Subscribe YouTube channel







Comments

Popular posts from this blog

BCS-011 ,Block 1,Important Questions with answers with Block wise.

BCA MCS-011 BLOCK 1 Important Questions with answers

Write short note on Dual Aspect Concept

ECO02 IGNOU BCA second semester some important topics short notes

Write short note on Petty cash Book.

Write short note on Promissory Note.

MCS12 What is Scan code in the context of a keyboard 2. Impact printer.

IGNOU MCS012 What is the layout of magnetic disk and physical characteristics of magnetic disk

Write any five differences between consignment and joint venture.