Question

In: Electrical Engineering

Which of the following number formats can be used to represent all integers in the range...

Which of the following number formats can be used to represent all integers in the range 0 to 4,294,967,295?

A) unsigned integer (32 bits)

B) sign magnitude (32 bits)

C) two's complement (32 bits)

D) floating point format (IEEE754 single precision)

Solutions

Expert Solution

(a) Unsigned Integer (32 bit)

For unsigned Integer repesentation using n bits , the range of numbers that can be represented is 0 to 2n-1.

For example, if we have two bits, then we can represent 0 to 3.

If we have four bits, we can represent 0 to 15.

And if we have 32 bits we can represent 0 to 232-1 i.e., 0 to 4294967295. Hence this representation can be ised.

(B) Sign Magnitude 32 bits.

In this , if we have n bits, the MSB bit is used to represent the sign and the rest n-1 bits are used to represent the magnitude. i.e., here we have 31 bits to represent magnitude. The range is - (2n-1-1)to  + (2n-1-1). The maximum positive value that can be represented using 32 bits is 2147483647. Hence this representation cannot be used.

(C) Two's complement 32 bit

The range of numbers that can be represented using n bit 2's complement is
-( 2n-1) to 2n-1 - 1

Hence this representation also cannot be used. As it would not give the complete needed range.

(D) IEEE754 single precision representation

IEEE 754 32-bit base-2 floating-point variable has a maximum value of (2 ? 2?23) × 2127 ? 3.402823 × 1038. All integers with 6 or fewer significant decimal digits, and any number that can be written as 2n such that n is a whole number from -126 to 127, can be converted into an IEEE 754 floating-point value without loss of precision. Hence this can be used.


Related Solutions

Are used to represent the charge of an ion. Represent the number of element/units in a...
Are used to represent the charge of an ion. Represent the number of element/units in a molecule. Are use as symbols to identify elements. Are used to represent the ratios of reactants in a chemical equation. 1. Subscripts 2. Coefficients 3. Superscripts 4. Capital and lower case letters.
Program Name: Divisible. Write a program that calculates the number of integers in a range from...
Program Name: Divisible. Write a program that calculates the number of integers in a range from 1 to some user-specified upper bound that are divisible by 3, the sum of those integers, and the number and sum of those integers not divisible by 3. Your program must display meaningful output which includes: the selected upper bound number of integers divisible by 3 sum of integers divisible by 3 number of integers not divisible by 3 sum of integers not divisible...
which of the following formats should be used when an SOP includes multiple decision-making steps?
which of the following formats should be used when an SOP includes multiple decision-making steps?
Given an array A[1..n] of integers - all of whose numbers are in the range [0,...
Given an array A[1..n] of integers - all of whose numbers are in the range [0, n^3 − 1] give an algorithm which sorts them in O(n) time.
Explain all the available types of diagrams that can be used to represent object interactions. Your...
Explain all the available types of diagrams that can be used to represent object interactions. Your explanation should include the characteristics of these diagrams and its main purpose Subject : Object Oriented Analaysis and Design
Consider all positive integers less than 100. Find the number of integers divisible by 3 or...
Consider all positive integers less than 100. Find the number of integers divisible by 3 or 5? Consider strings formed from the 26 English letters. How many strings are there of length 5? How many ways are there to arrange the letters `a',`b', `c', `d', and `e' such that `a' is not immediately followed by`e' (no repeats since it is an arrangement)?
Which number set can you find: a. the inverse of integers under multiplication? b. the inverse...
Which number set can you find: a. the inverse of integers under multiplication? b. the inverse of natural numbers under multiplication?
Describe how molecular models may be used to represent a range of molecules of different shapes.
Describe how molecular models may be used to represent a range of molecules of different shapes.
Explain how molecular models may be used to represent a range of molecules of different shapes.
Explain how molecular models may be used to represent a range of molecules of different shapes.
For all integers n > 2, show that the number of integer partitions of n in...
For all integers n > 2, show that the number of integer partitions of n in which each part is greater than one is given by p(n)-p(n-1), where p(n) is the number of integer partitions of n.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT