Re: Converting decimal to binary

2006-01-18 Thread Ed Reed
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

Re: Converting decimal to binary

2006-01-18 Thread Ed Reed
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

Re: [SPAM] - Re: Converting decimal to binary - Bayesian Filter detected spam

2006-01-10 Thread Francesco Riosa
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

Re: [SPAM] - Re: Converting decimal to binary - Bayesian Filter detected spam

2006-01-10 Thread Francesco Riosa
> > > > >>>> "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

RE: [SPAM] - Re: Converting decimal to binary - Bayesian Filter detected spam

2006-01-10 Thread Ed Reed
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

RE: [SPAM] - Re: Converting decimal to binary - Bayesian Filter detected spam

2006-01-10 Thread Ed Reed
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

RE: [SPAM] - Re: Converting decimal to binary - Bayesian Filter detected spam

2006-01-10 Thread Gordon Bruce
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

Re: Converting decimal to binary

2006-01-10 Thread Bill Dodson
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,

RE: Converting decimal to binary

2006-01-10 Thread Gordon Bruce
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