2 Replies - 4035 Views - Last Post: 23 September 2012 - 08:28 PM

#1 totgeburt  Icon User is offline

  • D.I.C Head

Reputation: 57
  • View blog
  • Posts: 227
  • Joined: 03-August 11

help with representing negative integers

Posted 23 September 2012 - 03:30 PM

i just started a computer architecture class. i feel really shaky on representing negative numbers in octal, hex and binary floating point. could you glance over my answers to see if i'm right? each question is worth a butt load of points, that's why im looking for someone to confirm the ones i'm iffy on. thanks a lot. i'm mostly not sure about doing negative numbers in hex or octal. i looked around online and some people just represented the absolute value of the number and then put a - sign infront of it. i didn't think that was correct, so i went in a twos compliment way about it.


3. Consider the following binary value: 1000 0000 0010 0110 0000 0110 1101 1001
What number (base 10) is represented if the value is assumed to represent a number stored in twos complement notation?
-2144991527

Excess notation?
2492121

IEEE binary32 floating-point notation?
-1.010011000000011011011001

4. How are values of 515 and -515 represented as ordinary binary numbers?
1000000011
0111111101

How are they represented as octal numbers?
1003
775

In hexadecimal numbers?
203
1FD

How are they represented in 16-bit excess notation?
1000001000000011
0111110111111101

In 16-bit twos complement notation?
0000001000000011
1111110111111101


5. How is the binary value 101101 x 2^(-101101) represented in IEEE binary32 floating-point notation?
01010110100000000000000000101101


thanks a bunch :)

Is This A Good Question/Topic? 0
  • +

Replies To: help with representing negative integers

#2 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3662
  • View blog
  • Posts: 11,466
  • Joined: 05-May 12

Re: help with representing negative integers

Posted 23 September 2012 - 08:07 PM

If you've got time to ask us on the forum, then you've got time to try running things on a computer to see what the results are.

I say that not to be snarky, but to encourage to you to explore and experiment with a computer. Try putting in the values that you are coming up with see what happens. If you are on Windows, the built in Calculator has a pretty good Programmer mode that does various bases.
Was This Post Helpful? 1
  • +
  • -

#3 totgeburt  Icon User is offline

  • D.I.C Head

Reputation: 57
  • View blog
  • Posts: 227
  • Joined: 03-August 11

Re: help with representing negative integers

Posted 23 September 2012 - 08:28 PM

View PostSkydiver, on 24 September 2012 - 03:07 AM, said:

If you've got time to ask us on the forum, then you've got time to try running things on a computer to see what the results are.

I say that not to be snarky, but to encourage to you to explore and experiment with a computer. Try putting in the values that you are coming up with see what happens. If you are on Windows, the built in Calculator has a pretty good Programmer mode that does various bases.



oh cool, i've never seen the programmer mode for the calculator. thanks a bunch :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1