
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
No hand written solution and no image
![Question 4# Read the following algorithm:
Algorithm for converting a fraction into binary with p binary places.
Inputs: fraction r EQ, 0<x< 1 and number of places p E N.
Outputs: bits b₁,b2,..., bp such that (0.bybą... bp)2 is the
best approximation to z using p binary places.
Method:
Initialise: j1, b₁,b2,...,bp0
Loop: if j = p + 1 stop.
x + 2x
If r≥1 [b, 1, x-x-1]
j+j+1
Repeat loop
(a) Verify that the algorithm converts to 0.11010, when p=5. Can you spot how to
express exactly in repeating binary?
(b) Express 0.8510 as accurately as possible with 8 binary places.](https://content.bartleby.com/qna-images/question/e76b03dc-a295-41f1-af21-0d00d1072650/abec96fd-20db-47ab-bcc9-21d830244acf/tsmtf6v_thumbnail.jpeg)
Transcribed Image Text:Question 4# Read the following algorithm:
Algorithm for converting a fraction into binary with p binary places.
Inputs: fraction r EQ, 0<x< 1 and number of places p E N.
Outputs: bits b₁,b2,..., bp such that (0.bybą... bp)2 is the
best approximation to z using p binary places.
Method:
Initialise: j1, b₁,b2,...,bp0
Loop: if j = p + 1 stop.
x + 2x
If r≥1 [b, 1, x-x-1]
j+j+1
Repeat loop
(a) Verify that the algorithm converts to 0.11010, when p=5. Can you spot how to
express exactly in repeating binary?
(b) Express 0.8510 as accurately as possible with 8 binary places.
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 3 steps

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
- Using the Matlab computer software, write the code to represent the following surface (put the title, axes and legend of the surface in the obtained graph) x2 = 4y2 + z2 (You can use a set of values between -5 to 5).arrow_forwardIs it possible to describe the spiral model in only a half page?arrow_forwardWrite a MATLAB program to take input height of cylinder h and radius of base r from user and print the total suface area of given figure in image below. Must Show output screenshot.arrow_forward
- MATLAB PROBLEMarrow_forward3. Create a truth table for the Boolean Expression z(x+y)', using the convention for setting up the variable values. Work within the following grid.arrow_forwardWrite a MATLAB program to plot sine(x) and cosine(y) curves on the same figure. Use the following information: x=0 to 5π with 50 steps, y=0 to 6π with 50 steps. Figure title = Sine and Cosine. X-lable=x-axis. Y-lable=y-axis. colors= sine in green, cosine in black. Line style= sin(+), cos(*). Show the grid.arrow_forward
- Why do there always be straight lines even I have changed the parameters?arrow_forward4. Write a Matlab program to plot the trigonometric function given below: y(t) = 8cos3(t) - 3sin3(t) + 7sin(t)cos(t). Attach code and plot screenshot.arrow_forwardInstructions: Write the code of the given problems in Script File and then copy the code on the LMS assignment module directly. Also copy the output of the program. Question: Plot the following three sine curves on same figure. For the curve 1, use a linewidth of 2. For the curve 2, specify a dashed green line style with diamond markers. For the curve 3, specify a red, dash-dot line style with asterisk markers. 1. sin(x) 2. sin(x+¹) 4 T --) 4 3. sin(x-arrow_forward
arrow_back_ios
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