Computer Architecture/컴퓨터구조[05]
[CA] Lecture #11
leziwn.cs
2023. 10. 7. 17:58
Chapter 3: Arithmetic for Computers
Extra (From Digital Logic Class)
Unsigned Integers
Decimal & Binary Number
Octal & Hexadecimal Number
Binary to Octal and Hexadecimal
Signed Number
1) Sign-and-Magnitude Representation
2) 1's Complement Representation
: 뒤집기만!
3) 2's Complement Representation
: 뒤집고, +1!
Four-bit Signed Integers
Addition
1) Sign and Magnitude
2) 1's Complement
3) 2's Complement
Subtraction: 2's Complement
: Addition과 같은 방법으로 계산한다.
Integer Addition
Integer Subtraction
Overflow
- (+) + (+) = (-)
- (-) + (-) = (+)
Arithmetic Logic Unit (ALU) Design
- ALU: A divice that performs the arithmetic operations like addition and subtraction or logical operations like AND or OR.
Full Adder (1-Bit)
Ripple Carry Adder
A Hierarchical Carry-Lookahead Adder
Adder and Subtractor Unit
Arithmetic for Multimedia
- SIMD (Single-Instruction, Multiple-Data)
- Saturating operations --> Overflow 발생하면, 표현 가능한 가장 큰 양수로 표현한다.