Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? | Excel Discussion (Misc queries) | |||
Open Excel 2003 from Windows Explorer | Excel Discussion (Misc queries) | |||
convert pocket excel back to standard excel | Excel Discussion (Misc queries) | |||
Opening two separate instances of Excel | Excel Discussion (Misc queries) | |||
Difference in number of Excel NewsGroups | Excel Discussion (Misc queries) |