niclawrence01
Badges: 10
Rep:
?
#1
Report Thread starter 6 months ago
#1
I got part b of this question wrong in my test. I didn't know how to work it out so I guessed. Can anyone explain how to get the right answer? Name:  image-22f571ba-8cfc-40ce-947e-f6dc46df00f56233193922146883965-compressed.jpg.jpeg
Views: 23
Size:  54.3 KB
I feel like it's meant to be 00000001 in the mantissa and 1000 in the exponent. I don't have a method tbh. I just tried to get the most negative exponent and the smallest number in the mantissa. Am I on the right track?
Last edited by niclawrence01; 6 months ago
0
reply
winterscoming
Badges: 19
Rep:
?
#2
Report 6 months ago
#2
The exponent in floating-point arithmetic doesn't use two's complement, instead, the exponent is already negative-biased. Therefore unlike two's complement, the smallest possible negative exponent is represented by all-zeroes in binary.

So the smallest possible value that can be stored using a 4-bit exponent would be represented by decimal -7 which is binary 0000

There's not really any method to answering that question though - it's just a matter of whether or not you understand that the exponent is negative-biased.

However, you're right that the mantissa would be binary 00000001 which is a decimal value of 2^(-8).

(and together, those would give you a decimal value of 2^(-8) * 2^(-7) which of course is equal to 2^(-15).)
0
reply
niclawrence01
Badges: 10
Rep:
?
#3
Report Thread starter 6 months ago
#3
(Original post by winterscoming)
The exponent in floating-point arithmetic doesn't use two's complement, instead, the exponent is already negative-biased. Therefore unlike two's complement, the smallest possible negative exponent is represented by all-zeroes in binary.

So the smallest possible value that can be stored using a 4-bit exponent would be represented by decimal -7 which is binary 0000

There's not really any method to answering that question though - it's just a matter of whether or not you understand that the exponent is negative-biased.

However, you're right that the mantissa would be binary 00000001 which is a decimal value of 2^(-8).

(and together, those would give you a decimal value of 2^(-8) * 2^(-7) which of course is equal to 2^(-15).)
Can you explain how 0000 is - 7 please?
0
reply
winterscoming
Badges: 19
Rep:
?
#4
Report 6 months ago
#4
(Original post by niclawrence01)
Can you explain how 0000 is - 7 please?
It's negative-biased, and based on the smallest possible number which can be represented with a signed 4-bit exponent which is -7

I.e. instead of using binary to count from zero upwards, binary is used to count from -7 upwards.

So:
0000 is -7.
0001 is -6
0010 is -5
0011 is -4
etc.
Last edited by winterscoming; 6 months ago
0
reply
niclawrence01
Badges: 10
Rep:
?
#5
Report Thread starter 6 months ago
#5
OK thanks for the help
0
reply
X

Quick Reply

Attached files
Write a reply...
Reply
new posts
Back
to top
Latest
My Feed

See more of what you like on
The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

Personalise

University open days

  • Bishop Grosseteste University
    Undergraduate Open Day Undergraduate
    Fri, 15 Nov '19
  • University of Hertfordshire
    All Subjects Undergraduate
    Sat, 16 Nov '19
  • University of Roehampton
    General Open Day Undergraduate
    Sat, 16 Nov '19

People at uni: do initiations (like heavy drinking) put you off joining sports societies?

Yes (117)
63.59%
No (67)
36.41%

Watched Threads

View All