Suppose you have 2 N-bit unsigned integers: a, b, c.
To find: Minimum number of bits required to present (a*b)+c, and no overflow should occur.
first perform a*b, here both numbers are N-bit long.
Maximum number of bits required to store multiplication of 2 n-bit numbers = n+n = 2n
Then add c ie (c*b)+c:
Here is the tricky part,
Maximum number that can be represented using N-bits = 2N - 1
Maximum number in decimal that can be obtained by multipliying 2 N-bit numbers = ( 2N-1 ) * ( 2N-1 ) =
=> 22N - 2N - 2N +1 = 22N - 2N+1 +1
Maximum number that can be represented using 2N bits = 22N -1 ....1
When we add another N-bit number in multiplication of 2 N-bit numbers,
Maximum number in decimal of (a*b)+c , all N-bit = 22N - 2N+1 +1 + 2N - 1 = 22N - 2N
Which is less than what we can represent using 2N bits, see eq ...1
So minimum number of bits required to store (a*b)+c without getting overflow = 2N
Suppose you have 3 N-bit unsigned integers: a, b, and c. What is the minimum number...
Given n bits, how many unsigned integers can be represented with the n bits? What is the range of these integers? (6 points) There are 26 characters in the alphabet we use for writing English. What is the least number of bits needed to give each character a unique bit pattern? How many bits would we need to distinguish between upper- and lowercase versions of all 26 characters? (12 points)
7. Convert the following 16 bit unsigned binary integers to Hex. a) 1000111000011011 b) 0011110011110001 c) 1110010110100101 8. Convert the following 3 “digit” Hex unsigned integers to 12-bit unsigned binary integers. a) F3B b) 1CD c) 9AE
What is the minimum bit-machine among the following is enough to store the unsigned integer 247: (a) 4-bit (b) 32-bit (c) 8-bit (d) 16-bit Explain your answer
10.11 (Left Shifting Integers ) Left shifting an unsigned int by 1 bit is equivalent to multiplying the value by 2. Write function power2 that takes two integer arguments number and pow and calculates number * 2pow. You should declare pow as an unsigned integer , but remember that the result may be a negative value . Use the shift operator to calculate the result. Print the values as integers and as bits . Assume that an integer is of...
Design a circuit with three inputs representing an unsigned 3-bit int, N. Also representing bits of an unsigned 3 bit number M where M=(N+2) mod 8. Please show your truth table, Boolean function for the above circuit and the final circuit using only OR, AND And NOT
Given the following 16 bit numbers: A.) 0x8FFF B.) 0x1000 C.) Ox00FO D.) 0x0888 E.) 0xC000 F) 0x9000 . If the numbers are unsigned integers rank them from smallest to larest )rank them from smallest to largest 10. If the above number are signed integers (2's complement 11Acomputer has a 16 bit address field,is byte addressable, the word length is also 16 bits, 32 lines of direct mapped cache and each line of cache holds 8 bytes. A.) How many...
2. Perform the following binary multiplications, assuming unsigned integers: B. 10011 x 011 C. 11010 x 1011 3. Perform the following binary divisions, assuming unsigned integers: B. 10000001 / 101 C. 1001010010 / 1011 4. Assume we are using the simple model for floating-point representation as given in the text (the representation uses a 14-bit format, 5 bits for the exponent with a bias of 16, a normalized mantissa of 8 bits, and single sign bit for the number ):...
(3 pts) Consider an unsigned fixed point decimal (Base10) representation with 8 digits, 5 to the left of the decimal point and 3 to the right. a. What is the range of the expressible numbers? b. What is the precision? c. What is the error? ______________________________________________________________________________ (3 pts) Convert this unsigned base 2 number, 1001 10112, to each base given below (Note: the space in the binary string is purely for visual convenience) Show your work. Using...
ints) The following questions pertain to machine numbers (a) (2 points) For an 8-bit unsigned integer, what is the decimal equivalent of 10010101? (b) (3 points) For an S-bit signed integer, what is the decimal equivalent for the 2's compliment of 11010101? (c) (5 points) Consider an 8-bit floating point number like the one in Homework A2 (one sign bit, three exponent bits, and four assignable mantissa bits), what is the floating point number that associates with 01101 1001? ints)...
computer architecture The sum of the two 32 bit integers may not be representable in 32 bits. In this case, we say that an overflow has occurred. Write MIPS instructions that adds two numbers stored in registers Ss1 and Ss2, stores the sum in register $s3, and sets register Sto to 1 if an overflow occurs and to 0 otherwise. 5. (16pts) 6. Show the IEEE 754 binary representation of the number -7.425 in a single and double 7. If...