Biêu diễn sô Các bộ tính toán sô học... Table 5.1 = Numbers in ditferent systems.. Decimal Binary Octal Hexadecimal... a Structure of the circuit.
Trang 1Biêu diễn sô Các bộ tính toán sô học
Trang 2S6 nguyén khéng dau
D= đ„_qdy—2 + -* dido-
V(D) =d,_; x 107! +dy_> x 107? + + +d; x 10' + dp x 10°
B= by_|Dn_2 +++ bdo
V(B) = b„_¡ <2"! + by ¿ x2"? +. + By x 2! + bạ x 20
n—Ì
— » < 2!
¡=0
Trang 3
Table 5.1 = Numbers in ditferent systems
Decimal Binary Octal Hexadecimal
Trang 4x 0 0 1
I
_———— _—_—ề=œœg -n-ÿŸÿẹ.ẹ.ẳằ=aCỢã —— 6 ỐỌ "“Ỷ=anẳ===ẳễs==
+
Cam ——Í L— Sam
(a) The four possible cases
Carry sum
(b) Truth tabie
(c) Circuit
X ——>
HA
»—> C
(d) Graphical symbol
Trang 5Bộ cộng toàn phân
C; xX; Yi Ci+] Sỹ
1 1 1 1 1
(a) Truth table
—L}—
—1}—=
(c) Circuit
Trang 6Bo cong ripple carry
n~ 1
Trang 7Số nguyên có dâu
MSB
(a) Unsigned number
bạ —Ì
O denotes +
1 denotes — MSB
(b) Signed number
Figure 5.8 — Formats for representation of integers
Trang 8SO bu 2
B= bạT tạ ¿ - - ` PịDo
V(PB) = (T—bạ_1 « 2"7') + bya x 2-7 + - +b, x 2! + by x 2°
Trang 9+6
+4
43
42 +1 +0
+6
+3 +2 +1 +0
Sign and
+6
+4 +3 +2
+1
+0
0110
0190
0011
0010
0001
1000
1001
1010
0111
L100
L101]
1111
Trang 10Cộng sô có dâu
ignore
(—-3)
+ (+ 2)
(-3)
1011
+ 0010
1101
1011
+1110
11001
|
ignore
Figure 5.10 — Examples of 2’s complement addition.
Trang 11Trừ sô có dâu
(+5)
— (4+ 2)
(+ 3)
(—3)
- (+2)
(—7)
0101
— 0010
IOII
— 0010
0101 E———> + 1110
10011
|
ignore
1011
11001
|
ignore
Trang 12Bo cong va tru
|
`⁄
Figure 5.13 = Adder/subtractor unit -
Add/ Sub control
Trang 13Nhân sô nhị phân
Multiplicand M
Multiplier Q
Product P
1110
1110
0000
1110
(154) 10011010
Trang 14
(a) Structure of the circuit
Trang 15out
_
đn
U |
| FA ~——†— “in
1
(b) A block in the top row
(c) A block in the bottom two rows
4
Trang 16Nhân số có dâu
Multiplicand M (+14) 01110
+ 001110
Partial product | OO010101
+ 000000
+ 001110
Partial product 3 00100II
+ 000000]
' Product P (+154) 0010011010
(a) Positive multiplicand
Trang 17Multiplicand M (14) 10010
Multiplier Q (+11) x 01011 Partial product 0 1110010
+ 110010 Partial product ! 110101]
+ 000000 Partial product 2 1110101
+ 110010 Partial product 3 1101100
+ 000000|
7’ ý
Product P (154) 1101100110
(b) Negative multiplicand
Trang 18Biểu diễn số thực bằng sô dâu
châm tĩnh
B=bạ_tDa-¿ - - -PịDbo.D_1Ð_¿ - b_—p
n—Ì
V(B) = > b; x 2!
i=—k
Trang 19Biểu diễn số thực bằng sô dâu
châm động
Ú denotes + 8-bit 23 bits of mantissa
ldenotes — ÊXCess-l27
exponent
(a) Single precision
Exponent = E — 127
Value = +1.M x 2&7!??
Trang 2064 bits
Sign t — v = Lí
L1-bit excess-1023 52 bits of mantissa
exponent
(c) Double precision
Exponent = E — 1023
Value = +1.M x 2&1