Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Convert the decimal number -2.65625_10 to binary. What is the binary representat

ID: 3664901 • Letter: C

Question

Convert the decimal number -2.65625_10 to binary. What is the binary representation and how many bits do you need? Convert the decimal number +O.8_10 to binary. What is the binary representation and how many bits do you need? What is the smallest and largest unsigned integer that can be represented with 8 bits (= 1 byte)? In the following, show how you arrive at your answer: Using the information in the notebook 04-numbers-and-errors.ipynb and the representation (-1)^8*2^e-1023*1.f, derive the largest value that can be represented with an IEEE 754 double floating point number. For the smallest (in absolute value), non-zero IEEE 754 double numbers, e = 0 and the value is defined as (-1)^8*2^e-1022*0.f. What is the smallest non-zero, absolute value that an IEEE double can represent? BONUS: Determine experimentally the machine precision for numpy 128-bit floats (dtype=np. floatl28). Show your code and result.

Explanation / Answer

a) binary conversion of -2.65625 is 11111111111111111111111111111111111.

binary representation contains 2 bits. and gere the answer will be 11.

  

  Binary describes a numbering scheme in which there are only two possible values for each digit: 0 and 1.

The term also refers to any digital encoding/decoding system in which there are exactly two possible states.

In digital data memory, storage, processing, and communications, the 0 and 1 values are sometimes called "low" and "high," respectively.

b) binary representation of +0.8 is 00000000.

for binary representation we need 2 bits i.e., 00.

c) The largest unsigned integer is 9223372036854775807.

the largest unsigned integer represented with 8 bits is 92233720

the binary representation of the above said unsigned integer is 101011111110110000000000010

the smallest unsigned integer represented with 8 bits is 9223

the binary representation of 9223 is   0010010000000111