Computer Architecture(2)

김동규·2023년 9월 26일
0

Computer Architecture

목록 보기
2/15

In the computer architecture, there is a concept of Addressing mode. This is a different ways to specify the place where an operand resides in memory or register. It means that operand(data) can exist in memory or register. It can give some versatility to the user.

Effective Address

This is a definition of the place that actual address of the location containing the referenced operand.

There are many types of addressing mode however, we just use some of that.

Implied addressing mode

This mode doesn't give any information. It consider there must be data(operand).

Immediate addressing mode

In the Instruction, it contains operand field and it contains the actual operand value. It means that this instruction doesn't access memory. So, it will be fast but, it has a problem that instruction has just 32-bits so, it will limit available numbers.

Register Addressing mode

This addressing mode has register's address. If this instruction execute, it just uses their value. In other words, this instruction doesn't access memory.

Register Indirect Addressing mode

This addressing mode has register's address and this register has real address of data in memory. So, it will access memory once.

Direct Addressing mode

Insturction has the address part and in this part, there is effective address in memory. It means there is a memory access at once.

Indirect Addressing mode

There is a address field and it gives the address where the effective address is stored. It means that there is memory access at twice. If memory access occured, this insturction takes more times.

PC Relative Address mode

PC is Program Counter. It saved the address or next instruction. This insturction mode can modify the value of PC. By doing that, we can use the concept of Jump. If the next instruction's address is changed, we can express while, for, if expression in high-level language.

Base Register Addressing mode

It is similar with PC Relative address mode. It use base register and offset. The effective address value is sum of base register and offset in the address field of instruction.

Completeness

This concept is important in computer architecture. If we choose some computer, we expect this computer do everything that other computers can.
There are three categories that should be covered.

  1. Arithmetic / Logical Expression
  2. Data Transfer (including I/O)
  3. Control Transfer

The structure of computer must covered these categories.

Orthogonality

The computer instruction are orthogonal if they don't overlap, or perform same function. In other words, we must covered all instructions but, in this way, we don't overlap.

Arithmetic / Logic Instruction (Data Operations)


The computer must covered all of them. However, it will be better as simple as possible. So, we can express many instructions to using few instructions. For example, Subtract instruction can be expressed in Add instruction and 2's complement. In this way, we can use more Opcode. Also, it related to CISC and RISC.

CISC vs RISC

CISC Complex Instruction Set Computer

In the first computer architecture, more people considered that it is better computer that it can have more instruction and functions. However, if a computer has more complexity rather than other computer, it will be more complexity structure, finally, it will increase total time to calculate.

RISC Reduced Instruction Set Computer

Over time, people think the time complexity is more important so, they tried to reduce computer's function by replacing other functions.

Data Transfer Instruction


It is related to the transfer of data. Always data are located in memory. If we want to use them, we must access to memory and get to use. So, data trasfer is important point of the computer.

Control Transfer Instruction


We always use high-level programming language. In our high-level language, we usally use for, while, if statement. These have specific case to move other instruction, and there are many cases. So, we should use jump concept. This concept is related to control transfer instruction. For that reason, it is important to computer architecture.

profile
안녕하세요 :)

0개의 댓글