Skip to content

EBinary

EchoDevG edited this page Feb 8, 2023 · 2 revisions

EBinary

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.

Attributes

Type

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

BinaryNum holds the number in binary. It can be set with a binary number, or a denary number which is converted to binary.

Length

The Length attribute holds the number of bits in the binary number.

Methods

Clone this wiki locally