DOC PREVIEW
UTD CS 6363 - Assignment

This preview shows page 1 out of 3 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 3 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 3 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Answer a :FEED(Hex)=1111,1110,1110,1101(binary)=1111,1110,1110,1101−1=1111,1110,1110,1100→(inverse)−0000,0001,0001,0011=1×28+0×27+0×26+0×25+1×24+0×23+0×22+1×21+1×20=−(256+16+2)=−275(decimal)Answer b:BAD1(Hex)=1011,1010,1101,0001(binary)=1011,1010,1101,0001−1=1011,1010,1101,0000→(inverse)−(0100,0101,0010,1111)=−(1×214+1×210+1×28+1×25+1×23+1×22+1×21+1×20)=−(16384+1024+256+32+8+4+2+1)=−17711(decimal)Answer c:2DAD(Hex)=0010,1101,1010,1101(binary)=1×213+1×211+1×210+1×28+1×27+1×25+1×23+1×22+1×20=8192+2048+1024+256+128+32+4+1=11685(decimal)Answer a:1954(decimal)=(0000,0000,0000,0000,0000,0111,1010,0010)→1111,1111,1111,1111,1111,1000,0101,1110(−195410)=FFFF,F85E(Hex)Answer b:15343(decimal)=0000,0000,0000,0000,0011,1011,1110,1111=00003BEF(Hex)Answer a:The first step, we find that this floating point is negative, so S=1. And then, we convert the 0.1875to 1.5×2−3.After that, we convert the 0.5 to F=100,0000,0000,0000,0000,0000 fraction part and the Exponent part for this case is 127−3=12410=0111,11002.So in conclusion:S=1E=0111,1100F=100,0000,0000,0000,0000,0000Answer b:The first step, we find that this floating point is negative, so S=0. And then, we convert the 0.46875to 1.875×2−2. After that, we convert the 0.875 to F=110,0000,0000,0000,0000 and the Exponent part for this case is 127−2=12510=0111,11012.So in conclusion:S=0E=0111,1101F=110,0000,0000,0000,0000Answer a: For the first step, we convert the Hexadecimal to binary which is 0011,1111,0100,0000,0000,0000,0000,0000. After this, we separate three section.0|011,1111,0|100,0000,0000,0000,0000,0000. We can indicate that this is the positive decimal number, since the first sign section number is 0. For the exponent section we have 0111,1110 which stand for decimal 12610. So this is the power of 126−127=−1. Since the actual fraction is1.100,0000,0000,0000,0000,0000=1+1×2−1=1.510.So the actual decimal is 1.5×2−1=0.75Answer B:For the first step, we convert the Hexadecimal to binary which is 1011,1110,0000,0000,0000,0000,0000,0000. After this, we separate three section.1|011,1110,0|000,0000,0000,0000,0000,0000. We can indicate that this is a negative decimal number, since the first sign section number is 1. For the exponent section we have 0111,1100 which stand for decimal 12410. So this is the power of 124−127=-3. Since the actual fraction is1.000,0000,0000,0000,0000,0000=12=110. So the actual decimal is −1×2−3=−0.25.1. Assuming integers are represented as 16-bit words and negative numbers are represented using the 2's complement representation, convert the following hexadecimal numbers to decimal numbers (show your work).a. FEED, b. BAD1, c. 2DADAnswer a :FEED(Hex)=1111,1110,1110,1101(binary)=1111,1110,1110,1101−1=1111,1110,1110,1100→(inverse)−0000,0001,0001,0011=1×28+0×27+0×26+0×25+1×24+0×23+0×22+1×21+1×20=−(256+16+2)=−275(decimal)Answer b:BAD1(Hex)=1011,1010,1101,0001(binary)=1011,1010,1101,0001−1=1011,1010,1101,0000→(inverse)−(0100,0101,0010,1111)=−(1×214+1×210+1×28+1×25+1×23+1×22+1×21+1×20)=−(16384+1024+256+32+8+4+2+1)=−17711(decimal)Answer c:2DAD(Hex)=0010,1101,1010,1101(binary)=1×213+1×211+1×210+1×28+1×27+1×25+1×23+1×22+1×20=8192+2048+1024+256+128+32+4+1=11685(decimal)2. Assuming integers are represented as 32-bit words and negative numbers are represented using the 2's complement representation, convert the following decimal numbers to hexadecimal numbers (show your work).a. -1954, b. 15343Answer a:1954(decimal)=(0000,0000,0000,0000,0000,0111,1010,0010)→1111,1111,1111,1111,1111,1000,0101,1110(−195410)=FFFF,F85E(Hex)Answer b:15343(decimal)=0000,0000,0000,0000,0011,1011,1110,1111=00003BEF(Hex)3. Represent following floating point numbers in IEEE single-precision (32-bit) format:a. -0.1875, b. 0.46875Answer a:The first step, we find that this floating point is negative, so S=1. And then, we convert the 0.1875to 1.5×2−3.After that, we convert the 0.5 to F=100,0000,0000,0000,0000,0000 fraction part and the Exponent part for this case is 127−3=12410=0111,11002.So in conclusion:S=1E=0111,1100F=100,0000,0000,0000,0000,0000Answer b:The first step, we find that this floating point is negative, so S=0. And then, we convert the 0.46875to 1.875×2−2. After that, we convert the 0.875 to F=110,0000,0000,0000,0000 and the Exponent part for this case is 127−2=12510=0111,11012.So in conclusion:S=0E=0111,1101F=110,0000,0000,0000,0000Show the steps done to reach the answer for each (i.e. how to get the S-bit, the exponent, and the fraction field of the answer).4. What is the decimal value of the following IEEE single-precision (32-bit)floating point numbers (which are shown in hexadecimal)?a. 3F400000, b. BE000000Answer a: For the first step, we convert the Hexadecimal to binary which is 0011,1111,0100,0000,0000,0000,0000,0000. After this, we separate three section.0|011,1111,0|100,0000,0000,0000,0000,0000. We can indicate that this is the positive decimal number, since the first sign section number is 0. For the exponent section we have 0111,1110 which stand for decimal 12610. So this is the power of 126−127=−1. Since the actual fraction is1.100,0000,0000,0000,0000,0000=1+1×2−1=1.510.So the actual decimal is 1.5×2−1=0.75Answer B:For the first step, we convert the Hexadecimal to binary which is 1011,1110,0000,0000,0000,0000,0000,0000. After this, we separate three section.1|011,1110,0|000,0000,0000,0000,0000,0000. We can indicate that this is a negative decimal number, since the first sign section number is 1. For the exponent section we have 0111,1100 which stand for decimal 12410. So this is the power of 124−127=-3. Sincethe actual fraction is1.000,0000,0000,0000,0000,0000=12=110. So the actual decimal is −1×2−3=−0.25.Show the steps done to reach the answer for each.Note: Do NOT omit the leading zeros (0s) in your


View Full Document

UTD CS 6363 - Assignment

Documents in this Course
Load more
Download Assignment
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Assignment and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Assignment 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?