This asset allows users to convert formulas into a bit output, and allows for easy bit flipping in-editor.
Simply head to the top of Unity and open the window from Tools/Nomnom/Bit Calculator
.
- Open the Package Manager from
Window/Package Manager
. - Click the '+' button in the top-left of the window.
- Click 'Add package from git URL'.
- Provide the URL of this git repository: https://github.com/nomnomab/BitCalculator.git
- Click the 'add' button.
- Has an input field that can take a literal string for a bit "formula".
- Bits are shown at the bottom of the window.
- These can be pressed to get "flipped" to their opposite value (0 to 1 and 1 to 0 respectively).
- Shows the formula output in multiple values:
- Hexadecimal
- Decimal
- Octal
- Binary
- Is based on the Window's Calculator programmer mode, so it can do a good chunk of what that can do.
Integer operations only
<<
→ Left shift>>
→ Right shift&
→ AND|
→ OR^
→ XOR~
→ Complement (Invert)()
→ Groups- Single numbers inside of groups are not currently supported
e.g. (5)
- Single numbers inside of groups are not currently supported
+
→ Addition-
→ Subtraction*
→ Multiplication/
→ Division**
→ Exponent
- The light mode version of the window looks a bit... bad. This will be improved at a later time.