OpenOffice is a free, open-source productivity suite. Calc, a spreadsheet manager, is a part of OpenOffice. Calc allows spreadsheet cells to contain values that are a function of the current values of other cells; the user specifies a formula using the built-in operators. However, no built-in operators perform bitwise operations. You can add bitwise functions as BASIC macros, so that they can be used to implement all forms of bit masks.
- Skill level:
Other People Are Reading
Invoke Calc by double-clicking on its icon.
Select "Tools," "Macros," "Organize macros," then "OpenOffice.org BASIC." The macro creation window will come up.
Enter "Bitwise" in the "Macro name" field, then click on "New." The program editor window will come up. Erase everything under the "REM" line.
Enter the source code for the new macros:
Function BitAND( val1 , val2 )
BitAND = val1 AND val2
Function BitOR( val1 , val2 )
BitOR = val1 OR val2
Function BitXOR( val1 , val2 )
BitXOR = val1 XOR val2
Click on the "Compile" icon. Click on the "Save" icon. The three functions "BitAND," "BitOR" and "BitXOR" are now available to compute cell values.
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for