Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,152,768 members, 7,817,118 topics. Date: Saturday, 04 May 2024 at 06:23 AM |
Nairaland Forum / Nairaland / General / Education / GATE Study Material For Computer Science Exam Based On Address Mode Type (368 Views)
Public School In Anambra Using Ankara Material For School Uniform (Photos) / Unilorin Political Science Exam Question That Got Students Sweating / UNILAG: Worst University In Nigeria Based On Moral & Dressing? (2) (3) (4)
(1) (Reply)
GATE Study Material For Computer Science Exam Based On Address Mode Type by buyandsellscent: 1:35pm On Sep 20, 2017 |
Different types of addressing mode used for calculation of effective address have been explained in this study material for gate computer science. To explain the different type of addressing modes, we use the following notation: A = contents of an address field in the instruction that refers to a memory R = contents of an address field in the instruction that refers to a register EA = actual (effective) address of the location containing the referenced operand (X) = contents of location X (a) Immediate Addressing Mode The simplest form of addressing is immediate addressing, in which the operand is actually present in the instruction: OPERAND = A This mode can be used to define and use constants or set initial values of variables. The advantage of immediate addressing is that no memory reference other than the instruction fetch is required to obtain the operand. The disadvantage is that the size of the number is restricted to the size of the address field, which, in most instruction sets, is small compared with the world length. (b)Direct Addressing Mode Direct addressing is a simple addressing mode in which the address field of the instruction is itself the effective address of the operand. It means EA = A It requires only one memory reference and no special calculation. (c) Indirect Addressing Mode In indirect addressing mode is to have the address field of the instruction refer to the address of a word in memory, which in turn contains a full-length address of the operand. (d) Register Addressing Mode Register addressing is similar to direct addressing. The only difference is that the address field of the instruction refers to a register rather than a main memory address EA = R The advantages of register addressing are that only a small address field is needed in the instruction and no memory reference is required. The disadvantage of register addressing is that the address space is very limited. (e) Register Indirect Addressing Mode Register indirect addressing is similar to indirect addressing, except that the address field refers to a register instead of a memory location. Register indirect addressing uses one less memory reference than indirect addressing. Because, the first information is available in a register which is nothing but a memory address. From that memory location, we use to get the data or information. In general, register access is much more faster than the memory access. (f) Displacement Addressing: Displacement addressing mode is a very powerful mode of addressing combines the capabilities of direct addressing and register indirect addressing, which is broadly categorized as displacement addressing: EA = A + (R) Displacement addressing requires that the instruction have two address fields, at least one of which is explicit. The value contained in one address field (value = A) is used directly. The other address field, or an implicit reference based on opcode, refers to a register whose contents are added to A to produce the effective address. Three of the most common use of displacement addressing are: • Relative addressing • Base-register addressing • Indexing Relative Addressing For relative addressing, the implicitly referenced register is the program counter (PC). That is, the current instr uction address is added to the address field to produce the EA. Thus, the effective address is a displacement relative to the address of the instruction. Base-Register Addressing The reference register contains a memory address, and the address field contains a displacement from that address. The register reference may be explicit or implicit. In some implementation, a single segment/base register is employed and is used implicitly. In others, the programmer may choose a register to hold the base address of a segment, and the instruction must reference it explicitly. Indexing The address field references a main memory address, and the reference register contains a positive displacement from that address. In this case also the register reference is sometimes explicit and sometimes implicit. Generally index register are used for iterative tasks, it is typical that there is a need to increment or decrements the index register after each reference to it. website http://www.computersciencejunction.in/
|
(1) (Reply)
MBA In Abu Zaria / African / Please Help Me Win A Contest
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 13 |