Re: comparing two binary numbers

[email protected] ("Dr.Ruud")
Newsgroups perl.beginners
Organization Chaos rules.
Message-ID <[email protected]>
"John W. Krahn" schreef:
> Johnson Lau:

>> I need to compare two binary numbers and need perl to return the
>> number of matching bits. For example:
>>     $aaa = "10111100";
>>     $bbb = "00101100";
>
> Those aren't binary numbers, they are strings.

I don't mind reading "binary number" as "some base-two representation of
a number".

The word "number" is often used for an encoded stream of digits.

-- 
Affijn, Ruud

"Gewoon is een tijger."
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.