没有合适的资源?快使用搜索试试~ 我知道了~
首页计算机结构与组成 软硬件接口第五版英文版ppt-03(全6个)
资源详情
资源评论
资源推荐

COMPUTER ORGANIZATION AND DESIGN
The Hardware/Software Interface
ARM
Edition
Chapter 3
Arithmetic for Computers

Chapter 3 — Arithmetic for Computers — 2
Arithmetic for Computers
Operations on integers
Addition and subtraction
Multiplication and division
Dealing with overflow
Floating-point real numbers
Representation and operations
§
3
.
1
I
n
t
r
o
d
u
c
t
i
o
n

Chapter 3 — Arithmetic for Computers — 3
Integer Addition
Example: 7 + 6
§
3
.
2
A
d
d
i
t
i
o
n
a
n
d
S
u
b
t
r
a
c
t
i
o
n
Overflow if result out of range
Adding +ve and –ve operands, no overflow
Adding two +ve operands
Overflow if result sign is 1
Adding two –ve operands
Overflow if result sign is 0

Chapter 3 — Arithmetic for Computers — 4
Integer Subtraction
Add negation of second operand
Example: 7 – 6 = 7 + (–6)
+7: 0000 0000 … 0000 0111
–6: 1111 1111 … 1111 1010
+1: 0000 0000 … 0000 0001
Overflow if result out of range
Subtracting two +ve or two –ve operands, no overflow
Subtracting +ve from –ve operand
Overflow if result sign is 0
Subtracting –ve from +ve operand
Overflow if result sign is 1

Chapter 3 — Arithmetic for Computers — 5
Arithmetic for Multimedia
Graphics and media processing operates
on vectors of 8-bit and 16-bit data
Use 64-bit adder, with partitioned carry chain
Operate on 8×8-bit, 4×16-bit, or 2×32-bit vectors
SIMD (single-instruction, multiple-data)
Saturating operations
On overflow, result is largest representable
value
c.f. 2s-complement modulo arithmetic
E.g., clipping in audio, saturation in video
剩余53页未读,继续阅读








安全验证
文档复制为VIP权益,开通VIP直接复制

评论0