[컴구 완전정복] 4. Instruction Format & Addressing

은서·2025년 12월 31일

CS 완전정복

목록 보기
4/5

📘 강의자료 4 요약

Instruction Format & Addressing

이 강의는 instruction이 어떤 구성 요소로 이루어져 있는지와
각 field가 어떤 정보를 표현하는지를 다룬다.
명령어를 형식(format) 단위로 구분해 이해하는 것이 목적이다.

1. Instruction Format의 기본 개념

Instruction은 binary 형태로 표현되며,
CPU가 명령어를 해석하기 위해 필요한 정보들을 포함한다.

instruction은 다음 요소들로 구성된다.

  • Opcode: 수행할 operation 지정

  • Register field: source / destination register 지정

  • Immediate field: 상수 값 또는 offset 표현

  • Function field (funct): 세부 연산 구분

Instruction format은
이 field들이 어떻게 배치되는지를 정의한다.

2. Instruction Format Types

instruction 형식

R-type

  • register-to-register operation

  • arithmetic / logical instruction에 사용

  • 모든 operand가 register

I-type

  • immediate value 또는 memory access 포함

  • load, branch instruction에 사용

  • immediate field 포함

J-type

  • jump instruction에 사용

  • 상대적으로 큰 address 범위를 표현

각 format은 instruction의 목적에 맞게 field 구성이 다르다.

3. Addressing

Instruction은 operand의 위치를 지정하기 위해
addressing 방식을 사용한다.

강의자료에서 주로 다루는 addressing 방식은 다음과 같다.

  • Register addressing

  • Immediate addressing

  • Base + offset addressing

Addressing 방식에 따라 operand 접근 방식과 instruction 표현이 달라진다.

정리

강의자료 4에서는 다음을 다룬다.

  • Instruction은 여러 field로 구성된 binary format을 가진다

  • Instruction format은 field 배치 방식에 따라 구분된다

  • R-type, I-type, J-type은 대표적인 instruction format이다

  • Addressing은 operand를 지정하는 방법이다

profile
개발자 대학생🌱

0개의 댓글