Instruction Set: Addressing Modes and Format

¡Supera tus tareas y exámenes ahora con Quizwiz!

● Provides a logical framework for executing instructions through a processor such as memory addressing, software and hardware interrupt handling, data type, registers and input/output (I/O) management. In layman's terms, it is extremely efficient and necessary. ● Allows software programs and instructions to run on any processor in the Intel 8086 family ● Provides procedures for utilizing and managing the hardware components of a central processing unit (CPU)

x86 Architecture (Complex Instruction Set Computer)

Without thinking of the popularity of x86 compared to ARM, which one is technically better?

x86 will always be faster in performance compared to ARM since that's what it's designed to do while the ARM dominates the market when it comes to power and compactness. Comparing the two would be like comparing apples to eggplants, even though both are edible, they have different purposes.

Key Features of ARM

● integrated security ● load/store architecture ● orthogonal instruction set ● single-cycle execution ● energy efficiency ● 64- and 32-bit execution states ● Hardware virtualization support

specifies one of the 8-, 16-, 32- bit registers contains the effective address (register indirect addressing).

Base Algorithm: LA=(SR)+B ● LA = linear address ● SR = segment register ● B = Base register

The address of the operand is in the instruction and the actual operand can be accessed in the memory. This differs with immediate in the sense that the instruction only holds the address of the operand and not the value itself.

Direct Addressing

the operand's offset is contained as a part of the instruction as an 8-, 16-, or 32- bit displacement.

Displacement Algorithm: LA= (SR)+A ● LA = linear address ● SR = segment register ● A = contents of an address field in the instruction

The actual data to be used as the operand is already included in the instruction itself.

Immediate

The offset is an unsigned integer that is stored as part of the instruction. It can be added to or subtracted from the value in the base register. If a label is used to specify the address, the assembler uses the pc as the base register and computes the appropriate offset.

Immediate

Types of Addressing Mode

Immediate Direct Addressing Indirect Addressing Register Addressing Register Indirect Addressing Displacement Addressing Stack Addressing

ARM Addressing Modes

Immediate Register Scaled Register

the operand is included in the instruction.

Immediate Algorithm: Operand=A ● A = contents of an address field in the instruction

The instruction contains the address of the location where the target address is stored. In layman's terms, it stores the indirect address of the target location in another memory location.

Indirect Addressing

A register is used as a pointer to the data. To simply put, this is the same as Indirect Addressing with a few changes. Compared to Indirect, Register indirect stores the address of the operand in the registers.

Indirect Register Addressing

Set of operation codes and operands that manage with the operation codes. Instruction format supports the design of bits in an instruction. It contains fields including opcode, operands, and addressing mode.

Instruction Format

Why are instruction sets important in computer architecture?

Instruction sets allow computers to have a workable framework of how things are supposed to run inside the computer. Without instruction sets, our computers would not know what to do and it would leave the whole device unusable.

3 ways that the values in registers are affected by addressing modes

Offset- The value in the base register is unchanged. Pre-Indexed- The offset is combined with the value in the base register, and the base register is updated with this new address before being used to access memory. Post-Indexed- The offset is combined with the value in the base register, and the base register is updated with this new address before being used to access memory.

The instruction format in which the instruction uses only one address field. In this type of instruction format, one operand is in the accumulator and the other is in the memory location. It has only one operand. It has two special instructions LOAD and STORE

One Address Instruction Format

Parts of Instruction Format

Operation Code (opcode) Operands Addressing Modes.

can be used in transfer-of- control instructions. A displacement is added to the value of the program counter, which either increases or decreases the address in the program counter.

Relative Algorithm: LA=(PC)+A ● LA = linear address ● PC = program counter ● A = contents of an address field in the instruction

the instruction includes a displacement to be added to a register (index register).

Scaled Index with Displacement Algorithm: LA= (SR)+(I)x S+A ● LA = linear address ● SR = segment register ● A = contents of an address field in the instruction ● I = index register ● S = scaling factor

A linear array of locations sometimes referred to as a pushdown list or last-in-first-out queue.

Stack Addressing

The instruction format in which the instruction uses the three address fields. It has three operands. It requires shorter assembly language instructions. It requires more bits

Three Address Instruction Format

If direct addressing mode is fast and doesn't require a lot of processing, why is it not popularly used?

While direct addressing mode is fast, it is extremely limited due to the fact that we can immediately obtain it in the memory without referencing another location. Not referencing another location may make the process slow but it at least makes it flexible. This is why other addressing modes are much more preferable compared to direct addressing.

Are there other architectures aside from x86 and ARM?

Yes, there is. Just like x86_64 and ARM Architecture, MISC, VLIW, and EPIC.are also some of the architectures that exist but for different types of computers.

They require fewer instruction sets and transistors. They are also significantly smaller in size which makes them effective for smaller and portable devices like smartphones, tablets, smart watches, music players, and other consumer electronic devices. Much simpler and processes faster which also makes them less powerful than x86.

ARM (Advanced RISC) Architecture (Reduced Instruction Set Computer)

Specify how to calculate the effective memory address of an operand by using information held in registers and/or constants contained within a machine instruction. It also provides the means & ways to access various operands in an assembly language program, and is completely architecture dependent.

