On Sun, 9 Sep 2001, Sander Roobol wrote:

> Might be something for the Bug reporting Dos And Don'ts:
> -Don't write in any language other than English.

I added the note...

Derick

>
> ----- Original Message -----
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, September 09, 2001 11:39 AM
> Subject: [PHP-DEV] Bug #13218 Updated: Problema con nXmeros binarios
>
>
> > ID: 13218
> > Updated by: derick
> > Reported By: [EMAIL PROTECTED]
> > Old Status: Open
> > Status: Bogus
> > Bug Type: *Math Functions
> > Operating System: Red Hat Linux 7.1
> > PHP Version: 4.0.4pl1
> > New Comment:
> >
> > Please report bugs in English > bogus
> >
> > Derick
> >
> > Previous Comments:
> > ------------------------------------------------------------------------
> >
> > [2001-09-08 23:03:23] [EMAIL PROTECTED]
> >
> > Intentaba hacer un trabajo con números binarios, primero
> > me puse a probar que tan bueno era php con el tratamiento
> > de los bínarios dado que no existe ningún tipo de dato
> > byte, y me di cuenta del siguiente error: no puede hacer
> > bien un AND a dos números y mucho menos negarlos el
> > siguiente código es el que probé (una y otra vez) y
> > siempre me daba el mismo error:
> >
> > // Inicio del código
> > $num1 = 10101011;
> > $num2 = 10000101;
> >
> > $num11 = base_convert($num1,2,10);
> > $num22 = base_convert($num2,2,10);
> >
> > $num3 = $num11 & $num22;
> > $num4 = ~ $num3;
> > echo "$num11<br>$num22<br>$num3<br>$num4";
> > // Fin del código
> >
> > Al correr este código me dió como resultado lo siguiente:
> >
> > 171
> > 133
> > 131
> > ÎÌÎ
> >
> > La primera y segunda línea son los números binarios
> > convertidos a decimal, esto es correcto.
> >
> > La tercera línea me debería haber dado como resultado:
> > 171 AND 133 = 129, lo cual se puede corroborar en
> > cualquier calculadora, por lo tanto es incorrecto!!!.
> >
> > La cuarta línea debió haber resultado de negar 131 (que ya
> > de por sí es erróneo), y debió salir:
> > ~ 131 = 1111100
> > y como ven me bota una varible de tipo string sin
> > significado alguno.
> >
> > Verán que el código es completamente sencillo y no hay
> > lugar a complicaciones.
> >
> > Datos Adicionales:
> >
> > Computadora Pentium III 800MHz
> > 128 Mb RAM
> > 30 GB HD
> >
> >
> > ------------------------------------------------------------------------
> >
> >
> >
> > Edit this bug report at http://bugs.php.net/?id=13218&edit=1
> >
> >
> > --
> > PHP Development Mailing List <http://www.php.net/>
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>

Derick Rethans

---------------------------------------------------------------------
        PHP: Scripting the Web - www.php.net - [EMAIL PROTECTED]
             SRM: Site Resource Manager - www.vl-srm.net
---------------------------------------------------------------------


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to