The maximum value represented in a 32-bit unsigned word is 232-1 = 4,294,967,295, so you can represent all numbers with 9 decimal places and some numbers with 10 decimal places in 32-bits. log(232-1) = 9.632959861 is the true answer.
The previous number!
111100002 equals 24010 using unsigned notation. It equals -1610 using signed notation.
127 -128
No, there is no smallest decimal number. Decimal numbers represent real numbers and between any two real numbers there are infinitely many other real numbers. So, there are infinitely many decimal numbers between 0 and your 1.21: each one will be smaller than 1.21
8 (assuming unsigned numbers - i.e., you don't reserve a bit for the sign).
The maximum value represented in a 32-bit unsigned word is 232-1 = 4,294,967,295, so you can represent all numbers with 9 decimal places and some numbers with 10 decimal places in 32-bits. log(232-1) = 9.632959861 is the true answer.
If it is unsigned representation (meaning high bit is not sign bit) then it is 7F which has a decimal equivalent of 127. If it is a signed number (meaning high bit is sign bit) then numbers range from decimal -64 to +63
0.863 is the largest decimal you can make with these numbers:)
The previous number!
The processor makes no difference in C programming -- the compiler will generate the appropriate instructions for you. To find the largest number in a sequence of numbers, store the numbers in an array. Then invoke the following function, passing the array and its length: unsigned largest (double* num_array, unsigned size) { if (!num_array !size) return size; unsigned max = 0; unsigned index; for (index=1; index<size; ++index) if (num_array[index]>num_array[max]) max = index; return max; } The return value holds the index of the largest value in the array.
We need signed integers in order to represent both negative and positive values. However, some numbers can never be negative. For instance, the size of a file must always be greater than or equal to zero so we use unsigned integers to represent file sizes. Also, natural numbers must be greater than 0 so there's no point in using a signed value to represent a natural number. Signed integers also use one bit to denote the sign, but unsigned integers do not thus unsigned integers can effectively represent twice the range of positive values than an unsigned integer can. For instance, an 8-bit signed value can represent values in the range -128 to +127 using twos complement notation, but an 8-bit signed value can represent values in the range 0 to 255.
No. Java uses no unsigned numbers.
Among the four decimal numbers given 0.34 is the largest number.
111100002 equals 24010 using unsigned notation. It equals -1610 using signed notation.
Decimal numbers are real numbers. In C and C++ we use the float, double and long double data types to represent real numbers.
127 -128