Introduction to Java Programming and Data Structures, Comprehensive Version (11th Edition)
11th Edition
ISBN: 9780134670942
Author: Y. Daniel Liang
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Chapter 2.10, Problem 2.10.3CP
Program Plan Intro
Floating point:
- The values that contain decimal part in them are called as floating point literals.
- They are two basic types for java floating point numbers.
- Float
- Double
Float:
It holds single precision number format.
It can hold 4 bytes of data.
Example:
//declaration of a float value
float a = 2.356f;
Double:
It holds double precision number format.
It can hold 8 bytes of data.
Example:
//declaration of a double value
double a = 2.356;
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
What is the IEEE-754 single precision real number after encodingt the real decimal number-76.0625?
Oa.
The IEEE-754 single precision real number is 1 10000101 00110000011000000000000.
The IEEE-754 single precision real number is 1_10000101 00110000010000000000000.
b.
The IEEE-754 single precision real number is 1 10000101 00110010010000000000000.
The IEEE-754 single precision real number is 1 10000101 00100000011000000000000.
d.
What is the IEEE-754 single precision real number after encodingt the real decimal number -76.0625?
The IEEE-754 single precision real number is 1_10000101_00110000011000000000000.
a.
The IEEE-754 single precision real number is 1_10000101_00110000010000000000000.
Ob.
The IEEE-754 single precision real number is 1_10000101_00110010010000000000000.
O c.
The IEEE-754 single precision real number is 1_10000101_00100000011000000000000.
d.
What is the IEEE-754 single precision real number after encodingt the real decimal number -76.0625?
The IEEE-754 single precision real number is 1_10000101_00100000011000000000000.
a.
Ob.
The IEEE-754 single precision real number is 1_10000101_00110000011000000000000.
The IEEE-754 single precision real number is 1_10000101_00110010010000000000000.
OC.
The IEEE-754 single precision real number is 1_10000101_00110000010000000000000.
d.
Chapter 2 Solutions
Introduction to Java Programming and Data Structures, Comprehensive Version (11th Edition)
Ch. 2.2 - Identify and fix the errors in the following code:...Ch. 2.3 - How do you write a statement to let the user enter...Ch. 2.3 - Prob. 2.3.2CPCh. 2.4 - Prob. 2.4.1CPCh. 2.5 - Identify and fix the errors in the following code:...Ch. 2.6 - Identify and fix the errors in the following code:...Ch. 2.7 - Prob. 2.7.1CPCh. 2.8 - Prob. 2.8.1CPCh. 2.8 - Translate the following algorithm into Java code:...Ch. 2.9 - Prob. 2.9.1CP
Ch. 2.9 - Prob. 2.9.2CPCh. 2.9 - Prob. 2.9.3CPCh. 2.9 - Prob. 2.9.4CPCh. 2.9 - Prob. 2.9.5CPCh. 2.9 - Prob. 2.9.6CPCh. 2.9 - Write a statement to display the result of 23.5.Ch. 2.9 - Suppose m and r are integers. Write a Java...Ch. 2.10 - How many accurate digits are stored in a f1oat or...Ch. 2.10 - Prob. 2.10.2CPCh. 2.10 - Prob. 2.10.3CPCh. 2.10 - Which of the following are correct literals?...Ch. 2.11 - How would you write the following arithmetic...Ch. 2.12 - Prob. 2.12.1CPCh. 2.13 - Prob. 2.13.1CPCh. 2.14 - Which of these statements are true? a. Any...Ch. 2.14 - Show the output of the following code: int a = 6;...Ch. 2.15 - Prob. 2.15.1CPCh. 2.15 - Prob. 2.15.2CPCh. 2.15 - Show the following output: float f =12.5F; int i =...Ch. 2.15 - If you change (int) (tax 100) / 100.0 to (int)...Ch. 2.15 - Prob. 2.15.5CPCh. 2.15 - Write an expression that rounds up a double value...Ch. 2.16 - How would you write the following arithmetic...Ch. 2.17 - Show the output of Listing 2.10 with the input...Ch. 2.18 - Can you declare a variable as int and later...Ch. 2.18 - Prob. 2.18.2CPCh. 2.18 - Will overflow cause a runtime error?Ch. 2.18 - Prob. 2.18.4CPCh. 2 - (Convert Celsius to Fahrenheit) Write a program...Ch. 2 - (Compute the volume of a cylinder) Write a program...Ch. 2 - (Convert feet into meters) Write a program that...Ch. 2 - (Convert pounds into kilograms) Write a program...Ch. 2 - (Financial application: calculate tips) Write a...Ch. 2 - (Sum the digits in an integer) Write a program...Ch. 2 - (Find the number of years) Write a program that...Ch. 2 - (Current time) Listing 2.7. ShowCurrentTime.java,...Ch. 2 - (Physics: acceleration) Average acceleration is...Ch. 2 - (Science: calculating energy) Write a program that...Ch. 2 - (Population projection) Rewrite Programming...Ch. 2 - (Physics: finding runway length) Given an...Ch. 2 - (Financial application: compound value) Suppose...Ch. 2 - (Health application: computing BMI) Body Mass...Ch. 2 - (Geometry: distance of two points) Write a program...Ch. 2 - (Geometry: area of a hexagon) Write a program that...Ch. 2 - (Science: wind-chill temperature) How cold is it...Ch. 2 - (Print a table) Write a program that displays the...Ch. 2 - (Geometry: area of a triangle) Write a program...Ch. 2 - (Financial application: calculate interest) If you...Ch. 2 - (Financial application: calculate future...Ch. 2 - (Financial application: monetary units) Rewrite...Ch. 2 - (Cost of driving) Write a program that prompts the...
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- What is the decimal value of 2A16? Select one: O a. 4810 O b. 7110 O c. 4210 O d. 7310 O e. 3610 Which of the following equation is incorrect? Select one: O a. 11011111011010102= 0xDF6A O b. 11010010011010012 = 0xD269 O c. 0110001101101010₂ = 0x736B O d. 1101111111100010₂ = 0xDFE2 O e. 00011010011110112 = 0x1A7Barrow_forwardWhat is the median of the numbers below: (15,7,45,19, 73, 17) 0 7 O 73 O 18 O 80 O 146arrow_forwardThe base of the following is 120 + 123 303.arrow_forward
- For each of the following numbers, state the base in use; that is, what is p, q, r, s? 100001p = 3310 25q = 1310 25r = 2310 25s = 3710arrow_forwardNumber Conversions: Convert the given number system to its specified base. Show all your solutions in another sheet of раper. 1. 1011 111 0011 1010. 1100 10002 = %3! 10 8 16 2. ACE.2516 = 10 = 2 = 8 3. 750.1258 %3D 10 = 2 = 16 4. АB.812 %3 3 = 6 =arrow_forward3. Perform the following conversions, f. 345678 g. 1431125 h. A98B12 i. EF64H20 j. 425 k. 101011.10113 1. 10011001102 = m. 38.6510 = 10 7 3 6 7 10 8 2arrow_forward
- Here are 2 signed hexadecimal numbers. What are their decimal values? (Hint: No numbers with an absolute value over 1000 were used in this question. a. 0x000001ac b. 0xfffffeb9 Now subtract 1(b) from 1(a) in hexadecimal, and likewise convert the result to decimal. (that is, 0x000001ac - 0xfffffeb9arrow_forwardHere, x = 1019arrow_forwardHelp mearrow_forward
- What is the IEEE-754 single precision real number after encodingt the real decimal number -76.0625? The IEEE-754 single precision real number is 1_10000101_00110000011000000000000. Oa. The IEEE-754 single precision real number is 1_10000101_00110000010000000000000. Ob. The IEEE-754 single precision real number is 1_10000101_00110010010000000000000. O c. The IEEE-754 single precision real number is 1_10000101_00100000011000000000000. Od.arrow_forwardWhat is the normalized expression for the floating binary value 00000001001111011? The normalized expression is 1.001111011 x 2-6 O b. The normalized expression is 1.001111011 x 2-8. O. The normalized expression is 1.001111011 x 2-7. O d. The normalized expression is 1.001111011 x 2-5.arrow_forwardon Translate the lines marked by to Hex LDI R16, 10 LDI R29, 3* OR R16, R29* ASR R29* LDI R29, 3: OR R16, R29: ASR R29: 0x95AA 0x1805 0x957A 0x2BOD OxE0A1 OxE0C9 OxE045 0xE0D3 0x9540 0x908C OXOFOA Ox95D5 0xE057 OxE098 OxE075 0x9587 0x9583 OxEDE6 ONEOB4 09595 0x9553 0x2308 0x270E 0x230C 0x1B0B 0x95C7 0x95E0 0x0F07 0x2809 0x2704arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education