Prelude to Programming
6th Edition
ISBN: 9780133750423
Author: VENIT, Stewart
Publisher: Pearson Education
expand_more
expand_more
format_list_bulleted
Question
Chapter 2, Problem 3PC
a)
Program Plan Intro
To find the two’s complement of
b)
Program Plan Intro
To use the formula to convert the number to a 16-bit memory location in binary.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
There 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).
2. Convert the following values to hexadecimal.
а. 38 —
b. 134,, =
c. 1001 0001 =
d. 1011 1101; =
Perform the following additions. The numbers are in binary:
1) 1011
+0001
2) 00101110
+10010010
Repeat problem, this time convert the binary numbers to decimal, then perform the addition of the two decimal numbers. Convert the sum into binary representation and compare the results.
Chapter 2 Solutions
Prelude to Programming
Ch. 2 - Given the number 108, ____________ is the base.Ch. 2 - Given the number 75, _____________ is the...Ch. 2 - When a base is raised to a power of ________, the...Ch. 2 - Prob. 4RECh. 2 - Prob. 5RECh. 2 - Prob. 6RECh. 2 - A floating point number has a(n) ______ part and...Ch. 2 - Prob. 8RECh. 2 - To convert the number 8.396052106 to regular...Ch. 2 - Using exponents, the number 1/1000 is ___________.
Ch. 2 - Prob. 11RECh. 2 - What is the decimal value of the 2 in the...Ch. 2 - Prob. 13RECh. 2 - Prob. 14RECh. 2 - Which of the following is not an integer? a. 5 b....Ch. 2 - Prob. 16RECh. 2 - Prob. 17RECh. 2 - Prob. 18RECh. 2 - Prob. 19RECh. 2 - Prob. 20RECh. 2 - Prob. 21RECh. 2 - To make it easier for a human to read a binary...Ch. 2 - Prob. 23RECh. 2 - Prob. 24RECh. 2 - Prob. 25RECh. 2 - Prob. 26RECh. 2 - The smallest unsigned integer that can be...Ch. 2 - A number system that uses 7 as a base would be...Ch. 2 - Prob. 29RECh. 2 - Prob. 30RECh. 2 - Prob. 31RECh. 2 - Prob. 32RECh. 2 - Prob. 33RECh. 2 - Prob. 34RECh. 2 - Prob. 35RECh. 2 - Prob. 36RECh. 2 - Prob. 37RECh. 2 - Prob. 38RECh. 2 - Prob. 39RECh. 2 - Prob. 40RECh. 2 - Prob. 41RECh. 2 - Prob. 42RECh. 2 - Prob. 43RECh. 2 - Prob. 44RECh. 2 - Prob. 45RECh. 2 - Prob. 46RECh. 2 - Prob. 47RECh. 2 - Prob. 48RECh. 2 - Prob. 49RECh. 2 - Prob. 50RECh. 2 - Prob. 51RECh. 2 - Prob. 52RECh. 2 - Prob. 53RECh. 2 - Prob. 54RECh. 2 - Prob. 55RECh. 2 - Prob. 56RECh. 2 - Prob. 57RECh. 2 - Prob. 58RECh. 2 - Prob. 1PCCh. 2 - Prob. 2PCCh. 2 - Prob. 3PCCh. 2 - Prob. 4PCCh. 2 - Prob. 5PC
Knowledge Booster
Similar questions
- 87 hmands, write the asm code of the operations that will assign the value of r5 = 252 if ro + 4> rl, otherwise the value of r5 = 3. Where X and Y are a natural number, mov ro, # Xd mov ri, # Yd 190100564-967159083 After the 690100471598836 190100564671836 h190100564-71598 !!arrow_forwardAnswer the following as directed. Use only UPPERCASE letters and numbers in your answers and NO SPACE. 1) If you multiply DWORD size hex number 000F4563 by hexadecimal number 100, the result (in DWORD size hex) is: 2) if you subtract BYTE size binary number (01110100 - 00111011) the result (in BYTE size binary) is: DO NOT exclude any leading zeroes and DO NOT include any space in your answers.arrow_forwardConvert the decimal (base 10) number 63 to a binary (base 2) number that has only the digits '0' and '1'. Binary number: (For example, the decimal number 16 is the same as the binary number 10000; the decimal number 13 is the same as the binary number 1101.)arrow_forward
- The following binary sequences are stored in two distinct 16-bit memory locations: A = 10010001 11000111 B = 01111010 11101000 Hint: You can use calculators/tools, but you should show the calculation procedure for each case Find both binary and decimal values of Z=A+B if A, B, and Z are all signed a integers. Find both binary and decimal values of Z=A+B if A, B, and Z are two's b complement numbers. If A and B are two Boolean vectors (vectors in which every element is TRUE or C FALSE), find the outcome of the following bit-wise logical operation: (A&&B)||(!A&&!B). What would be the data type and the corresponding value of Z=A+B (written d in Python) if A and B represent two ASCII Strings (Find ASCII table in appendix). If A represent the first two bytes (network prefix) and B represents the last e two bytes (host suffix) of a class B IPV4 address, find the corresponding IP address.arrow_forwardPerform the multiplication of the following two floating point numbers using the simple floating point format :(-0.75*23)*(-0.625*22) . Do the calculation in base 10 and comment on the accuracy of your calculation. arrow_forwardCreate a 4-bit by 3-bit binary multiplier that multiplies a 4-bit number by a 3-bit number. Note: The 4-bit number should be the multiplicand and the 3-bit number should be the multiplier.arrow_forward
- Complete the following table so that the given 32-bit constant is loaded into $s3. All answers must be in decimal with no commas. Constant 0000 0100 1011 0111 0110 0110 0001 0100 Inst #1 lui $s3, 1207 Inst #2 Answer 1: 1207 Answer 2: 26132 ori $s3, $s3, 26132arrow_forward12. Given the following hamming code, find the 1 error in it and correct it. Hamming code: 1101 1100 1110 01111arrow_forwardFind the internal representation of the integer: 450 (in 32-bit memory location). Please, do not insert any blanks in your answer.arrow_forward
- Any floating-point representation used in a computer can represent only certain real numbers exactly; all others must be approximated. If A' is the stored value approxi- mating the real value A, then the relative error, r, is expressed as A - A' A r = Represent the decimal quantity +0.4 in the following floating-point format: base exponent: biased, 4 bits; significand, 7 bits. What is the relative error? = 2;arrow_forward47 by -18 (integers in decimal (base 10)). Q1 : What is the remainder of the division in FP decimal representation (i.e., if rem=53 then its FP decimal representation is 53.0)? What is the resulting number if you shift it three digits to the right of the decimal point? Express your shifted result as a single precision FP number using the IEEE 754 standard for single precision. YOU MUST FIRST CONVERT THE NUMBER FROM BASE 10 to BASE 2 and then do normalization etc. Do not calculate more than the first 8 fraction bits.arrow_forwardSuppose that we use the floating-point format with 12 decimal digits, SEEEMMMMMMMM, to rep- resent a real number, where S is the digit to represent the sign of the mantissa (use 0 for pos- itive and 5 for negative), EEE are the 3 digits to represent the exponent in excess-500 format, MMMMMMMM are the 8 digits to represent the magnitude of the mantissa, and the decimal point of the mantissa is right to the left of MMMMMMMM (i.e., SEEEMMMMMMMM representing the real number +0.MMMMMMMM × 10EEE-500.) When you use this format to represent a real number, in which scenario an overflow will occur and in which scenarios an underflow may occur?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