Texas Instruments TINSPIRE Reference Guide - Page 97

Real or Complex, shift, Catalog &gt, Integer, Setting Integers

Page 97 highlights

Mode Name Exponential Format Real or Complex Auto or Approx. Vector Format Base Mode Integer 3 4 5 6 7 Setting Integers 1=Normal, 2=Scientific, 3=Engineering 1=Real, 2=Rectangular, 3=Polar 1=Auto, 2=Approximate 1=Rectangular, 2=Cylindrical, 3=Spherical 1=Decimal, 2=Hex, 3=Binary shift( ) Catalog > shift(Integer1[,#ofShifts]) ⇒ integer In Bin base mode: 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, In Hex base mode: 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. Important: To enter a binary or hexadecimal number, always use the 0b or 0h prefix (zero, not the letter O). 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. shift(List1 [,#ofShifts]) ⇒ list In Dec base mode: 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". 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. TI-Nspire™ Reference Guide 91

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164

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
4
Base2
, 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
L
1 (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
L
1 (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
L
1 (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