Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Calculator for programmers #16

Open
3 tasks
tommens opened this issue Dec 30, 2024 · 0 comments
Open
3 tasks

[FEATURE] Calculator for programmers #16

tommens opened this issue Dec 30, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@tommens
Copy link
Collaborator

tommens commented Dec 30, 2024

Describe the new functionality you would like to see

  • The current calculator only supports scientific operations. It does not support typical operations required by programmers, such as support for Boolean logic, as well as support for binary numbers, hexadecimal numbers, or numbers using another base (e.g. octal = base 8).

Required functionality

  • Support for Boolean values (false can be represented as either 0 or F, and true as either 1 of T) and logic operations (e.g., and, or, not, xor, implication, equivalence) over arbitrarily complex Boolean expressions.
  • Support for binary numbers (i.e. integer numbers expressed in the base-2 numeral system, see https://en.wikipedia.org/wiki/Binary_number) and operations on these binary numbers. All Boolean logic operations can be easily extended to work on binary numbers (assuming that 0 corresponds to false and 1 to true). Additional bitwise operations such as shift left (<<) and shift right (>>) should be supported. See https://en.wikipedia.org/wiki/Bitwise_operation
  • Support for octal and hexadecimal numbers, i.e. integer numbers expressed in the base-8 numeral system (see https://en.wikipedia.org/wiki/Octal) and the base-16 numeral system (see https://en.wikipedia.org/wiki/Hexadecimal). The implementation should be sufficiently generic to make it trivial to support other numeral bases as well.

Illustration
As a source of inspiration, the figure below provides an incomplete example of an extension of a scientific calculator with such support.
programmer

@tommens tommens added the enhancement New feature or request label Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant