CPU Simulator
    Preparing search index...

    This class represents a physical memory address.

    Erik Burmester erik.burmester@nextbeam.net

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    MAX_NEGATIVE_NUMBER_DEC: number = -2_147_483_648
    MAX_NUMBER_UNSIGNED_DEC: number = 4_294_967_295
    MAX_POSITIVE_NUMBER_DEC: number = 2_147_483_647
    NUMBER_OF_BITS_DEC: number = 32
    _value: Bit[]

    An array of bits, representing a binary value.

    Accessors

    Methods

    • This method creates an instance from the given number. Throws an error, if the given number is not an integer.

      Parameters

      • integer: number

        The number to initialize the new instances value with.

      Returns Address

      A new instance.

    • This method checks whethter the current binary value is equal to the given one or not. For comparison, both binary values are converted to strings. Conversion presarves the order of items, which is important for the comparison.

      Parameters

      Returns boolean

      True, if both binary values are identical, false otherwise.

    • This method checks whether the current binary value is a binary zero or not.

      Returns boolean

      True, if the binary value is zero, false otherwise.

    • Converts the binary value into a string representation.

      Parameters

      • OptionalgroupBytes: boolean = false

        If set to true, the string representation of the binary value is grouped into bytes.

      Returns string

      The string representation of the binary value.