Re: how to compare two number sequences

From: FC (fcarpio_at_NOJUNKcomcast.net)
Date: 03/04/05


Date: Fri, 04 Mar 2005 06:44:44 -0500

David Harmon wrote:
> On Fri, 04 Mar 2005 00:40:05 -0500 in comp.lang.c++, FC
> <fcarpio@NOJUNKcomcast.net> wrote,
>
>>I have two 32 bit long sequence of binary random numbers. When I compare
>>them side by side I want to count all the transitions from one to zero,
>>and all the transitions from zero to one
>
>
> A & ~B
> B & ~A
>
Thanks, that was painless.



Relevant Pages

  • how to compare two number sequences
    ... I have two 32 bit long sequence of binary random numbers. ... When I compare ... them side by side I want to count all the transitions from one to zero, ...
    (comp.lang.cpp)
  • Re: how to compare two number sequences
    ... >I have two 32 bit long sequence of binary random numbers. ... When I compare ... >them side by side I want to count all the transitions from one to zero, ...
    (comp.lang.cpp)
  • Re: if statement
    ... The zero argument tells Matchto return the first *exact* match. ... > There can be 6 different numbers in the target evaluation cell and I want ... > compare it 6 different ways and if it matches the correct value compared ... > can't get it to string together more than the one comparison. ...
    (microsoft.public.excel.misc)
  • Re: writing a two hour movie script
    ... You're an idiot, appropriately named "Zero". ... includes TV movies and small companies. ... but to top it all off, you don't compare the number of aspiring ... agent in Florida on the Net who sold the book for him. ...
    (misc.writing)
  • Re: Why is "False" = "-1"?
    ... A must be compared to zero or some other ... (Excepting perhaps for a dumb compiler and I ... dumb--actually a couple of his examples show better code generation than ... the machine instruction to compare to--whether it's zero or nonzero ...
    (microsoft.public.vb.general.discussion)