13 Integer bonus
source | link

Mathematica 174 145 139 118 119119 123 chars

Below is the most recent versionNow works with input in base 10 (Integer bonus). Earlier Earlier versions can be found in edits.


Using ArrayPlot:

With ArrayPlot we can directly convert the 1's and 0's to black and white squares, saving a few chars in the process. For example, with n = 58021, which is 330221112032022211 in base 4:

i = IntegerDigits; i@ni[n, 4] /. Thread@Rule[0~Range~3, ArrayPlot /@ ((PadLeft[#, 4] & /@ i[#, 2]) & /@ (i@{89998, 62227, 89248, 81718} /. {8 -> 15}))]

largeNinteger bonus


Explanation

Input is program parameter, n.

Zero can be represented by {{1,1,1,1},{1,0,0,1},{1,0,0,1},{1,0,0,1},{1,1,1,1} or by the hex counterpart f999f.

The expression, f999f62227f924ff171f, holds the information to display all the numbers {0,1,2,3}. (Note: it begins with f999f, which as we noted, is zero in disguise.) Because Mathematica does not recognize this as a number, I used 89998622278924881718 (in four integer strings) instead, broke up the number into its integer digits, and then used 15 in every place an 8 appeared. (That allowed me to use digits instead of strings throughout.)

Mathematica 174 145 139 118 119 chars

Below is the most recent version. Earlier versions can be found in edits.


Using ArrayPlot:

With ArrayPlot we can directly convert the 1's and 0's to black and white squares, saving a few chars in the process. For example, with n = 3302211120:

i = IntegerDigits; i@n /. Thread@Rule[0~Range~3, ArrayPlot /@ ((PadLeft[#, 4] & /@ i[#, 2]) & /@ (i@{89998, 62227, 89248, 81718} /. {8 -> 15}))]

largeN


Explanation

Input is program parameter, n.

Zero can be represented by {{1,1,1,1},{1,0,0,1},{1,0,0,1},{1,0,0,1},{1,1,1,1} or by the hex counterpart f999f.

The expression, f999f62227f924ff171f, holds the information to display all the numbers {0,1,2,3}. (Note: it begins with f999f, which as we noted, is zero in disguise.) Because Mathematica does not recognize this as a number, I used 89998622278924881718 instead, broke up the number into its integer digits, and then used 15 in every place an 8 appeared. (That allowed me to use digits instead of strings throughout.)

Mathematica 174 145 139 118 119 123 chars

Now works with input in base 10 (Integer bonus). Earlier versions can be found in edits.


Using ArrayPlot:

With ArrayPlot we can directly convert the 1's and 0's to black and white squares, saving a few chars in the process. For example, with n = 58021, which is 32022211 in base 4:

i = IntegerDigits; i[n, 4] /. Thread@Rule[0~Range~3, ArrayPlot /@ ((PadLeft[#, 4] & /@ i[#, 2]) & /@ (i@{89998, 62227, 89248, 81718} /. {8 -> 15}))]

integer bonus


Explanation

Input is program parameter, n.

Zero can be represented by {{1,1,1,1},{1,0,0,1},{1,0,0,1},{1,0,0,1},{1,1,1,1} or by the hex counterpart f999f.

The expression, f999f62227f924ff171f, holds the information to display all the numbers {0,1,2,3}. (Note: it begins with f999f, which as we noted, is zero in disguise.) Because Mathematica does not recognize this as a number, I used 89998622278924881718 (in four integer strings) instead, broke up the number into its integer digits, and then used 15 in every place an 8 appeared. (That allowed me to use digits instead of strings throughout.)

12 I had miscounted the characters
source | link

Mathematica 174 145 139 118 110119 chars

Below is the most recent version. Earlier versions can be found in edits.


Using ArrayPlot:

With ArrayPlot we can directly convert the 1's and 0's to black and white squares, saving a few chars in the process. For example, with n = 3302211120:

i = IntegerDigits; i@n /. Thread@Rule[0~Range~3, ArrayPlot /@ ((PadLeft[#, 4] & /@ i[#, 2]) & /@ (i@{89998, 62227, 89248, 81718} /. {8 -> 15}))]

largeN


Explanation

Input is program parameter, n.

Zero can be represented by {{1,1,1,1},{1,0,0,1},{1,0,0,1},{1,0,0,1},{1,1,1,1} or by the hex counterpart f999f.

The expression, f999f62227f924ff171f, holds the information to display all the numbers {0,1,2,3}. (Note: it begins with f999f, which as we noted, is zero in disguise.) Because Mathematica does not recognize this as a number, I used 89998622278924881718 instead, broke up the number into its integer digits, and then used 15 in every place an 8 appeared. (That allowed me to use digits instead of strings throughout.)

Mathematica 174 145 139 118 110 chars

Below is the most recent version. Earlier versions can be found in edits.


Using ArrayPlot:

With ArrayPlot we can directly convert the 1's and 0's to black and white squares, saving a few chars in the process. For example, with n = 3302211120:

i = IntegerDigits; i@n /. Thread@Rule[0~Range~3, ArrayPlot /@ ((PadLeft[#, 4] & /@ i[#, 2]) & /@ (i@{89998, 62227, 89248, 81718} /. {8 -> 15}))]

largeN


Explanation

Input is program parameter, n.

Zero can be represented by {{1,1,1,1},{1,0,0,1},{1,0,0,1},{1,0,0,1},{1,1,1,1} or by the hex counterpart f999f.

The expression, f999f62227f924ff171f, holds the information to display all the numbers {0,1,2,3}. (Note: it begins with f999f, which as we noted, is zero in disguise.) Because Mathematica does not recognize this as a number, I used 89998622278924881718 instead, broke up the number into its integer digits, and then used 15 in every place an 8 appeared. (That allowed me to use digits instead of strings throughout.)

Mathematica 174 145 139 118 119 chars

Below is the most recent version. Earlier versions can be found in edits.


Using ArrayPlot:

With ArrayPlot we can directly convert the 1's and 0's to black and white squares, saving a few chars in the process. For example, with n = 3302211120:

i = IntegerDigits; i@n /. Thread@Rule[0~Range~3, ArrayPlot /@ ((PadLeft[#, 4] & /@ i[#, 2]) & /@ (i@{89998, 62227, 89248, 81718} /. {8 -> 15}))]

largeN


Explanation

Input is program parameter, n.

Zero can be represented by {{1,1,1,1},{1,0,0,1},{1,0,0,1},{1,0,0,1},{1,1,1,1} or by the hex counterpart f999f.

The expression, f999f62227f924ff171f, holds the information to display all the numbers {0,1,2,3}. (Note: it begins with f999f, which as we noted, is zero in disguise.) Because Mathematica does not recognize this as a number, I used 89998622278924881718 instead, broke up the number into its integer digits, and then used 15 in every place an 8 appeared. (That allowed me to use digits instead of strings throughout.)

11 large N included
source | link

Mathematica 174 145 139 118 110 chars

Below is the most recent version. Earlier versions can be found in edits.


Using ArrayPlot:

With ArrayPlot we can directly convert the 1's and 0's to black and white squares, saving a few chars in the process. For example, with n = 330213302211120:

i = IntegerDigits; i@n /. Thread@Rule[0~Range~3, ArrayPlot /@ ((PadLeft[#, 4] & /@ i[#, 2]) & /@ (i@{89998, 62227, 89248, 81718} /. {8 -> 15}))]

black squareslargeN


Explanation

Input is program parameter, n.

Zero can be represented by {{1,1,1,1},{1,0,0,1},{1,0,0,1},{1,0,0,1},{1,1,1,1} or by the hex counterpart f999f.

The expression, f999f62227f924ff171f, holds the information to display all the numbers {0,1,2,3}. (Note: it begins with f999f, which as we noted, is zero in disguise.) Because Mathematica does not recognize this as a number, I used 89998622278924881718 instead, broke up the number into its integer digits, and then used 15 in every place an 8 appeared. (That allowed me to use digits instead of strings throughout.)

Mathematica 174 145 139 118 110 chars

Below is the most recent version. Earlier versions can be found in edits.


Using ArrayPlot:

With ArrayPlot we can directly convert the 1's and 0's to black and white squares, saving a few chars in the process. For example, with n = 33021:

i = IntegerDigits; i@n /. Thread@Rule[0~Range~3, ArrayPlot /@ ((PadLeft[#, 4] & /@ i[#, 2]) & /@ (i@{89998, 62227, 89248, 81718} /. {8 -> 15}))]

black squares


Explanation

Input is program parameter, n.

Zero can be represented by {{1,1,1,1},{1,0,0,1},{1,0,0,1},{1,0,0,1},{1,1,1,1} or by the hex counterpart f999f.

The expression, f999f62227f924ff171f, holds the information to display all the numbers {0,1,2,3}. (Note: it begins with f999f, which as we noted, is zero in disguise.) Because Mathematica does not recognize this as a number, I used 89998622278924881718 instead, broke up the number into its integer digits, and then used 15 in every place an 8 appeared. (That allowed me to use digits instead of strings throughout.)

Mathematica 174 145 139 118 110 chars

Below is the most recent version. Earlier versions can be found in edits.


Using ArrayPlot:

With ArrayPlot we can directly convert the 1's and 0's to black and white squares, saving a few chars in the process. For example, with n = 3302211120:

i = IntegerDigits; i@n /. Thread@Rule[0~Range~3, ArrayPlot /@ ((PadLeft[#, 4] & /@ i[#, 2]) & /@ (i@{89998, 62227, 89248, 81718} /. {8 -> 15}))]

largeN


Explanation

Input is program parameter, n.

Zero can be represented by {{1,1,1,1},{1,0,0,1},{1,0,0,1},{1,0,0,1},{1,1,1,1} or by the hex counterpart f999f.

The expression, f999f62227f924ff171f, holds the information to display all the numbers {0,1,2,3}. (Note: it begins with f999f, which as we noted, is zero in disguise.) Because Mathematica does not recognize this as a number, I used 89998622278924881718 instead, broke up the number into its integer digits, and then used 15 in every place an 8 appeared. (That allowed me to use digits instead of strings throughout.)

10 major simplification
source | link
9 accepted black squares as legitimate.
source | link
8 character count corrected
source | link
7 Bending the rules
source | link
6 explanation added.
source | link
5 eliminated d and carriage returns
source | link
4 used base 16
source | link
3 corrected error for drawing "1"
source | link
2 added 6 characters in body
source | link
1
source | link