일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- grid
- 상태
- 에라토스테네스의 체
- 통신사할인
- align-items
- 강화학습
- Prefix Sums
- c
- CSS
- 확률
- 수학
- 포토샵
- 소수
- stl
- skt membership
- SK바이오사이언스
- margin
- spring
- Gap
- Design Pattern
- 백준
- dataframe
- Javascript
- pandas
- 알고리즘
- Flexbox
- series
- Photoshop
- Codility
- c++
Archives
- Today
- Total
sliver__
2.2 Operations of the Computer Hardware 본문
728x90
MIPS notation
=> add a, b, c : b와 c를 더해 a에 저장해라
그러면 a = b + c + d + e 는?
add a, b, c
add a, a, d
add a, a, e
한 줄에 하나의 명령어를 가질 수 있다.
주석도 한 줄에 끝나야 한다.
피 연산자는 항상 3개.
Design Principle 1 : Simplicity favors regulariry
Quiz 1) C language로 표현된 아래 수식을 MIPS assembly로 바꿔봐
a = b + c
d = a - e
==>
add a, b, c
sub d, a, e
Quiz2) 아래 수식을 C Compiler는 어떻게 처리할까?
f = ( g + h ) - ( i + j );
add t0, g, h
add t1, i, j
sub f, t0, t1
728x90
'CS > 컴퓨터 구조' 카테고리의 다른 글
2.7 Instructions for Making decision (0) | 2023.10.20 |
---|---|
2.6 Logical Operations (0) | 2023.10.20 |
2.5 Representing Instruction in the Computer (1) | 2023.10.20 |
2.4 Signed and Unsigned Numbers (1) | 2023.10.19 |
2.3 Operands of the Computer Hardware (1) | 2023.10.19 |
Comments