-
Notifications
You must be signed in to change notification settings - Fork 0
EBinary
EchoDevG edited this page Feb 8, 2023
·
2 revisions
EBinary is a class which can act as any type of binary that is available. It does this with a string attribute Type
which is checked to see what function should be called.
Type
is a string attribute that is set when the object is instantiated. It can be one of three options:
- "STANDARD" - A standard binary with no signs
- "TWOS_COMPLIMENT" - A binary number in two's compliment, where the first bit is negative but has a magnitude as well
- "SIGN_MAGNITUDE" - A binary number where the first bit is negative, with no magnitude
BinaryNum
holds the number in binary. It can be set with a binary number, or a denary number which is converted to binary.
The Length
attribute holds the number of bits in the binary number.