Alterna · learning material
Duplicate coding
Duplicate code, digit translation, pixel grid, text and image encoded in binary form.
What this material covers
- Why the binary system?
- Number Translation
- Pixel Grid
- Text coding
- Two steps.
- Graph: I = K × i
- Graph: I = x x y x i
- Visualizer for dual bits
- Tasks from the bank
- Mini test
Content and key concepts
← Back to contents
Alterna · Chapter 11 · page 11.3
Duplicate coding
Duplicate code, digit translation, pixel grid, text and image encoded in binary form.
01
Why the binary system?
The computer works with two states: current / no current
GEF 9.2.1
PIF 3.1
Computer electronic components (transistors) have two stable states:
included (1)
and
off (0)
Therefore, all information is coded by sequences of zeros and units —
By binary codes
.
One binary = 1
bt
8 bits = 1
Byte
One byte may store a number from 0 to 255.
1 bit
0 or 1
1 byte
8 bits, 0-255
2 bytes
16 bits, 0 - 65535
4 bytes
32 bits
02
Number Translation
Decimal Vintage
OGE
From binary to decimal:
Each number is multiplied by 2 to the degree of its position (right starting at 0).
1011₂ = 1·2³ + 0·2² + 1·2¹ + 1·2⁰ = 8+0+2+1 = 11
From decimal to binary:
The number is divided consecutively by 2, the residues are recorded from the bottom up.
11 → 11/2=5(1), 5/2=2(1), 2/2=1(0), 1/2=0(1) → 1011₂
Interactor: Converter
Enter the number in any system - see the result
Decimal
Bizarre
03
Pixel Grid
Draw with binary bits — each pixel = 0 or 1
OGE
FOP
Interactor: Bivoic artist
You can click on the cells 1 (black) or 0 (white).
04
Text coding
Each symbol is a binary code
EGE
Interactor: Text \\\dinical code
Enter the text and see his binary presentation.
05
Two steps.
Remember, it'll come in handy on the exam!
Degree
Meaning
Application
2⁰
1
—
2¹
2
—
2²
4
—
2³
8
Bit in bat... no, 8 bits = 1 byte
2⁴
16
1 16th digit symbol
2⁸
256
Symbols in 1 byte (one byte encoding)
2¹⁰
1024
1 Kbyte
2¹⁶
65 536
65536 characters (Unicode BMP)
2²⁰
1 048 576
1 Mbit
2³⁰
1 073 741 824
1 Gbyte
06
Graph: I = K × i
Translate the text: Change the number of symbols and the depth of the coding
OGE
FOP
Interactive Graphics
K is the number of symbols
1
100
1000
i is the weight of the symbol (bit)
1
8
32
I =
100
×
8
=
800 bits
=
100 bytes
07
Graph: I = x x y x i
Show image: Change resolution and color depth
EGE
FOP
An interactive graphics view
x is the width (pix)
32
y = height (pix)
24
i = colour depth (beat)
8
I =
32
×
24
×
8
=
6 144 bits
=
768 bytes
32 x 24 = 768 pix
08
Visualizer for dual bits
Move the number — Look at what bits light up
OGE
Interactor · Decimal bits
Number:
170
09
Tasks from the bank
EEG / EEG
Book of tasks · Divid coding
10
Mini test
Five random questions from Bank 40.
FOP
0 / 500 XP
0 / 5
Press "Start Quest" for starters.