Addressing Mode

Can you elaborate more on why addressing modes is important?

Addressing modes are important because they're the ones responsible for obtaining the operands that the operation codes need to work. Without addressing modes, the whole thing would not work.

Advantages and Disadvantages of ARM

Advantages ● ARM processors are affordable to create and typically don't require expensive equipment to do so. ● Due to its RISC design, which has a less complex architecture, ARM processors are simple in design and are often much more compact. ● ARM processors also operate using low power requirements and consume less power compared to other processors due to its RISC architecture design. ● ARM processors consume less battery due to its single-cycle computing set; therefore, ARM processors have a better battery life. ● ARM processors also generate less heat allowing devices like the smartphone or tablet to be thinner and be constantly held by the user, requiring highly skilled programmers. Disadvantages ● ARM is not compatible with x86 programs like Windows OS ● The speeds are limited in some processors. ● The simpler instruction set may be inadequate for heavier workloads. ● ARM has a limited calculation capacity. ● Performance depends on the ability of the programmer to execute properly and often require highly skilled programmers.

the instruction includes a displacement to be added to a base register.

Base With Displacement Algorithm: LA=(SR)+B+A ● LA = linear address ● A = contents of an address field in the instruction ● B = Base register

sums the contents of the base register, the index register, and a displacement to form the effective address.

Base with Index and Displacement Algorithm: LA=(SR)+B+(I)+A ● LA = linear address ● SR = segment register ● A = contents of an address field in the instruction ● B = Base register ● I = index register

sums the contents of the index register multiplied by a scaling factor, the contents of the base register, and the displacement.

Base with Scaled Index and Displacement Algorithm: LA=(SR)+(I) x S+ B+ A ● LA = linear address ● SR = segment register ● A = contents of an address field in the instruction ● B = Base register ● I = index register ● S = scaling factor

Do addressing modes make computers faster or does it only make the processing of data faster?

Both. Since addressing modes use multiple types, this makes it easier for operands to be obtained and with this comes faster opcodes and faster overall cycle of information in the CPU. Since data is processed faster, our computers would also simulate that same speed.

Combines the capabilities of direct addressing and register indirect addressing (EA = A + R). This type of addressing requires that the instruction must contain two address fields, at least one of them is explicit.

Displacement Addressing

Is there a possibility that ARM could surpass x86 in terms of performance?

Due to how the CPU market works, ARM surpassing x86 in terms of performance is a blur considering ARM is only really intended for smaller devices that do not require a constant power while x86 is preferable for computers that need constant power, this results in faster performance. It's really all about the functions of both architectures and which market they're trying to target.

Is it possible for computers to handle the RISC architecture?

Due to the nature of computers being much faster performance-wise and needing constant power, RISC architecture might not be the best candidate to do the job due to its limitations and just an overall slower performance.

- How do operation codes work in the instruction set?

Operation codes are in charge of accomplishing the tasks given by the users. They're important because they're the ones that are in charge of computing the data which are used to complete the tasks. They can add, subtract, multiply, etc. Basically they're the mathematicians inside your computer.

Does a processor only use one addressing mode or can it use more than one?

Processors use multiple addressing modes just based off the different types of instruction formats

The offset is an unsigned integer that is in a register other than the pc. It can be added to or subtracted from the value in the base register.

Register

Concerns the registers that reside within the processor. This means that the opcode and the specific register that is in the instruction will allow us to access the operand that is stored in the registers. The idea is basically direct addressing but the operand is instead stored in the registers, not the memory.

Register Addressing

Out of all those addressing modes, which addressing mode is the most popular and efficient?

Register Indirect Addressing Mode because it doesn't have to go through the memory to obtain the needed operand or basically, there's no memory referencing which makes it faster since it doesn't have to go through outside of the CPU's capabilities.

the operand is located in a register.

Register Operand Algorithm: LA= R ● LA = linear address ● R = register

What makes register addressing modes different from memory addressing modes?

Register addressing modes concern the registers that are in the CPU and are usually the focal point of addressing the operands while memory addressing modes concern the memory of the computer.

The offset is an unsigned integer that is in a register other than the pc. It is shifted by an immediate amount before it is added to or subtracted from the value in the base register.

Scaled Register

The instruction format in which the instruction uses only two address fields. This type of instruction format is the most commonly used instruction format. As in one address instruction format, the result is stored in the accumulator only, but in two addresses instruction format the result can be stored in different locations. This type of instruction format has two operands. It requires shorter assembly language instructions

Two Address Instruction Format

The instruction format in which there is no address field. Stacks are used. There is no operand

Zero Address Instruction Format

Types of Instruction format

Zero Address Instruction Format One Address Instruction Format Two Address Instruction Format Three Address Instruction Format


Conjuntos de estudio relacionados

Ethics-Chapter 3- Conscience and Moral Development

View Set

7 Major Schools of Thought in Psychology:

View Set

HBEH 761 (Module 2): Mediation and Moderation

View Set

Chapter 24 - Asepsis and Infection Control

View Set

Chapter 2: Confronting Scarcity: Choices in Production

View Set