https://github.com/vookimedlo/alfred-bitwise-evaluator
Alfred 3 workflow for evaluating bitwise expressions.
https://github.com/vookimedlo/alfred-bitwise-evaluator
alfred alfred-3 alfred-workflow alfred3-workflow bitwise bitwise-arithmetic bitwise-operators developer-tools development-tools
Last synced: 5 months ago
JSON representation
Alfred 3 workflow for evaluating bitwise expressions.
- Host: GitHub
- URL: https://github.com/vookimedlo/alfred-bitwise-evaluator
- Owner: vookimedlo
- License: gpl-3.0
- Created: 2017-12-13T14:51:52.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-10-11T19:49:57.000Z (over 7 years ago)
- Last Synced: 2025-06-15T09:37:09.646Z (about 1 year ago)
- Topics: alfred, alfred-3, alfred-workflow, alfred3-workflow, bitwise, bitwise-arithmetic, bitwise-operators, developer-tools, development-tools
- Size: 683 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# alfred-bitwise-evaluator
[Alfred 3][1] workflow for evaluating bitwise expressions.
## Installation
1) Install [alfred-bitwise-evaluator][2] workflow.
2) All further updates are handled automatically.
## Usage
In Alfred, type `bitwise` and enter your bitwise expression which shall be evaluated.

Selected result is copied to your clipboard.

Expression is being evaluated as you type the expression. If expression cannot be evaluated, either for illegal characters or syntax error, user will be notified about that.

## Bitwise expression syntax and operators precedence
Workflow is based on Perl, therefore it uses its syntax and operators precedence, which is easy to use.
The golden rule in programming languages is the following: _"If you are unsure about the operator precedence, always use parentheses to be sure what you are doing."_. It's not a shame!
| OPERATOR NAME | SYNTAX |
|---------------------|:------:|
| Bitwise NOT | ~a |
| Bitwise AND | a & b |
| Bitwise OR | a | b |
| Bitwise XOR | a ^ b |
| Bitwise left shift | a << b |
| Bitwise right shift | a >> b |
## Integer formats
The four formats listed below are printed.
| INTEGER FORMAT | SYNTAX EXAMPLE |
|----------------|:--------------:|
| Decimal | 1234 |
| Binary | 0b1110011 |
| Hexadecimal | 0x1234 |
| Octal | 01234 |
## Workflow Keyword
The default workflow keyword `bitwise` could be changed in alfred workflow settings. This variable will not be overwritten once the new workflow update is installed.

## Note
Before the expression is evaluated, input data will be checked for illegal characters. If those are found, evaluation will not continue. This is done for making the workflow harmless. If you remove this check, you could evaluate any Perl code, which could be pretty dangerous. Do that only if you know what you are doing!!!
[1]: https://www.alfredapp.com/
[2]: https://github.com/vookimedlo/alfred-bitwise-evaluator/releases/latest