Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Are there Boolean operators in MS Excel?


:)



My dear friends & respected ones,
warm regards to everybody.

I am new to this forum. My query is :Is there any operator or
function in MS Excel to reverse the bit pattern of a binary no. as we
perform in Boolean mathematics.

Eg. Suppose there is any binary no. in cell A5 as "111011110101", so by
using any operator, how inverted binary no. i.e. "000100001010" can be
obtained.

Also are there other operators so as to perform AND, OR, EX-OR
operations of digital electronics?


Best Regards,
-------------
Aashu


--
Aashu
------------------------------------------------------------------------
Aashu's Profile: http://www.excelforum.com/member.php...o&userid=36916
View this thread: http://www.excelforum.com/showthread...hreadid=566643

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 618
Default Are there Boolean operators in MS Excel?

"Aashu" wrote in
message ...

:)



My dear friends & respected ones,
warm regards to everybody.

I am new to this forum. My query is :Is there any operator or
function in MS Excel to reverse the bit pattern of a binary no. as we
perform in Boolean mathematics.

Eg. Suppose there is any binary no. in cell A5 as "111011110101", so by
using any operator, how inverted binary no. i.e. "000100001010" can be
obtained.

Also are there other operators so as to perform AND, OR, EX-OR
operations of digital electronics?


If the binary number had been only 10 digits, you could have used
=DEC2BIN(-(BIN2DEC(A5)-1),10)
--
David Biddulph


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 947
Default Are there Boolean operators in MS Excel?

...Is there any operator or
function in MS Excel to reverse
the bit pattern of a binary number?


Hi. Excel vba has a limited capability of using Xor to reverse bit
patterns. You can usually find workarounds. Since your bin # is too
large for Excel, here's one of a few workarounds using Xor.

Sub Demo()
Dim bin, dec, Inv

bin = 111011110101#

'dec=3829
dec = bin2dec(Left(bin, 3)) * 512 + bin2dec(Right(bin, 9))

Inv = dec2bin(dec Xor (2 ^ Len(bin) - 1))
Debug.Print Format(Inv, "000000000000")
End Sub

Returns: 000100001010

HTH
Dana DeLouis


David Biddulph wrote:
"Aashu" wrote in
message ...
:)



My dear friends & respected ones,
warm regards to everybody.

I am new to this forum. My query is :Is there any operator or
function in MS Excel to reverse the bit pattern of a binary no. as we
perform in Boolean mathematics.

Eg. Suppose there is any binary no. in cell A5 as "111011110101", so by
using any operator, how inverted binary no. i.e. "000100001010" can be
obtained.

Also are there other operators so as to perform AND, OR, EX-OR
operations of digital electronics?


If the binary number had been only 10 digits, you could have used
=DEC2BIN(-(BIN2DEC(A5)-1),10)

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Are there Boolean operators in MS Excel?


Thanks All of you very much for prompt response & solving my problem and
also showing me different ways for solving the same problem.



Best Regards,
-------------
Aashu.




Dana DeLouis Wrote:
...Is there any operator or
function in MS Excel to reverse
the bit pattern of a binary number?


Hi. Excel vba has a limited capability of using Xor to reverse bit
patterns. You can usually find workarounds. Since your bin # is too
large for Excel, here's one of a few workarounds using Xor.

Sub Demo()
Dim bin, dec, Inv

bin = 111011110101#

'dec=3829
dec = bin2dec(Left(bin, 3)) * 512 + bin2dec(Right(bin, 9))

Inv = dec2bin(dec Xor (2 ^ Len(bin) - 1))
Debug.Print Format(Inv, "000000000000")
End Sub

Returns: 000100001010

HTH
Dana DeLouis


David Biddulph wrote:
"Aashu" wrote

in
message ...
:)



My dear friends & respected ones,
warm regards to everybody.

I am new to this forum. My query is :Is there any operator or
function in MS Excel to reverse the bit pattern of a binary no. as

we
perform in Boolean mathematics.

Eg. Suppose there is any binary no. in cell A5 as "111011110101", so

by
using any operator, how inverted binary no. i.e. "000100001010" can

be
obtained.

Also are there other operators so as to perform AND, OR, EX-OR
operations of digital electronics?


If the binary number had been only 10 digits, you could have used
=DEC2BIN(-(BIN2DEC(A5)-1),10)



--
Aashu
------------------------------------------------------------------------
Aashu's Profile: http://www.excelforum.com/member.php...o&userid=36916
View this thread: http://www.excelforum.com/showthread...hreadid=566643

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Are there Boolean operators in MS Excel?


Try this formula solution

=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A5,0,2),1,0),2,1 )


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=566643



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Are there Boolean operators in MS Excel?


daddylonglegs Wrote:
Try this formula solution

=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A5,0,2),1,0),2,1 )



Thank you very much "DADYLONGLEGS", you have suggested me one of the
simplest option very useful in my application.


Thanks & Regards,
-----------------
Aashu


--
Aashu
------------------------------------------------------------------------
Aashu's Profile: http://www.excelforum.com/member.php...o&userid=36916
View this thread: http://www.excelforum.com/showthread...hreadid=566643

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
Open Excel 2003 from Windows Explorer pmpjr Excel Discussion (Misc queries) 9 September 11th 06 03:58 PM
convert pocket excel back to standard excel kevroyal Excel Discussion (Misc queries) 1 February 16th 06 11:35 AM
Opening two separate instances of Excel Ron Bishop Excel Discussion (Misc queries) 2 August 4th 05 05:30 PM
Difference in number of Excel NewsGroups Hari Prasadh Excel Discussion (Misc queries) 1 January 25th 05 11:32 AM


All times are GMT +1. The time now is 07:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"