# Generating b/w bitmaps from a binary sequence

I would like to make a bitmap that visually represents a binary sequence, something like this:

Where for example the 1's become a black pixel and the 0's a white one. I have never done something similar on Mathematica, so I need some guidance for this. Any idea appreciated. Please note that I'm a beginner at this programming language, so keep it easy please. Thanks in advance.

data = RandomInteger[1, {300, 300}];

Image[data]


or

Graphics[Raster[data]]


You can also try:

ArrayPlot[data]
RandomImage[BernoulliDistribution[1/2], {300, 300}]


etc.

    ListDensityPlot[Table[RandomInteger[{0, 1}], {100}, {100}],
InterpolationOrder -> 0,
ColorFunction -> GrayLevel]


• Not sure why but this one kept running for a while and then crashed my poor laptop. Thanks anyway! – Snowflake Mar 2 '15 at 23:09
• Mine rendered in 0.5341 seconds using v. 10.0.0 on a Mac Pro. – David G. Stork Mar 2 '15 at 23:30