Difference between revisions of "Tactile Bits in OpenScad (Q54843)"

From Library of Open Source Hardware
Jump to navigation Jump to search
(Reconciliation Edit)
 
(‎Added [en] label: Tactile Bits in OpenScad)
 
label / enlabel / en
 +
Tactile Bits in OpenScad

Latest revision as of 20:51, 25 February 2022

No description defined
Language Label Description Also known as
English
Tactile Bits in OpenScad
No description defined

    Statements

    WilliamAAdams
    0 references
    https://spdx.org/licenses/CC0-1.0
    0 references
    auto
    0 references
    www.thingiverse.com
    0 references
    en
    0 references
    0 references
    1.0.0
    0 references
    thingiverse.com
    0 references
    I've been programming for quite a few years now, and since the beginning of time (programming my Commodore P.E.T.), I could not remember binary bit patterns to save my life! This thing gives me the ability to print out binary representations of numbers. That gives me something nice and tactile that I can look at, pick up, and play around with. Perhaps if I had this as a toy when I was younger, I would not have such problems remembering binary encodings because the memories would have been cemented in something physical. Within the test_boolean.scad file, you will find the module: display_binary(number, bits, withplate) You give it a number, and the number of bits you want to display, and whether you want a base plate attached or not. And out comes your binary representation of your number. If you care to look deeper, you can take a look at the boolean.scad file. In there you will find some useful bit banging operators like RSHIFT, LSHIFT, BIT, BTEST, 32BITAND, 32BITNOT, 32BITXOR, 32BITOR, and other boolean algebra thingies. These might be useful for other things some day. In particular, you could perform an operation, and print the result of the operation tactally.
    0 references