Class | Integer |
In: |
lib/ruby-vpi/integer.rb
|
Parent: | Object |
NOTE: Because integers are immediate values in Ruby, these methods cannot modify the value of the integer upon which they are invoked. Instead, they return the new value as their result.
Performs sign extension on this integer, which has the given width (number of bits), so that the result will have the given extended width (number of bits).
Returns the lowest upper-bound of this integer. This integer cannot reach the limit without occupying more bits in its binary representation.
Splits this integer into an array of smaller integers, each of which have the given positive, non-zero width (number of bits). These smaller integers are ordered from left to right, in the same way that humans write unsigned binary numbers; for example:
>> 6.split 1 => [1, 1, 0] >> 6.split(1).map {|i| i.to_s 2} => ["1", "1", "0"] >> 6.split 2 => [1, 2] >> 6.split(2).map {|i| i.to_s 2} => ["1", "10"]