Deutsch · English · Français · Español · العربية · 中文
Automatic translation of the original German version: Claude, an AI model by Anthropic.
Pixels, bits and powers
How does a picture get onto a screen? At the very bottom it is simple: each pixel is either on or off – current or no current. And because eight pixels fit into one memory cell, a pattern becomes a number.
How it started
The idea comes from a pocket computer: the Sharp PC-1402, programmable in BASIC. With the command POKE 8192,240 you wrote the number 240 into memory cell 8192 – and a column of pixels lit up on the display. The column to its left belonged to address 8193, the next one to 8194. Anyone who knew which number switches on which pixels could draw their own pictures on the display with a few lines of BASIC.
The display
Each column is a memory cell with an address: 8192 on the far right, 8193 to its left, and so on. Each row has a value: 1 at the very bottom, above it 2, 4, 8 … up to 128 at the top. Click the pixels – below each column you see which number is stored in the memory cell.
All eight pixels of a column on: 128+64+32+16+8+4+2+1 = 255
The picture as commands
This is how the computer writes your picture into memory:
POKE it yourself
One command per line: POKE address, value
Why exactly 1, 2, 4, 8 …?
A pixel knows only two states: on or off. That is why the computer counts in twos – with powers of 2. In 27, 2 is the base and 7 the exponent: it says how many times the base is multiplied by itself.
| 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 |
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
The last place is remarkable: 20 = 1. This follows from the rule that you subtract the exponents when dividing: 22 : 22 = 22−2 = 20 – and a number divided by itself is 1. Going further, you get 2−1 = ½, 2−2 = ¼ and so on.
Every number from 0 to 255 can be made from these eight values in exactly one way. 131, for example, is 128 + 2 + 1: the top pixel and the two bottom pixels light up.