#TI-Basic (TI-84 Plus CE), 85 bytes
TI-Basic (TI-84 Plus CE), 85 bytes
Prompt L
1→X
1→Y
DelVar [A]
sum(LL
{Ans,1-Ans+dim(LL→dim([A]
1→[A](Y,X
For(I,2,dim(LL
Y+LL(I→Y
X+not(LL(I→X
1→[A](Y,X
End
[A]
Prompts for a boolean list, returns a matrix of 0 and 1.
Goes through the list, incrementing X if the next 'bit' is 0, changing Y otherwise, then adding a 1 to the matrix at that location, and returns the matrix at the end.
TI-Basic is a tokenized lanugage.
- 1 byte:
Prompt,L*6, (newline)*12,1*5,→*7,X*5,Y*5,sum(,L*5,{,Ans*2,,*5,-,+*3,dim(*3,(*4,For(,I*3,2,not(,End= 73 bytes - 2 bytes:
Delvar,[A]*5 = 12 bytes - Total: 85 bytes
#TI-Basic (TI-84 Plus CE), 56 bytes
TI-Basic (TI-84 Plus CE), 56 bytes
Prompt L
1→X
1→Y
Output(Y,X,"*
For(I,2,dim(LL
Y+LL(I→Y
X+not(LL(I→X
Output(Y,X,"*
End
Same processs as above, but using graphical output (limited by screen size: 10 rows, 26 columns, so max 10 1s and 25 0s) as it goes, instead of adding to a matrix.
#TI-Basic (TI-84 Plus CE), 85 bytes
Prompt L
1→X
1→Y
DelVar [A]
sum(LL
{Ans,1-Ans+dim(LL→dim([A]
1→[A](Y,X
For(I,2,dim(LL
Y+LL(I→Y
X+not(LL(I→X
1→[A](Y,X
End
[A]
Prompts for a boolean list, returns a matrix of 0 and 1.
Goes through the list, incrementing X if the next 'bit' is 0, changing Y otherwise, then adding a 1 to the matrix at that location, and returns the matrix at the end.
TI-Basic is a tokenized lanugage.
- 1 byte:
Prompt,L*6, (newline)*12,1*5,→*7,X*5,Y*5,sum(,L*5,{,Ans*2,,*5,-,+*3,dim(*3,(*4,For(,I*3,2,not(,End= 73 bytes - 2 bytes:
Delvar,[A]*5 = 12 bytes - Total: 85 bytes
#TI-Basic (TI-84 Plus CE), 56 bytes
Prompt L
1→X
1→Y
Output(Y,X,"*
For(I,2,dim(LL
Y+LL(I→Y
X+not(LL(I→X
Output(Y,X,"*
End
Same processs as above, but using graphical output (limited by screen size: 10 rows, 26 columns, so max 10 1s and 25 0s) as it goes, instead of adding to a matrix.
TI-Basic (TI-84 Plus CE), 85 bytes
Prompt L
1→X
1→Y
DelVar [A]
sum(LL
{Ans,1-Ans+dim(LL→dim([A]
1→[A](Y,X
For(I,2,dim(LL
Y+LL(I→Y
X+not(LL(I→X
1→[A](Y,X
End
[A]
Prompts for a boolean list, returns a matrix of 0 and 1.
Goes through the list, incrementing X if the next 'bit' is 0, changing Y otherwise, then adding a 1 to the matrix at that location, and returns the matrix at the end.
TI-Basic is a tokenized lanugage.
- 1 byte:
Prompt,L*6, (newline)*12,1*5,→*7,X*5,Y*5,sum(,L*5,{,Ans*2,,*5,-,+*3,dim(*3,(*4,For(,I*3,2,not(,End= 73 bytes - 2 bytes:
Delvar,[A]*5 = 12 bytes - Total: 85 bytes
TI-Basic (TI-84 Plus CE), 56 bytes
Prompt L
1→X
1→Y
Output(Y,X,"*
For(I,2,dim(LL
Y+LL(I→Y
X+not(LL(I→X
Output(Y,X,"*
End
Same processs as above, but using graphical output (limited by screen size: 10 rows, 26 columns, so max 10 1s and 25 0s) as it goes, instead of adding to a matrix.
#TI-Basic (TI-84 Plus CE), 85 bytes
Prompt L
1→X
1→Y
DelVar [A]
sum(LL
{Ans,1-Ans+dim(LL→dim([A]
1→[A](Y,X
For(I,2,dim(LL
Y+LL(I→Y
X+not(LL(I→X
1→[A](Y,X
End
[A]
Prompts for a boolean list, returns a matrix of 0 and 1.
Goes through the list, incrementing X if the next 'bit' is 0, changing Y otherwise, then adding a 1 to the matrix at that location, and returns the matrix at the end.
TI-Basic is a tokenized lanugage.
- 1 byte:
Prompt,L*6, (newline)*12,1*5,→*7,X*5,Y*5,sum(,L*5,{,Ans*2,,*5,-,+*3,dim(*3,(*4,For(,I*3,2,not(,End= 73 bytes - 2 bytes:
Delvar,[A]*5 = 12 bytes - Total: 85 bytes
#TI-Basic (TI-84 Plus CE), 56 bytes
Prompt L
1→X
1→Y
Output(Y,X,"*
For(I,2,dim(LL
Y+LL(I→Y
X+not(LL(I→X
Output(Y,X,"*
End
Same processs as above, but using graphical output (limited by screen size: 10 rows, 26 columns, so max 10 1s and 25 0s) as it goes, instead of adding to a matrix.