Computer Science: An Overview (13th Edition) (What's New in Computer Science)
13th Edition
ISBN: 9780134875460
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
Two friends are exchanging messages through regular post mail. They don’t want anyone to understand their messages in case anyone read them. The messages are in the form of an array of characters, where each character has a numeric value as illustrated in the below lookup table.
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…
Chapter 1 Solutions
Computer Science: An Overview (13th Edition) (What's New in Computer Science)
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 - Design a sequence of steps that correctly...Ch. 1.2 - How many bits would be in the memory of a computer...
Ch. 1.3 - Prob. 1QECh. 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
- 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++ languagearrow_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 match,…arrow_forwardThe 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_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_forwardThe statement below is correct in at least one number system (besides base-1). That is, the statement is correct if we assume the numbers are expressed in a base other than 10. It is up to you to find out 2 Which number base makes each statement correct? You need to justify your answer by converting the numbers in each operation to base 10 and showing that the statement is correct. For example, 36/6 = 7 is clearly not correct in base 10 but it is correct in base 12 because 3612 =4210 and 4210/610 = 710. Thus, 3612/612 = 712 is true. 140 x 3 / 102 = 10arrow_forwardWrite a calculator conversion program in Python that converts: A binary number into a hexadecimal number. A hexadecimal number into a binary number. The calculator should be able to handle 16 bits.arrow_forward
- Can someone please write out the code for a Mips program that calculates the nth root of any number? I did get the formula from someone here, which I am so grateful for, but I still do not understand how to get it into working code. I am new at trying to learn this and I'm doing it by myself so there is so much to know, so I sort of need it spelled out for this one. Thanks much!arrow_forwardPart 2: Sequential Multiplier 1. You are asked to multiply two binary numbers using the sequential multiplier discussed in the class. These two binary numbers are 1101, and 10001. a. Show your work for multiplication, step by step. b. How many bits do you need to store the result?arrow_forwardIn HexWorld, instead of the decimal (base 10) number system we are used to, the hexadecimal numbersystem is used. The hexadecimal number system uses base 16 with digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E,F, (where A is 10, B is 11, C is 12, D is 13, E is 14, F is 15). To communicate with HexWorld when numbers areinvolved, we are asking you to help us by coding a Python program, in a file called convert_hex.py, torepeatedly request a positive decimal number from the user and output the hexadecimal value until there areno more decimal values to be converted. We will assume there are no negative values to be converted.To compute the hexadecimal value we have to find the hexadecimal digits hn, hn-1, hn-2, ..., h2, h1, and h0, suchthatdec_value = hn x 16n + hn-1 x 16n-1 + hn-2 x 16n-2 + ... + h2 x 162 + h1 x 161 + h0 x 160These hexadecimal digits can be found by successively dividing dec_value by 16 until the quotient is 0; theremainders are h0, h1, ..., hn-1, hn.For example, if…arrow_forward
- Reversible operations with XOR:Often it is nice to be able to invert the bits in a value in a way that they are easily translated back to the original value. Inverting the bits and restoring them is shown in the program below. One use of this is to swap two values without using a temporary storage space. give assembly code to implement itarrow_forwardSuppose the block size of the cache in the processor is 4096 bytes. The ASCII value of the characters 'a' through 'z' is 97 through 122. Suppose previously array2[99*4096] was loaded into the cache. Now we write a program that accesses array2[k*4096] and measures the time it takes to access the value, with k varying from 97 to 122. Why can you expect the access time to array2[k*4096] be lower for k=99 than others?arrow_forwardImplement a program to convert a decimal number to binary, octal, or hexadecimal format.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