Division Overview

- Dividend: 나눠지는 수
- Divisor: 나누는 수
- Quotient: 몫
- Remainder: 나머지
Division Hardware
Division Hardware - 1st version

Division Hardware - 2nd version

Division Hardware - 3rd version

Dividing Signed Numbers
- Dividend(나눠지는 수), Divisor(나누는 수)의 sign bit 확인하기
- Quotient(몫): 두 수의 sign bit이 서로 다르면, 음수이다.
- Remainder(나머지): Dividend(나눠지는 수)와 부호가 같다.
MIPS Divide Instructions
▶ Results in Lo, Hi registers:
- Lo: Quotient(몫)
- Hi: Remainder(나머지)
▶ Divide Instructions:
div $s0, $s3
divu $s0, $s3
▶ Divide pseudo instructions:
div $s3, $s2, $s1 # $s3 = $s2/$s1
divu $s3, $s2, $s1
- Software must check for overflow, divide-by-zero.
Fixed Point Representation

Another Approach: Scientific Notation (10진수)
: Mantissa (significand; normalized number) + Exponent (base 10)로 수를 표현하는 방법
예) 6.02 * 10^23
- Mantissa (significand) = 6.02
- Radix (base) = 10 (10진수)
- Exponent = 23
Floating Point (2진수)

1) Single-Precision
예) 8.75
--> 8 = 1000
--> 0.75 = 0.11
--> 8.75 = 1000.11
--> Normalization = 1.00011 (* 2^3 필요)
- S = 0 (양수)
- Exponent = 3 + Bias(127) = 130
- Significant = 00011...

2) Double-Precision

- S = 0 (양수)
- Exponent = 3 + Bias(1023) = 1026
- Significant = 00011...
'Computer Architecture > 컴퓨터구조[01]' 카테고리의 다른 글
| [컴퓨터구조] 1030 (1) | 2023.11.02 |
|---|---|
| [컴퓨터구조] 4. The Processor (1) (0) | 2023.10.22 |
| [컴퓨터구조] 3. Arithmetic for Computers (3) (0) | 2023.10.22 |
| 2. 컴퓨터 언어 (0) | 2023.10.17 |
| [컴퓨터구조] 3. Arithmetic for Computers (2) (0) | 2023.10.09 |