TI-Nspire™ Reference Guide 91
Exponential Format
3
1
=Normal, 2=Scientific, 3=Engineering
Real or Complex
4
1
=Real, 2=Rectangular, 3=Polar
Auto or Approx.
5
1
=Auto, 2=Approximate
Vector Format
6
1
=Rectangular, 2=Cylindrical, 3=Spherical
Base
7
1
=Decimal, 2=Hex, 3=Binary
shift()
Catalog
>
shift(Integer1[,#ofShifts]) ⇒ integer
Shifts the bits in a binary integer. You can enter Integer1 in any
number base; it is converted automatically to a signed, 64-bit binary
form. If the magnitude of Integer1 is too large for this form, a
symmetric modulo operation brings it within the range. For more
information, see 4Base2, page 12.
If #ofShifts is positive, the shift is to the left. If #ofShifts is negative,
the shift is to the right. The default is L1 (shift right one bit).
In a right shift, the rightmost bit is dropped and 0 or 1 is inserted to
match the leftmost bit. In a left shift, the leftmost bit is dropped and 0
is inserted as the rightmost bit.
For example, in a right shift:
Each bit shifts right.
0b0000000000000111101011000011010
Inserts 0 if leftmost bit is 0,
or 1 if leftmost bit is 1.
produces:
0b00000000000000111101011000011010
The result is displayed according to the Base mode. Leading zeros are
not shown.
In Bin base mode:
In Hex base mode:
Important: To enter a binary or hexadecimal number, always
use the 0b or 0h prefix (zero, not the letter O).
shift(List1 [,#ofShifts]) ⇒ list
Returns a copy of List1 shifted right or left by #ofShifts elements.
Does not alter List1.
If #ofShifts is positive, the shift is to the left. If #ofShifts is negative,
the shift is to the right. The default is L1 (shift right one element).
Elements introduced at the beginning or end of list by the shift are set
to the symbol “undef”.
In Dec base mode:
shift(String1 [,#ofShifts]) ⇒ string
Returns a copy of String1 shifted right or left by #ofShifts characters.
Does not alter String1.
If #ofShifts is positive, the shift is to the left. If #ofShifts is negative,
the shift is to the right. The default is L1 (shift right one character).
Characters introduced at the beginning or end of string by the shift
are set to a space.
Mode
Name
Mode
Integer Setting Integers