RAM Allocation Page 1 Storing Floatingpoint real Numbers
RAM Allocation Page 1 Storing Floating-point (real) Numbers in RAM data type float: • 4 CONTIGUOUS bytes (32 -bits) per variable • 7 decimals of precision • Sometimes also referred to as single precision reals data type double: • 8 CONTIGUOUS bytes (64 -bits) per variable • ANSI: 10 decimals of precision data type long double: • 16 CONTIGUOUS bytes (128 -bits) per variable • ANSI: 10 decimals of precision Data Structures in C for Non-Computer Science Majors Kirs and Pflughoeft
RAM Allocation Page 2 RAM Storage ? ? ? float f 1 = -92. 337, f 2; Available: Addresses 8910 through 8993 • f 1 stored at address 8910 (through 8913) • f 2 stored at address 8914 (through 8917) 8909 8910 8911 8912 0000 10100010 01001110 0011 8913 8914 8915 8916 00000100 10100010 01011101 0010 8917 8918 8919 8920 0010 0110 101110011 01101111 8922 8924 8925 00100010 0000 00110110 Data Structures in C for Non-Computer Science Majors Kirs and Pflughoeft
Page 3 This Concludes The Slides for this Section Choose an Option: Repeat Slides for this Section Go To Slide Index For Chapter 3 Go To Slide Index For Chapter 4 Go To Slide Index For Textbook Go To Home Page Data Structures in C for Non-Computer Science Majors Kirs and Pflughoeft
- Slides: 3