1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Going from sign/magnitude of a hex value to it's two's complement

  1. Nov 17, 2014 #1
    1. The problem statement, all variables and given/known data

    Hi all!

    You are given the hex 9AB. I need to go from sign and magnitude of it, to it's two's complement (in 13-bit).

    3. The attempt at a solution

    What I did was convert the hex to binary:

    0100110101011 <-- I added an extra 0 for the 13th bit

    I then flipped the digits, and added "1" and got this:

    1011001010101

    The answer to this is supposed to be 2475, and I'm not getting that. Would appreciate any help anyone can give.

    Thanks.
     
  2. jcsd
  3. Nov 17, 2014 #2

    jedishrfu

    Staff: Mentor

  4. Nov 18, 2014 #3

    phinds

    User Avatar
    Gold Member
    2016 Award

    Your two's complement is correct.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Going from sign/magnitude of a hex value to it's two's complement
  1. 2s Complement with hex (Replies: 1)

  2. Two's complement (Replies: 3)

Loading...