Jump to content

Recommended Posts

Posted

Hello

I've been asked to help out with Yr13 Computer Science - alas my theory is "rusty" to say the least. I've followed an example; all numbers below use the last 4 bits as the exponent:

 

0110 00 0001

-

0101 00 0010

 

after transforming the 'first' float to have a common exponent of 2 (giving 0011 00 0010), apply Two's complement to the second number (1011 00 0010) to make it negative so that we can "add" a positive and a negative to do subtraction, the example gets

 

1110 00 0010 as an answer, which I agree with; if we apply Two's complement and convert back we would get an answer of -1 in denary, which is correct.

 

However, the example takes 1110 00 0010 and "normalises" it... fine, I can see we need to shift the Mantissa two columns and adjust the exponent accordingly, this gives:

 

1000 00 0000    which I 'agree' with with the proposed Normalisation. Problem: how on earth does 1000 00 0000 map to the 'correct' answer of -1 for the subtraction? No matter what I do, I can't get it to convert to -1 in denary. Clearly applying "Two's complement" to this negative binary as first step just yields the same thing back again. Any ideas what I'm missing as to how the final answer equates to -1? Thanks to anyone who can remember this stuff

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...