Actually please ignore my previous question. I just had a brain cramp.
Thanks
>>> "Ed Reed" <[EMAIL PROTECTED]> 1/18/06 11:34:11 AM >>>
Can you (or anyone else) explain to me how, or point me somewhere that I can
learn how this works? I'd really like to know more about how bitwise arithmetic
Can you (or anyone else) explain to me how, or point me somewhere that I can
learn how this works? I'd really like to know more about how bitwise arithmetic
works.
Thanks
>>> Francesco Riosa <[EMAIL PROTECTED]> 1/10/06 4:58:47 PM >>>
Francesco Riosa wrote:
> And another one is (in inverse orde
Francesco Riosa wrote:
> And another one is (in inverse order for laziness):
>
> select
> (8 & 1) AS `0`
> , (8 & 2 > 1) AS `1`
> , (8 & 4 > 1) AS `2`
> , (8 & 8 > 1) AS `3`
> , (8 & 16 > 1) AS `4`
> , (8 & 32 > 1) AS `5`
> , (8 & 64 > 1) AS `6`
> , (8 & 128 > 1) AS `7`
> ;
>
but this one look
>
>
>
>
>>>> "Gordon Bruce" < [EMAIL PROTECTED] > 1/10/06 1:44 PM >>>
>>>>
> Actually CONV converts from any base to any base so if it is base 10
> then just replace the 16's with 10's.
>
> Too much ti
n just replace the 16's with 10's.
Too much time looking at dump's.
-Original Message-
From: Bill Dodson [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 10, 2006 3:09 PM
To: Gordon Bruce
Cc: Ed Reed; mysql@lists.mysql.com
Subject: [SPAM] - Re: Converting decimal to
Reed; mysql@lists.mysql.com
Subject: [SPAM] - Re: Converting decimal to binary - Bayesian Filter
detected spam
If you really do mean decimal (base 10) you could use Gordon's solution
like this:
SELECT
MID(CONV(HEX(245),16,2),1,1) AS `7`,
MID(CONV(HEX(245),16,2),2,1) AS `6`,
MID(CONV(HEX(2
Ed Reed; mysql@lists.mysql.com
Subject: [SPAM] - Re: Converting decimal to binary - Bayesian Filter
detected spam
If you really do mean decimal (base 10) you could use Gordon's solution
like this:
SELECT
MID(CONV(HEX(245),16,2),1,1) AS `7`,
MID(CONV(HEX(245),16,2),2,1) AS `6`,
MID(CONV(HEX(245),16
If you really do mean decimal (base 10) you could use Gordon's solution
like this:
SELECT
MID(CONV(HEX(245),16,2),1,1) AS `7`,
MID(CONV(HEX(245),16,2),2,1) AS `6`,
MID(CONV(HEX(245),16,2),3,1) AS `5`,
MID(CONV(HEX(245),16,2),4,1) AS `4`,
MID(CONV(HEX(245),16,2),5,1) AS `3`,
MID(CONV(HEX(245),16,
If by Decimal you mesn HEXIDECIMAL you can use CONV
where the 1st arg is the HEX value,
2nd arg is From Base
and 3rd arg is To Base.
You will have to suround the aliases with "`'s" if you really want
the names to be numeric.
mysql> select MID(CONV('A5',16,2),1,1) AS `7`,
->MID(C