My Math Forum Signed hexadecimal computation!

 Computer Science Computer Science Forum

 March 3rd, 2013, 07:10 AM #1 Member   Joined: Sep 2012 Posts: 69 Thanks: 0 Signed hexadecimal computation! Hello, I have questions about signed number representation in computer. It is about the computation of two hexadecimal number. Lets say there are two hexadecimal numbers $FF_{16}$ and $7F_{16}$. How do I compute this?? What I know is that I have to convert these two hex into binary and the hex that subtract from another, I have to convert that binary into negative binary and add them up. So $FF_{16}$ will be converted into binary as this.$1111\ 1111_2$. 8bits And $7F$ will be $0111\ 1111_2$. If I convert second number into negative by using two's complement, it will be $1000\ 0001_2$. If I add them up, I get the result. $1111\ 1111_2 + 1000\ 0001_2= 11000\ 0000_2$ is this correct?? I think I heard that I have to throw the carry out... so the result becomes $1000\ 0000_2$.
 March 3rd, 2013, 12:43 PM #2 Global Moderator   Joined: May 2007 Posts: 6,805 Thanks: 716 Re: Signed hexadecimal computation! Your final result is correct. You can check it by ordinary subtraction, FF - 7F = 80.
 March 3rd, 2013, 01:40 PM #3 Member   Joined: Sep 2012 Posts: 69 Thanks: 0 Re: Signed hexadecimal computation! so I have throw the carry out right?? Thanks
March 4th, 2013, 02:59 PM   #4
Global Moderator

Joined: May 2007

Posts: 6,805
Thanks: 716

Quote:
 Originally Posted by eChung00 so I have throw the carry out right?? Thanks
yes

 Thread Tools Display Modes Linear Mode

 Similar Threads Thread Thread Starter Forum Replies Last Post eChung00 Computer Science 2 March 16th, 2013 04:50 PM aaron-math Computer Science 3 January 31st, 2013 05:07 AM aLisonGREEN8 Algebra 4 July 4th, 2012 09:10 AM Primalscientist Computer Science 13 April 20th, 2011 12:41 PM Primalscientist Computer Science 3 April 17th, 2011 03:31 AM

 Contact - Home - Forums - Cryptocurrency Forum - Top