mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-05-09 08:25:44 +02:00
[PR #308] [MERGED] Logic Toolbox #359
Labels
No labels
bug
duplicate
easy
enhancement
enhancement
fixed
fixed
good first issue
hard
invalid
pull-request
wontfix
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Upsilon#359
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/UpsilonNumworks/Upsilon/pull/308
Author: @joecrop
Created: 12/27/2022
Status: ✅ Merged
Merged: 11/5/2025
Merged by: @Yaya-Cout
Base:
upsilon-dev← Head:logic-toolbox📝 Commits (6)
42d8fealogic toolbox with logic functionsfc95028- Added clog2 function81dc1bdmoved logic toolbox to the bottom of the listd7f54adremoved shift functions with explicit number of bits8041c7aUpdated french translations after feedbackc1f5b4aMerge branch 'upsilon-dev' into logic-toolbox📊 Changes
25 files changed (+1887 additions, -9 deletions)
View changed files
📝
apps/calculation/additional_outputs/integer_list_controller.cpp(+26 -4)📝
apps/calculation/calculation.h(+1 -1)📝
apps/math_toolbox.cpp(+30 -2)📝
apps/shared.universal.i18n(+25 -0)📝
apps/toolbox.de.i18n(+14 -0)📝
apps/toolbox.en.i18n(+14 -0)📝
apps/toolbox.es.i18n(+14 -0)📝
apps/toolbox.fr.i18n(+14 -0)📝
apps/toolbox.hu.i18n(+14 -0)📝
apps/toolbox.it.i18n(+14 -0)📝
apps/toolbox.nl.i18n(+14 -0)📝
apps/toolbox.pt.i18n(+14 -0)📝
poincare/Makefile(+2 -0)➕
poincare/include/poincare/binary_operation.h(+218 -0)📝
poincare/include/poincare/expression.h(+24 -0)📝
poincare/include/poincare/expression_node.h(+21 -0)📝
poincare/include/poincare/integer.h(+16 -0)📝
poincare/include/poincare_nodes.h(+1 -0)➕
poincare/src/binary_operation.cpp(+543 -0)📝
poincare/src/expression.cpp(+1 -1)...and 5 more files
📄 Description
Binary Logic Toolbox
Numworks is about to release some basic binary functions in Epsilon. I tried them out, and they are honestly pretty useless, with inputs of just 'True' and 'False' and just AND/OR/NOT functions. Here's my take on a toolbox with much more powerful logic functions to be used on both unsigned and signed integers. I have also extended the '...' (Additional Results) display to show the 2's complement binary/hex of negative numbers.
Additional Results
Negative integers can now be displayed in binary/hex. Simply navigate to the ellipsis ('...') on the right of a negative integer result to see a 2's complement representation of the number:
Functions Implemented
Basic Logic Operations
AND
OR
XOR - Exclusive OR
NOT
Bit Shifts
Shift Logical Left
Shift Logical Right
Arithmetic Shift Right
Rotate Left
Rotate Right
Setting And Clearing Bits
Get Bit
Set Bit
Clear Bit
Flip Bit
Clear 'a' With 'b'
Logic Operations (With Explicit Number of Bits)
Some logic operations (like NOT) end up generating large 32-bit numbers as the default precision is 32 bits. This adds frustration when 32 bits of precision is undesired. So some of the functions have overridden methods that have an extra argument that allows the user to control the number of output bits.
2'S Compliment Conversions/Helpers
2's Compliment Equivalent
Ceiling Log2
Other Information
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.