L-2.1: What Is Addressing Mode and What Are the Various Types of Addressing Modes in COA?

TL;DR
Addressing modes tell a computer how to interpret the operand bits in an instruction, whether as direct data, a memory address, a register number, or another form of reference. For example, choosing among 16 registers requires 4 bits, while addressing 1M memory words requires 20 bits. They also support variables, pointers, loops, indexing, and relocation, so read on to understand both their purpose and their major types.
Transcript
Hello friends, welcome to Gate Smashers In today's video, we are going to discuss what is an addressing mode and what are the types of addressing mode If we talk about computer organization and architecture then addressing mode is one of the most important topic because if you talk about any competitive exam or if you talk about college or univers... Read More
Key Insights
- Operand meaning requires interpretation: The bit pattern in an operand is not self-explanatory. The same field could be treated as literal data, the address of data in memory, or the number of a register holding data. Addressing mode supplies the interpretation needed before the processor can locate the value and perform the operation selected by the opcode.
- Opcode and operand play different roles: The opcode specifies what should happen, with examples including addition, subtraction, and multiplication. The operand identifies the relevant data or provides the means to locate it. An operation such as addition is incomplete without values to process, so the addressing mode connects the encoded operand field to the actual data needed by the operation.
- Direct constants are sometimes possible: When a program uses a known constant, that value can be supplied directly in the instruction. The lesson contrasts this situation with variable-based computation. Directly available constants fit naturally with immediate treatment, while values that are not known until execution require a reference to their storage rather than a fixed value embedded beforehand.
- Runtime results cannot be prewritten: In A equals B multiplied by C, A is unavailable until the multiplication has been executed. An instruction written before that execution cannot contain A's eventual value directly. It must instead identify where the computed value will be stored or retrieved, which is why variable-oriented programs require operand interpretations based on memory locations or registers.
- User input creates unknown values: A program using scanf receives data from the user while the program is running. Because that input is not known when the instruction is formed, it cannot be placed into the instruction as fixed data. The instruction must locate the current value through a memory address or register reference after the user has supplied it.
- Memory addressing costs more bits: A memory containing 1M words has 1M possible locations, so the example requires 20 bits to represent a location. When that full address occupies the operand field, it contributes substantially to instruction size. The opcode still needs its own bits, meaning direct memory identification can make the complete instruction longer.
- Register selection compresses references: If a computer has 16 registers, a register can be selected with 4 bits because the register numbers run from 0 through 15. Keeping data in a register can therefore replace the 20-bit memory address from the example with a 4-bit register number. This demonstrates how an addressing mode can reduce operand width and overall instruction size.
- Indirect access follows another address: Indirect addressing treats a referenced value as an address rather than as the final data. In the provided example, memory location 100 contains 200. The computer interprets 200 as another location, proceeds to location 200, and obtains the required data there. This extra level of interpretation provides the pointer-like behavior associated with indirect access.
- Automatic updates aid repeated execution: Auto-increment and auto-decrement modes support values that must change repeatedly during program execution. A loop progressing from 1 to 10 requires its counter to be updated after each iteration. These modes provide a mechanism for increasing or decreasing such a value while the program continues accessing data associated with the repeated operation.
- Indexing has a dedicated mode: Indexed addressing is identified as a separate way to obtain data. Its presence allows an instruction to apply indexing during access rather than treating every operand as direct data or a complete standalone address. The lesson includes it with implied, immediate, register, indirect, direct, relative, and base-register modes, showing that operand interpretation extends beyond one method.
- Relocation changes absolute targets: A process originally placed in memory locations 100 through 200 may contain a jump intended for location 170. If that process moves to locations 500 through 600, the corresponding jump target becomes 570. Addressing methods that support relocation allow references to remain meaningful when the process is loaded into a different memory range.
- Architectures provide different mode counts: Addressing modes are not identical across all computer organizations. RISC systems generally use about four to six modes, according to the lesson, whereas CISC computers may provide many modes. The available collection depends on the computer, but every included mode serves the common purpose of defining how operand values or references should be treated.
Install to Summarize YouTube Videos and Get Transcripts
Explore YouTube Video Summarizer or Get YouTube Transcript Extractor
Questions & Answers
Q: What is an addressing mode in computer architecture?
An addressing mode tells the computer how to interpret the operand bits in an instruction. Those bits may represent direct data, a memory address, a register number, or a reference that leads to another address. The mode determines how the computer reaches the value required by the opcode. This interpretation is necessary because the operand field alone does not reveal what its bits mean.
Q: Why are addressing modes needed for variables and runtime input?
Variable values are not always known when an instruction is formed. In A equals B multiplied by C, A becomes known only after the multiplication executes, while scanf supplies its value only when the user enters data at runtime. Such values cannot be embedded beforehand as fixed data in an instruction. Addressing modes solve this by letting the instruction refer to the memory location or register containing the current value.
Q: How can addressing modes reduce instruction size?
Addressing modes can replace a full memory address with a shorter register reference when data is held in a register. The lesson's 1M-word memory requires 20 bits to select one memory location. A set of 16 registers requires only 4 bits to select a register numbered from 0 through 15. Using the shorter register number reduces the operand field and therefore helps reduce the complete instruction size.
Q: How does indirect addressing work with pointers?
Indirect addressing uses one referenced value as the address of the actual data. If location 100 contains 200, the computer does not necessarily treat 200 as the final operand value. It treats 200 as another address and then accesses location 200 to retrieve the required data. This address-through-an-address process supplies the pointer-like access described in the lesson.
Q: Which types of addressing modes are introduced in L-2.1?
The lesson introduces implied, immediate, register, indirect, direct, auto-increment, auto-decrement, relative, indexed, and base-register addressing modes. Each mode gives the operand bits a particular meaning or provides a particular route to data. Together, they cover literal values, registers, memory references, repeated updates, indexing, and relocation-related access. Their detailed explanations are left for subsequent videos in the series.
Q: How do auto-increment and auto-decrement addressing help loops?
Loops often use counters that must change after repeated operations. In the example of a loop progressing from 1 to 10, the counter must increase as execution continues. Auto-increment provides a mechanism for increasing such a value, while auto-decrement supports movement in the opposite direction. These modes help combine repeated data access with the counter updates required by looping behavior.
Q: How do addressing modes support process relocation?
Relocation moves a process from one memory range to another, so its address references may need corresponding changes. A process occupying locations 100 through 200 may use a jump to location 170. If it moves to locations 500 through 600, the matching target becomes 570. Relative or related addressing methods help references remain meaningful because the target can be interpreted according to the process's changed placement.
Q: How do RISC and CISC systems differ in addressing modes?
The number of available addressing modes depends on the computer organization. The lesson says RISC systems generally have about four to six addressing modes. CISC computers may have many more modes, reflecting a larger collection of ways to interpret operands and locate data. Despite the different counts, the purpose remains to tell the computer how the operand value or address should be treated.
Summary & Key Takeaways
-
Defining the instruction fields: An instruction generally contains an opcode and an operand. The opcode identifies the operation, such as addition, subtraction, or multiplication, while the operand concerns the data on which that operation works. However, operand bits do not always contain the data itself. They may identify a memory address, a register number, or another route to the required value. An addressing mode tells the computer exactly how those operand bits must be treated.
-
Handling constants and variables: A constant value can sometimes be placed directly in an instruction because it is already known. Variables are different because their values may emerge only during execution. In the example A equals B multiplied by C, the value of A becomes known after the multiplication executes. Input collected through scanf is also unavailable until runtime. Addressing modes therefore let an instruction refer to the memory location or register where a changing value is stored.
-
Introducing the available modes: The lesson lists implied, immediate, register, indirect, direct, auto-increment, auto-decrement, relative, indexed, and base-register addressing modes. Each provides a different interpretation of an operand or a different method for reaching data. The exact collection depends on the computer organization. RISC systems generally provide about four to six addressing modes, while CISC computers may offer many more. The detailed treatment of each listed mode is reserved for later videos.
-
Reducing the instruction size: One benefit of addressing modes is that they can reduce the number of bits required in an instruction. In a memory containing 1M words, directly identifying a data location requires a 20-bit address field. That operand field appears alongside the opcode, increasing the full instruction size. If the data is instead held in one of 16 registers, only 4 bits are needed to select a register numbered from 0 through 15.
-
Supporting program behavior: Addressing modes also enable common programming mechanisms. Indirect addressing can follow an address stored at another location, which supports pointer-like access. Auto-increment and auto-decrement can update values used as counters in loops, while indexed addressing supports indexed data access. Relative and related methods help when a process is relocated. If a process moves from locations 100 to 200 into locations 500 to 600, a corresponding jump from 170 changes to 570.
Read in Other Languages (beta)
Share This Summary 📚
Summarize YouTube Videos and Get Video Transcripts with 1-Click
Try YouTube Summary with ChatGPT & Claude or YouTube Transcript Generator
Explore More Summaries from Gate Smashers 📚






Summarize YouTube Videos and Get Video Transcripts with 1-Click
Try YouTube Summary with ChatGPT & Claude or YouTube Transcript Generator