how so? they still take parameters that are decimal values - like all the other ops.
you would either provide a decimal value or use the B notation if you want more readability. the limitation you mention only applies when you interpret a regular decimal number as if it were a string representation of a binary number.
maybe i’m not explaining it well. here is your example of using BITS op:
Set 4 lowest bits in X to 1010:
BITS X 1 1010
here you have a decimal number (one thousand and ten) represent a binary number 1010. if instead of a value you stored in a variable:
Z 1010; BITS X 1 Z
and then used this variable with any other op it would get interpreted as one thousand and ten. it would only get interpreted as a binary number (0b1010 using C notation) by the BITS op - which creates a special case and possible confusion. what i suggest is keeping the benefit of binary representation but not creating any special cases, by allowing to specify values for any ops using binary and hex in addition to decimal. with this approach your example would look like this:
BITS X 1 B1010
B prefix tells teletype: interpret this as a binary number. X would represent hex. you could rewrite the above line like this:
BITS X 1 10 (since binary 1010 is 10 in decimal system)
or like this:
BITS X 1 XA (hex A is 10 in decimal system)
another example, all these numbers are equal: XFF, 255, B11111111
i think BITS is more readable. in terms of getters / setters, you could just do:
BITS value index returns the current 4 bits at the index
BITS value index bits sets the bits at the index
for the index, that’s the index of the group of 4 bits, correct? any particular reason for this index to be 1-based instead of 0-based? we have a mix of both approaches in teletype but for the bit ops 0-based feels more natural.
for representation, we could update the variable view in live screen, one question would be, do we display all numbers as binary? selected? this can get complicated. changing pattern view would be a more significant change.