Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/13/06 06:22
Read: times


 
#120150 - Logic
Responding to: ???'s previous message
Ashwin V said:
I need to compare two 10 digit numbers for equality ... Can anyone suggest a logic?

The logic is very simple indeed:

The two numbers are equal iff[1] all the digits are the same.

Or, conversely:

The two numbers are different if any of the digits differ.


So all you have to do is look at all the digits and see if they match!



[1] "iff" = "if, and only if"

List of 14 messages in thread
TopicAuthorDate
10digit comparision            01/01/70 00:00      
   Comparing bytewise?            01/01/70 00:00      
   MSB first.            01/01/70 00:00      
      ... or not            01/01/70 00:00      
      MSB vs LSB            01/01/70 00:00      
   more info, please            01/01/70 00:00      
      less info !            01/01/70 00:00      
         then I miss something            01/01/70 00:00      
         Come on, Andy!            01/01/70 00:00      
            I m not so sure - no it wasn't me either            01/01/70 00:00      
   Logic            01/01/70 00:00      
      That is - XOR            01/01/70 00:00      
         What is?            01/01/70 00:00      
         Yes!            01/01/70 00:00      

Back to Subject List