본문 바로가기
Computer Architecture/컴퓨터구조[05]

[CA] Lecture #11

by leziwn.cs 2023. 10. 7.
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 발생하면, 표현 가능한 가장 큰 양수로 표현한다.

 

'Computer Architecture > 컴퓨터구조[05]' 카테고리의 다른 글

[CA] Lecture #16 - Ch4: The Processor  (0) 2023.11.05
[CA] Lecture #12  (0) 2023.10.24
[CA] Lecture #10  (0) 2023.09.28
[CA] Lecture #09  (0) 2023.09.27
[CA] Lecture #08  (0) 2023.09.25