1. Trang chủ
  2. » Giáo án - Bài giảng

kiến trúc máy tính dạng thanh tin figs b floating point numbers sinhvienzone com

7 38 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 7
Dung lượng 24,28 KB

Nội dung

B FLOATING-POINT NUMBERS CuuDuongThanCong.com https://fb.com/tailieudientucntt Positive underflow Negative underflow Negative overflow —10100 Expressible negative numbers Zero —10—100 Expressible positive numbers 10—100 Positive overflow 10100 Figure B-1 The real number line can be divided into seven regions CuuDuongThanCong.com https://fb.com/tailieudientucntt Digits in fraction Digits in exponent Lower bound Upper bound 10−12 109 10−102 1099 3 10−1002 10999 10−10002 109999 10−13 109 10−103 1099 10−1003 10999 4 10−10003 109999 10−14 109 10−104 1099 10−1004 10999 10−10004 109999 10 10−1009 10999 20 10−1019 10999 Figure B-2 The approximate lower and upper bounds of expressible (unnormalized) floating-point decimal numbers CuuDuongThanCong.com https://fb.com/tailieudientucntt Example 1: Exponentiation to the base 2–2 Unnormalized: 1010100 –1 2–4 –3 2–6 –5 2–8 –7 2–10 –9 2–12 –11 2–14 –13 2–16 –15 20 –12 –13 –15 0 0 0 0 0 1 1 = (1 × + × + × + × 2–16) = 432 Sign Excess 64 Fraction is × 2–12+ × 2–13 –15 –16 + exponent is +1 × + × 84 – 64 = 20 To normalize, shift the fraction left 11 bits and subtract 11 from the exponent Normalized: 1001001 1 1 0 0 0 0 0 = 29 (1 × 2–1+ × 2–2+ × 2–4 + × 2–5) = 432 Fraction is × 2–1 + × 2–2 +1 × 2–4 + × 2–5 Sign Excess 64 + exponent is 73 – 64 = Example 2: Exponentiation to the base 16 Unnormalized: 1000101 16–1 16–2 16–3 0 00 0 00 0 01 16–4 1 = 165 (1 × 16–3+ B × 16–4) = 432 Fraction is × 16–3 + B × 16–4 Sign Excess 64 + exponent is 69 – 64 = To normalize, shift the fraction left hexadecimal digits, and subtract from the exponent Normalized: 1000011 Sign Excess 64 + exponent is 67 – 64 = 0001 1011 0000 0 0 = 163 (1 × 16–1+ B × 16–2) = 432 Fraction is × 16–1 + B × 16–2 Figure B-3 Examples of normalized floating-point numbers CuuDuongThanCong.com https://fb.com/tailieudientucntt Bits 23 Fraction Sign Exponent (a) Bits 11 52 Exponent Fraction Sign (b) Figure B-4 IEEE floating-point formats (a) Single precision (b) Double precision CuuDuongThanCong.com https://fb.com/tailieudientucntt Item Single precision Double precision Bits in sign 1 Bits in exponent 11 Bits in fraction 23 52 Bits, total 32 64 Excess 127 Excess 1023 −126 to +127 −1022 to +1023 Smallest normalized number 2−126 2−1022 Largest normalized number approx 2128 approx 21024 Exponent system Exponent range Decimal range Smallest denormalized number approx 10−38 to 1038 approx 10−308 to 10308 approx 10−45 approx 10−324 Figure B-5 Characteristics of IEEE floating-point numbers CuuDuongThanCong.com https://fb.com/tailieudientucntt Normalized ± < Exp < Max Any bit pattern Denormalized ± Any nonzero bit pattern Zero ± 0 Infinity ± 1 1…1 Not a number ± 1 1…1 Any nonzero bit pattern Sign bit Figure B-6 IEEE numerical types CuuDuongThanCong.com https://fb.com/tailieudientucntt ... normalized floating- point numbers CuuDuongThanCong .com https://fb .com/ tailieudientucntt Bits 23 Fraction Sign Exponent (a) Bits 11 52 Exponent Fraction Sign (b) Figure B- 4 IEEE floating- point formats... 10999 20 10−1019 10999 Figure B- 2 The approximate lower and upper bounds of expressible (unnormalized) floating- point decimal numbers CuuDuongThanCong .com https://fb .com/ tailieudientucntt Example... Expressible negative numbers Zero —10—100 Expressible positive numbers 10—100 Positive overflow 10100 Figure B- 1 The real number line can be divided into seven regions CuuDuongThanCong .com https://fb .com/ tailieudientucntt

Ngày đăng: 28/01/2020, 23:01

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN