Bit wise and function.

G

Guest

Can any body help me with a function which does bit wise and for binary
numbers.

Also is there any function which converts binary numbers with 16 digits to
Decimal.

Regards,

Satish Salankimatt.
 
D

David Biddulph

Although BIN2DEC can only deal with up to 10 bits, if you've got a 16 bit
number you can split it and use
=256*BIN2DEC(LEFT(A33,8))+BIN2DEC(RIGHT(A33,8))
--
David Biddulph

in message ....
Also is there any function which converts binary numbers with 16 digits to
Decimal.
....
 
V

vezerid

If A1 and B1 hold the two numbers, the following formula will
calculate the numeric value of their bitwise AND:

=SUMPRODUCT(MOD(INT(A1/2^(ROW(1:16)-1)),2)*MOD(INT(B1/2^(ROW(1:16)-1)),
2)*2^(ROW(1:16)-1))

HTH
Kostis Vezerides
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top