On Wed, Apr 18, 2001 at 12:35:31AM +0200, Paul Johnson wrote:
: On Tue, Apr 17, 2001 at 05:20:05PM -0400, Casey West wrote:
:
: > Now, if you really want your first two numbers in binary form, you can
: > try something along these lines:
:
: It is actually much, much easier than that Casey ;-)
:
On Tue, Apr 17, 2001 at 05:20:05PM -0400, Casey West wrote:
> Now, if you really want your first two numbers in binary form, you can
> try something along these lines:
It is actually much, much easier than that Casey ;-)
printf "%b\n" for @ARGV;
if your perl >= 5.6.0
--
Paul Johnson - [EMAIL
On Tue, Apr 17, 2001 at 03:53:39PM -0500, Gray, Brad D wrote:
: Hi,
:
: Is there a way to convert two numbers from decimal to binary, and AND them
: together, and convert the result back to decimal?
It is actually much, much easier than that Brad. Perl has a bitwise
AND operator ( see perlop ):