Skip to content

change number representation #20

Description

@speedy-lex

Represent numbers as *char but store the actual bits in the char

Currently numbers are being stored as strings (eg [‘1’, ‘2’, ‘3’]=123) which takes more time to do calculations with that to be storing it like this [0x1, 0x24] = 1*(16^2)+2*(16^1)+4*(16^0).

Why *char?

I suggest using char because it is exactly 8 bits on all machines so the code is (mostly) the same for 64 bit and 32 bit machines.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions