Computer Science: An Overview (12th Edition)
12th Edition
ISBN: 9780133760064
Author: Glenn Brookshear, Dennis Brylow
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
Chapter 1, Problem 58CRP
Program Plan Intro
Python is defined as the object oriented
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
The binary string 11001111101001 is a floating-point number expressed using the 14-bit simple model given in your text. What
is its decimal equivalent?
Note: in the 14-bit simple model, the left-most bit is the sign, followed by 5 bits for the exponent, followed by 8 bits for the mantissa
(There are no implied bits). The exponent is in Excess 15 notation.
Our everyday number system in the UK and many other parts of the world is a base-10 system using Arabic numerals, namely the digits 0, 1, 9. Integers larger than
9 are represented by sequences of these elementary numerals. The numerical value encoded by such a sequence is determined by multiplying each numeral by 10k,
where k is the position of the numeral counted from the back and starting at zero, and then summing together the contributions from all numerals. For example,
5207 = 5 × 10³ +2×10² +0×10¹ + 7×10⁰
The built-in int function in Python can take a string (type str) representing such a number and convert it to a Python integer (type int). Write a similar function
base14_convert that takes a string and converts it to a Python integer according to the following number system:
• the base is 14, i.e., the individual digits have to be multiplied by powers of 14 to obtain the numerical value;
digits are represented by lower-case letters 'a', 'b', 'c', 'd', ..., i.e., 'a' is…
Make a program to convert a number from decimal notation to a number expressed in a number system whose base (or radix) is a number between 2 and 9. The conversion is performed by repetitious division by the base to which a number is being converted and then taking the remainders of division in the reverse order. For example, in converting to binary, number 6 requires three such division: 6/2=3 remainder 0, 3/2 =1 remainder 1, and finally, 1/2=0 remainder 1. The remainders 0, 1 and 1 are put in the reverse order so that the binary equivalent of 6 is equal to 110. Modify your program so that it can perform a conversion in the case when the base is a number between 11 and 27. Number system with bases greater than 10 require to 1A in hexadecimal notation since 26/16=1 remainder 10 (that is, A) and 1/16=0 remainder 1.
Note:
solve as soon as possible
use c++ language
Chapter 1 Solutions
Computer Science: An Overview (12th Edition)
Ch. 1.1 - What input bit patterns will cause the following...Ch. 1.1 - In the text, we claimed that placing a 1 on the...Ch. 1.1 - Assuming that both inputs to the flip-flop in...Ch. 1.1 - a. If the output of an AND gate is passed through...Ch. 1.1 - Prob. 5QECh. 1.1 - Prob. 6QECh. 1.2 - If the memory cell whose address is 5 contains the...Ch. 1.2 - Prob. 2QECh. 1.2 - How many bits would be in the memory of a computer...Ch. 1.3 - Prob. 1QE
Ch. 1.3 - Prob. 2QECh. 1.3 - Prob. 3QECh. 1.3 - Prob. 4QECh. 1.3 - Prob. 5QECh. 1.3 - Prob. 6QECh. 1.4 - Here is a message encoded in ASCII using 8 bits...Ch. 1.4 - In the ASCII code, what is the relationship...Ch. 1.4 - Prob. 3QECh. 1.4 - Prob. 4QECh. 1.4 - Convert each of the following binary...Ch. 1.4 - Prob. 6QECh. 1.4 - What is the largest numeric value that could be...Ch. 1.4 - An alternative to hexadecimal notation for...Ch. 1.4 - What is an advantage of representing images via...Ch. 1.4 - Prob. 10QECh. 1.5 - Convert each of the following binary...Ch. 1.5 - Convert each of the following base ten...Ch. 1.5 - Convert each of the following binary...Ch. 1.5 - Express the following values in binary notation:...Ch. 1.5 - Perform the following additions in binary...Ch. 1.6 - Convert each of the following twos complement...Ch. 1.6 - Prob. 2QECh. 1.6 - Suppose the following bit patterns represent...Ch. 1.6 - Suppose a machine stores numbers in twos...Ch. 1.6 - In the following problems, each bit pattern...Ch. 1.6 - Prob. 6QECh. 1.6 - Prob. 7QECh. 1.6 - Prob. 8QECh. 1.6 - Prob. 9QECh. 1.6 - Prob. 10QECh. 1.6 - Prob. 11QECh. 1.7 - Prob. 1QECh. 1.7 - Prob. 3QECh. 1.7 - Prob. 4QECh. 1.8 - What makes Python an interpreted programming...Ch. 1.8 - Write Python statements that print the following:...Ch. 1.8 - Write Python statements to make the following...Ch. 1.8 - Write a Python statement that given an existing...Ch. 1.9 - Prob. 1QECh. 1.9 - Prob. 2QECh. 1.9 - Prob. 3QECh. 1.9 - Prob. 4QECh. 1.9 - Prob. 5QECh. 1.9 - Prob. 6QECh. 1.9 - Prob. 7QECh. 1.10 - Prob. 1QECh. 1.10 - Could errors have occurred in a byte from Question...Ch. 1.10 - Prob. 3QECh. 1.10 - Prob. 4QECh. 1.10 - Prob. 5QECh. 1.10 - Prob. 6QECh. 1 - Determine the output of each of the following...Ch. 1 - a. What Boolean operation does the circuit...Ch. 1 - a. If we were to purchase a flip-flop circuit from...Ch. 1 - Assume that both of the inputs in the following...Ch. 1 - The following table represents the addresses and...Ch. 1 - How many cells can be in a computers main memory...Ch. 1 - Prob. 7CRPCh. 1 - Prob. 8CRPCh. 1 - Prob. 9CRPCh. 1 - Prob. 10CRPCh. 1 - Suppose a picture is represented on a display...Ch. 1 - Prob. 12CRPCh. 1 - Prob. 13CRPCh. 1 - If each sector on a magnetic disk contains 1024...Ch. 1 - How many bytes of storage space would be required...Ch. 1 - Prob. 16CRPCh. 1 - Prob. 17CRPCh. 1 - Suppose a typist could type 60 words per minute...Ch. 1 - Prob. 19CRPCh. 1 - Prob. 20CRPCh. 1 - Prob. 21CRPCh. 1 - Prob. 22CRPCh. 1 - Prob. 23CRPCh. 1 - Prob. 24CRPCh. 1 - Prob. 25CRPCh. 1 - Prob. 26CRPCh. 1 - Prob. 27CRPCh. 1 - Prob. 28CRPCh. 1 - Prob. 29CRPCh. 1 - Prob. 30CRPCh. 1 - Prob. 31CRPCh. 1 - Prob. 32CRPCh. 1 - Prob. 33CRPCh. 1 - Prob. 34CRPCh. 1 - Prob. 35CRPCh. 1 - Prob. 36CRPCh. 1 - Prob. 37CRPCh. 1 - Prob. 38CRPCh. 1 - Prob. 39CRPCh. 1 - Prob. 40CRPCh. 1 - Prob. 41CRPCh. 1 - Prob. 42CRPCh. 1 - Prob. 43CRPCh. 1 - Prob. 44CRPCh. 1 - Prob. 45CRPCh. 1 - What would be the hexadecimal representation of...Ch. 1 - Prob. 47CRPCh. 1 - Prob. 48CRPCh. 1 - Prob. 49CRPCh. 1 - Prob. 50CRPCh. 1 - Prob. 51CRPCh. 1 - Prob. 52CRPCh. 1 - Prob. 53CRPCh. 1 - Prob. 54CRPCh. 1 - Prob. 55CRPCh. 1 - Prob. 56CRPCh. 1 - Prob. 57CRPCh. 1 - Prob. 58CRPCh. 1 - Write and test a Python script that, given a...Ch. 1 - Prob. 61CRPCh. 1 - Prob. 2SICh. 1 - Prob. 3SICh. 1 - Prob. 4SICh. 1 - Prob. 5SICh. 1 - Prob. 6SICh. 1 - Prob. 7SI
Knowledge Booster
Similar questions
- The Ministry of Home Affairs and Immigration would like to introduce an automated id number and passport generation system. The system takes into consideration the following: a) To generate the id number it takes two last digits from the Year of birth, two digits for the month of birth plus two digits for the date of birth, then finally adds a five-digit postfix number. b) To generate the passport is similar, the system takes the first part from the id number with the year, month and date then it adds the "P-NAM" prefix and finally adds the last two digits from the id number's five-digit postfix number Your task is to create a program that can achieve the above requirements when given the person's first name, date of birth(format YYYY-MM-DD) and five-digit postfix through CMD arguementsarrow_forwardA barcode scanner for Universal Product Codes (UPCs) verifies the 12-digit code scanned by comparing the code's largest digit (called a check digit) to its own computation of the check digit from the first 11 digits as follows: 1. Calculate the sum of the digits in the odd-numbered positions (the first, third,..... eleventh digits) and multiply this sum by 3. 2. Calculate the sum of the digits in the even-numbered position (the second, fourth....tenth digits) and add this to the previous result. 3. If the last digit of the result from step 2 is 0, then 0 is the check digit. Otherwise, subtract the last digit from 10 to calculate the check digit. 4. If the check digit matches the final digit of the 12-digit UPC, the UPC is assumed correct By using C++ write a program that prompts the user to enter the 12 digits of a barcode separated by space. The program should store the digits in an integer array, calculate the check digit, and compare it to the final barcode digit. If the digits…arrow_forwardConvert the decimal number -43.68 to a floating-point number expressed in the 14-bit simple model given in your textbook. Note: in the 14-bit simple model, the left-most bit is the sign, followed by 5 bits for the exponent, followed by 8 bits for the mantissa (There are no implied bits). The exponent is in Excess 15 notation. 101011.1010arrow_forward
- The binary string 01001111001110 is a floating-point number expressed using the 14-bit simple model given in your text. What s its decimal equivalent? Note: in the 14-bit simple model, the left-most bit is the sign bit, followed by 5 bits for the exponent, followed by 8 bits for the mantissa (There are no implied bits). The exponent is in Excess 15 notation.arrow_forwardDroids on the planet Tatooine perform calculations in base-6. What is the largest base-6 number that can be represented with three distinct digits? (Each digit in your base-6 number must be different.) Convert your answer to decimal (base-10).arrow_forwardAnswer the given question with a proper explanation and step-by-step solution. Qns: Write a Little Man program that adds a column of input values and produces the sum as output. The first input value will contain the number of values that follow as input to be added.arrow_forward
- 2. The computer in mars has a fivenary memory - that is each location can hold a frit value, with a frit holding 0, 1, 2, 3, or 4. How many frits are needed to hold a 6-octal_bit number. Give an expression for the number of frits to hold n octal bits.arrow_forwardThere are 2 numbers, X and Y in single-precision floating point representations. X=45B20000 and Y=B66C0000. Perform the multiplication operation on the two numbers using the floating-point number multiplication algorithm (the result is still in the floating-point format). Then convert each of them: X, Y and the results to a decimal number (fixed point).arrow_forwardOn the planet Tatooine, droids do computations in base-6. What is the greatest base-6 number with three different digits? (Your base-6 number must have a separate digit for each digit.) Make a decimal out of your answer (base-10).arrow_forward
- Below is a text written entirely in binary. Your goal is to convert this to English using the ASCII. Consider the asterisks (*) as word separators. For clarity, the punctuation marks have not been converted to their ASCII values. 1000010 1100101 1100110 1101111 1110010 1100101 *1101000 1100101 *1100011 1101111 1110101 1101100 1100100 *1110011 1100001 1111001 *1100001 1101110 1111001 1110100 1101000 1101001 1101110 1100111, *"1010011 1110100 1100101 1110110 1100101, *1110100 1101000 1101001 1110011 *1101000 1100001 1110011 *1100111 1101111 1110100 *1110100 1101111 *1110011 1110100 1101111 1110000.arrow_forwardChallenge: Use MIPS(MARS) to create a program that takes an 8-bit binary number and returns it as a binary-coded decimal (BCD).arrow_forwardWhat is the character string corresponding to the following ASCII codes?0x2a2a2a2a 0x69644120 0x4120736f 0x6f67696d 0x48202d20 0x20657661(Hint – Remember that for simulations running on Intel–based platforms, the charactersare stored in reverse order within each word.)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