
Explanation of Solution
a)
Converting 458 base 10 to base 3 using subtraction method:
Step 1:
Check the possibility of multiplying any integer with the powers of 3 which may result in lower number than 458. The number that can be subtracted from the given number 458 with the power of 3 is 243. The number 243 is less than 458. So subtract 243 from 458.
Step 2:
The number that can be subtracted from the given number 215 with the power of 3 is 81 and it should be multiplied by 2 in order to get the nearest number of 215. The number 162 is less than 215. So subtract 162 from 215.
Step 3:
The number that can be subtracted from the given number 53 with the power of 3 is 27. The number 27 is less than 53. So subtract 27 from 53.
Step 4:
The number that can be subtracted from the given number 26 with the power of 3 is 9 and it should be multiplied by 2 in order to get the nearest number of 26. The number 18 is less than 26. So subtract 18 from 26.
Step 5:
The number that can be subtracted from the given number 8 with the power of 3 is 3 and it should be multiplied by 2 in order to get the nearest number of 8. The number 6 is less than 8. So subtract 6 from 8.
Step 6:
The number that can be subtracted from the given number 2 with the power of 3 is 1 and it should be multiplied by 2 in order to get the nearest number of 2. So subtract 2 from 2. The result will be 0. The process is stopped as the remainder is 0.
Therefore, the equivalent value of
Explanation of Solution
b)
Converting 677 base 10 to base 5 using subtraction method:
Step 1:
Check the possibility of multiplying any integer with the powers of 5 which may result in lower number than 677. The number that can be subtracted from the given number 677 with the power of 5 is 625. The number 625 is less than 677. So subtract 625 from 677.
Step 2:
Take 5 to the power of 3 that is 125. The number 125 is greater than 52. So make the value as 0.
Step 3:
The number that can be subtracted from the given number 52 with the power of 5 is 25 and it should be multiplied by 2 in order to get the nearest number of 52. The number 50 is less than 52. So subtract 50 from 52.
Step 4:
Take 5 to the power of 1 that is 5. The number 5 is greater than 2. So make the value as 0.
Step 5:
The number that can be subtracted from the given number 2 with the power of 5 is 1 and it should be multiplied by 2 in order to get the nearest number of 2. So subtract 2 from 2. The result will be 0. The process is stopped as the remainder is 0.
Therefore, the equivalent value of
Explanation of Solution
c)
Converting 1518 base 10 to base 7 using subtraction method:
Step 1:
Check the possibility of multiplying any integer with the powers of 7 which may result in lower number than 1518. The number that can be subtracted from the given number 1518 with the power of 7 is 343 and it should be multiplied by 4 in order to get the nearest number of 1518. The number 1372 is less than 1518. So subtract 1372 from 1518.
Step 2:
The number that can be subtracted from the given number 146 with the power of 7 is 49 and it should be multiplied by 2 in order to get the nearest number of 146. The number 98 is less than 146. So subtract 98 from 146.
Step 3:
The number that can be subtracted from the given number 48 with the power of 7 is 7 and it should be multiplied by 6 in order to get the nearest number of 48. The number 42 is less than 48. So subtract 42 from 48.
Step 4:
The number that can be subtracted from the given number 6 with the power of 7 is 1 and it should be multiplied by 6 in order to get the nearest number of 6. So subtract 6 from 6. The result will be 0. The process is stopped as the remainder is 0.
Therefore, the equivalent value of
Explanation of Solution
d)
Converting 4401 base 10 to base 9 using subtraction method:
Step 1:
Check the possibility of multiplying any integer with the powers of 9 which may result in lower number than 4401. The number that can be subtracted from the given number 4401 with the power of 9 is 729 and it should be multiplied by 6 in order to get the nearest number of 4410. The number 4374 is less than 4401. So subtract 4374 from 4401.
Step 2:
Take 9 to the power of 2 that is 81. The number 81 is greater than 27. So make the value as 0.
Step 3:
The number that can be subtracted from the given number 27 with the power of 9 is 9 and it should be multiplied by 3 in order to get the nearest number of 27. So subtract 27 from 27.
Step 4:
Take 9 to the power of 0 that is 1. So make the value as 0. The result will be 0. The process is stopped as the remainder is 0.
Therefore, the equivalent value of
Want to see more full solutions like this?
Chapter 2 Solutions
The Essentials of Computer Organization and Architecture
- I need help writing pseudocode for calculating class score average by putting in 5 test scores, and showing the average from all 5 inputs and the GPA score.Starting with 3 functions outside of a main module. The functions are getScore(), getGPAPoint(Integer score), and getAverage(). Function getscore is an input for a grade as a class percentage. Function getGPAPoint will calculate the score into a GPA point and return as a float (values of 90-100 as 4.0, 80-89 as 3.0, 70-79 as 2.0, 60-69 as 1.0, and anything below 60 as 0.) Function averageGPA will finally make a call to both previous functions when the user inputs numbers 5 times that then calculates the average (add up all the scores, divide by 5) and the average grade alongside displaying the average GPA. End result is a main module that makes a proper call to the averageGPA function and display its results. Need help with this!arrow_forwardPlease original work Why is integration between data collection and business analysis so important to success in an organization that uses business analytics? How can a company that is just starting to use business analytics set up its program for success right from the beginning? Please cite in text references and add weblinksarrow_forwardHow to make a 1 bit adder with CLA?arrow_forward
- I need help writing pseudocode for this function. The following pseudocode statement calls a function named half, which returns a value that is half that of the argument. (Assume both the result and number variables are Real.) Set result = half(number)arrow_forwardNeed help converting my pseudocode to python, AND have a flowchart showing everything!The code:Main Module Call InputModuleEnd Main Module Module InputModule // This module gets input from the user Declare Principal, AnnualRate, Years as Float Output "Enter the Principal amount (P): " Input Principal Output "Enter the Annual Interest Rate (in percentage, e.g., 5 for 5%): " Input AnnualRate Output "Enter the number of Years to repay the loan: " Input Years Call DisplayPayment(Principal, AnnualRate, Years)End Module Module DisplayPayment(Principal, AnnualRate, Years) // This module calculates and displays the monthly payment Declare R, N as Float Declare MonthlyPayment as Float Declare PowerFactor as Float // second local variable // Calculate monthly interest rate R and number of months N Set R = (AnnualRate / 100) / 12 Set N = Years * 12 // Calculate PowerFactor = (1 + R)^N Set PowerFactor = (1 + R) ^ N // Calculate…arrow_forwardWhats wrong with my pseudocode? Where did I make an error?Code: Module main() Declare Real mileage Call getMileage() Display “You’ve drive a total of “, mileage, “ miles End Module Module getMilage() Display “Enter your mileage: “ Input mileage End Modulearrow_forward
- I need help!! Writing a long pseudocode for a modular program that will display the monthly payment on a mortgage. P=Principal amount borrowed (loan)R=Rate of interest computed for each monthN=Number of months to pay back the loan or mortgageThe help I need is creating a module that you can input the principle, rate of percentage, and years to repay the loan, and another module "displaypayment" that accepts the 3 values and calculates the monthly payment needed for the rates. Lastly 2 local variables needed!Equation:Monthly Payment=[(R*(1+R)^N)/((1+R)^N-1)]*Parrow_forwardTwo pseudocode questions I need help with: How do I design a module called findSum that will display the sum of two integer passed by parameter, and a module called findArea that will display the area of a rectangle when passed 2 real values for the length and width of the rectangle?arrow_forwardFor the pseudocode module, what is displayed with the call findValue(1, 4, 2)?Module findValue(Integer a, Integer b, Integer c) Declare Integer value value = b + c - a Display valuearrow_forward
- I need help finishing my python rock paper scissors code, where it asks the user "rock, paper, scissors", the user types either option (repeatedly asks until its one of the three), and for a random option from the code to select also rock paper scissors. The end result would be you winning, code winning, or a tie.My code:import randomOPTIONS = ("ROCK", "PAPER", "SCISSOR") def getInput(): """ Function getInput() will receive and validate user input to be the string ROCK, PAPER, or SCISSOR. Input must be spelled correctly and in all capital letters. Function will return the validated input @return user input as ROCK, PAPER, OR SCISSOR """ #need help here def checkWinner(user, computer): """ Function checkWinner will accept 2 string parameters that must be unique values of ROCK, PAPER, or SCISSOR. Functions should return true if the string in parameter user beats the string in parameter computer in a game of rock…arrow_forwardI need help understanding how could I got the IP Address for the 1st Host on this Subnet, the IP Address for the Last Host on this Subnet & the Broadcast Address for this Subnet My Explanation:8 bits --> 17 & 0 128 64 32 16 | 8 4 2 1 0 0 0 1 0 0 0 1 -->17+ 0 0 0 0 0 0 0 0 --> 0 0 0 0 0 0 0 0 0 --> 0 (The Major (Base) Network Address): 142.20.33.0 To find the broadcast address, we can set all the bits in the host portion of the address to 1, which gives us 142.20.33.255. Based on the subnet mask 255.255.255.0, no bits were borrowed from the host portion, meaning 8 bits remain in the host portion. Using the formula 2^h – 2 (where h represents the number of host bits), we get 2^8 - 2 = 254 hosts. 8 bits --> 17 & 252 128 64 32 16 | 8 4 2 1 0 0 0 1 0 0 0 1 --> 17+ 1 1 1 1 1 1 0 0 --> 252 0 0 0 1…arrow_forwardWhich of the following opens when you click the launcher in the Size group on the Ribbon? Question 19Select one: a. Size dialog box b. Layout dialog box c. Width and Height dialog box d. Format dialog boxarrow_forward
- 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





