Welcome Guest ( Log In | Register)



2 Pages V  < 1 2  
Reply to this topicStart new topic
> Another C Question
yomi
post Jan 24 2005, 12:48 AM
Post #11


Engineer
*****

Group: Members
Posts: 78
Joined: 25-July 04
From: China
Member No.: 204



Now I can give the correct one:

X==~(-X)+1

smile.gif

QUOTE(osknockout @ Jan 23 2005, 06:29 PM)
Hmm...

00000010 x
11111101 ~x
11111110 (~x)+1
11111110 ((~x)+1)|x

00000010 == 11111110?

I'll think about that formula again...
*

Go to the top of the page
 
+Quote Post
osknockout
post Jan 25 2005, 11:02 PM
Post #12


Super Member
*********

Group: Members
Posts: 399
Joined: 14-November 04
From: Elysium
Member No.: 2,280



QUOTE
Now I can give the correct one:

X==~(-X)+1


Hmm....

00000100 x
10000100 -x //Randall Hyde, art of assembly, signed numbers
01111011 ~(-x)
01111100 ~(-X)+1

01111100==00000100? Yomi, stop guessing laugh.gif
I think that works for 2 though.
Go to the top of the page
 
+Quote Post
yomi
post Jan 26 2005, 04:35 AM
Post #13


Engineer
*****

Group: Members
Posts: 78
Joined: 25-July 04
From: China
Member No.: 204



-x, pls note,
00000100 x
11111100 -x

-x is (~x)+1, they are equal.
-x is not simply change the fist bit.

Sure I am not guessing, I have point out I have given the CORRECT one.

QUOTE(osknockout @ Jan 25 2005, 11:02 PM)
Hmm....

00000100 x
10000100 -x      //Randall Hyde, art of assembly, signed numbers
01111011 ~(-x)
01111100 ~(-X)+1

01111100==00000100? Yomi, stop guessing laugh.gif
I think that works for 2 though.
*

Go to the top of the page
 
+Quote Post

2 Pages V  < 1 2
Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Question..(1)
  2. When?(5)
  3. Question(9)
  4. question!(13)
  5. Question(4)
  6. got a question(3)
  7. I have a question(7)
  8. Not sure where to ask this question...(1)
  9. I have a question for all...(12)
  10. Just a question(2)
  11. question...(2)
  12. question!(3)
  13. question yet again(2)
  14. **~Question...~**(9)
  15. Question....(10)
  1. a question!!(12)
  2. another question¡¿¡¿(9)
  3. Question(4)
  4. I Have Question(2)
  5. Question(5)
  6. A Question...(3)
  7. Question(2)
  8. Bw Question(8)
  9. Just A Few Question(3)
  10. Question(3)
  11. Question Again(4)
  12. Question(3)
  13. To Do, Or Not To Do...(13)


 



- Lo-Fi Version Time is now: 22nd November 2008 - 07:43 AM