Computer Science: An Overview (12th Edition)
12th Edition
ISBN: 9780133760064
Author: Glenn Brookshear, Dennis Brylow
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Textbook Question
Chapter 2, Problem 57CRP
Write and test a Python script that reads in a floating-point radius of a circle, and outputs the circumference and area of the circle.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Scenario: In a biased N-bit binary number system with bias B, positive and negative numbers are represented as their value plus the bias B. For example, for 5-bit numbers with a bias of 15, the number 0 is represented as 01111, 1 as 10000, and so forth. Biased number systems are sometimes used in floating point mathematics. Consider a biased 8-bit binary number system with a bias of 12710
Question: What is the representation and value of the most negative number?
Assume you have a base 10 computer that stores floating-point numbers using a 5
digit normalized mantissa (x.xxxx), a 4 digit exponent, and a sign for each.
(a) For this machine, what is machine epsilon?
(b) What is the smallest positive normalized number that can be represented exactly in this
machine?
Take two float numbers from the user and perform all arithmetic operations.
in MIPS Language, using cin and court from the user and also main function with $f0 to store the numbers
Chapter 2 Solutions
Computer Science: An Overview (12th Edition)
Ch. 2.1 - What sequence of events do you think would be...Ch. 2.1 - What information must the CPU supply to the main...Ch. 2.1 - Prob. 3QECh. 2.2 - Prob. 1QECh. 2.2 - In the text, JUMP instructions were expressed by...Ch. 2.2 - Is the instruction If 0 equals 0, then jump to...Ch. 2.2 - Write the example program in Figure 2.7 in actual...Ch. 2.2 - The following are instructions written in Vole...Ch. 2.2 - What is the difference between the instructions...Ch. 2.2 - Here are some instructions in English. Translate...
Ch. 2.3 - Prob. 1QECh. 2.3 - Suppose the Vole memory cells at addresses 0xB0 to...Ch. 2.3 - Suppose the Vole memory cells at addresses 0xA4 to...Ch. 2.3 - Suppose the Vole memory cells at addresses 0xF0 to...Ch. 2.4 - Prob. 1QECh. 2.4 - Prob. 2QECh. 2.4 - Prob. 3QECh. 2.4 - a. Suppose you XOR the first 2 bits of a string of...Ch. 2.4 - Prob. 5QECh. 2.4 - Prob. 6QECh. 2.4 - Prob. 7QECh. 2.4 - Prob. 8QECh. 2.4 - Prob. 9QECh. 2.4 - Prob. 10QECh. 2.4 - Using Vole machine language (Appendix C), write a...Ch. 2.4 - Prob. 12QECh. 2.5 - Prob. 1QECh. 2.5 - Prob. 2QECh. 2.5 - Prob. 3QECh. 2.6 - The hypotenuse example script truncates the sides...Ch. 2.6 - Prob. 2QECh. 2.6 - The Python built-in function str () will convert a...Ch. 2.6 - Use the Python built-in bin () to write a script...Ch. 2.6 - Prob. 6QECh. 2.7 - Referring back to Questions 3 of Section 2.3, if...Ch. 2.7 - Prob. 2QECh. 2.7 - Suppose there were two central processing units...Ch. 2 - a. In what way are general-purpose registers and...Ch. 2 - Answer the following questions in Vole machine...Ch. 2 - Prob. 3CRPCh. 2 - What is the value of the program counter in the...Ch. 2 - Prob. 5CRPCh. 2 - Prob. 6CRPCh. 2 - Prob. 7CRPCh. 2 - Suppose a machine language is designed with an...Ch. 2 - Translate the following instructions from English...Ch. 2 - Rewrite the program in Figure 2.7 assuming that...Ch. 2 - 11. Classify each of the following instructions...Ch. 2 - Prob. 12CRPCh. 2 - Prob. 13CRPCh. 2 - Suppose the memory cells at addresses 0x00 through...Ch. 2 - Suppose the memory cells at addresses 0x00 through...Ch. 2 - Suppose the memory cells at addresses 0x00 through...Ch. 2 - Suppose the memory cells at addresses 0x00 through...Ch. 2 - Prob. 18CRPCh. 2 - If the Vole executes an instruction every...Ch. 2 - Prob. 20CRPCh. 2 - Prob. 21CRPCh. 2 - Prob. 22CRPCh. 2 - Prob. 23CRPCh. 2 - Write a program in Vole to compute the sum of...Ch. 2 - Prob. 26CRPCh. 2 - Prob. 27CRPCh. 2 - Suppose the following program, written in Vole, is...Ch. 2 - Summarize the steps involved when the Vole...Ch. 2 - Summarize the steps involved when the Vole...Ch. 2 - Summarize the steps involved when the Vole...Ch. 2 - Suppose the registers 0x4 and 0x5 in the Vole...Ch. 2 - Prob. 33CRPCh. 2 - Prob. 34CRPCh. 2 - Prob. 35CRPCh. 2 - Prob. 36CRPCh. 2 - Prob. 37CRPCh. 2 - Prob. 38CRPCh. 2 - Prob. 39CRPCh. 2 - Prob. 40CRPCh. 2 - Prob. 41CRPCh. 2 - Prob. 42CRPCh. 2 - a. What single instruction in the Vole machine...Ch. 2 - Write a Vole program that reverses the contents of...Ch. 2 - Write a Vole program that subtracts the value...Ch. 2 - Prob. 46CRPCh. 2 - Suppose a person is typing forty words per minute...Ch. 2 - Prob. 48CRPCh. 2 - Suppose the Vole communicates with a printer using...Ch. 2 - Write a Vole program that places 0s in all the...Ch. 2 - Prob. 51CRPCh. 2 - Prob. 52CRPCh. 2 - Suppose you are given 32 processors, each capable...Ch. 2 - Prob. 54CRPCh. 2 - Prob. 55CRPCh. 2 - Describe how the average of a collection of...Ch. 2 - Write and test a Python script that reads in a...Ch. 2 - Write and test a Python script that reads in a...Ch. 2 - Prob. 59CRPCh. 2 - Suppose a computer manufacturer develops a new...Ch. 2 - Prob. 2SICh. 2 - Prob. 3SICh. 2 - Prob. 4SICh. 2 - Suppose a manufacturer produces a computer chip...Ch. 2 - Prob. 6SICh. 2 - Prob. 7SICh. 2 - Prob. 8SI
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
What will the following program display? def main (): x = 1 y = 3.4 print(x, y) change_us(x, y) print(x, y) def...
Starting Out with Python (3rd Edition)
Which of the following are illegal variable names in Python, and why? x 99bottles july2009 theSalesFigureForFis...
Starting Out with Python (4th Edition)
3.12 (Date Create a class called Date that includes three pieces Of information as data
members—a month (type ...
C++ How to Program (10th Edition)
Write the function htoi(s), which converts a suing of hexadecimal digits (including an optional 0x or 0X) into ...
C Programming Language
Trace the operation of A search applied to the problem of getting to Bucharest from Lugoj using the straight-li...
Artificial Intelligence: A Modern Approach
Display the message "Enter an integer: ", leaving the cursor on the same line.
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
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
- In Assembly Programming Language, define x and y as 16-bit unsigned integer variables. Assume that x and y hold values small enough to fit into 8 bits. Write a program that computes (x2 - y2). If the result fits into 8 bits then save it in the most significant byte of x, otherwise save it to a 16-bit variable z.arrow_forwardGive an explanation of different codes including ASCII Code representation used in computer programing < 2 7:37 PMarrow_forwardConsider a data type called nibble its length is 4 bits. The min and max number of signed nibble is Select one: a. -8, +7 b. 0, 15 c. 0, 16 d. -8, +8arrow_forward
- In the following expression, the values of a, b, and c are integers b (a/10) min (a,b,c) 6 5 3 2 4 1 Drag and drop the precedence order (1,2, 3, 4, 5, 6) of the mathematical operation in pythonarrow_forwardWrite an assembly-language program for decimal addition of two 8-bit numbers whose sum is 8 bits.arrow_forwardConsider a 32-bit hexadecimal number stored in memory as follows: Address Value 100 2A 101 C2 102 08 103 1B a) If the machine is big endian and uses two's complement representation for integers, write the 32-bit integer number stored at address 100 (you may write the number in hex). b) If the machine is big endian and the number is an IEEE single-precision floating-point value, is the number positive or negative? c) If the machine is big endian and the number is an IEEE single-precision floating-point value, determine the decimal equivalent of the number stored at address 100 (you may leave answer in scientific notation form, as a number times a power of two). d) If the machine is little endian and uses two's complement representation for integers, write the 32-bit integer number stored at address 100 (you may write the number in hex). e) if the machine is little endian and the number is an iEEE single-precision floating-point value, is the number positive or negative? f)…arrow_forward
- In a given 32-bit floating-point representation of numbers, if the number of bits of the mantissa is reduced to accommodate an increase in the number of bits of the exponent, this will result in the following: (select the best answer) Increased range of the numbers at the expense of the precision Increased precision of the numbers at the expense of the range Both range and precision increase Both range and precision decreasearrow_forwardWrite programs in MSP430 language for the following questions: a(15 points) Load least significant 6 digits of your student number as ASCII characters (8-bit ASCII) into R4-R5-R6 register set. b(15 points) Add constant 10 to each character of the R4-R5-R6 register set to make a simple encryption and store results into R7-R8-R9. c(15 points) Decrypt R7-R8-R9 by subtracting by 10 and load the results into R10-R11-R12. d-(15 points) Compare the contents of the set of R4-R5-R6 and the set of R10-R11-R12. Load 1 into R13 to show both sets are the same or clear R13. For the toolbar, press ALT+F10 (PC) or ALT+FN+F10 (Mac).arrow_forwardTo be completed after lecture on Monday or after watching the first Floating Point video: Take the values 12345 x 10-12 and -12345 x 1037 And encode them in a system that uses the format SEEMMMMM with the following biases: Bias of 47, 25, and 32. (you will have six values when you are done)arrow_forward
- The value ofa float type variable is represented using the single-precision 32-bit floating point format of IEEE-754 standard that uses I bit for sign, 8 bits for biased exponent and 23 bits for mantissa. A float type variable X is assigned the decimal value of -1425. The representation of X in hexadecimal notation isarrow_forwardRead Two single precision floating point numbers with the name of num1 and num2 from the memory and compare them. If num1 is greater than num2, add the numbers and save the result in num3 (IN MIPS ASSEMBLY LANGUAGE)arrow_forwardThe IEEE Standard 754 representation of a floating point numberis given as: 01101110110011010100000000000000. Determine thebinary value represented by this number. If a computer’s system clock is 2.4 GHz, calculate the period of thesystem clock. If an 8-bit binary number is used to represent an analog value inthe range from 200 ounces to 700 ounces, what is the resolution ofthe system?arrow_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
Instruction Format (With reference to address); Author: ChiragBhalodia;https://www.youtube.com/watch?v=lNdy8HREvgo;License: Standard YouTube License, CC-BY