Data Sheet

-131-
350. Quantization and Encoding
Connect points E and F with a 4-wire (4) in project #347. Press the
press switch (61) for a while and you will hear space battle sounds in
soft volume. This is because the 100W resistor (41) limits the current
through the speaker (93). Release the press switch (61) and wait for
a while. You will eventually hear the space battle sounds start breaking
up and fading out.
The picture below shows the process of quantization and encoding of
the quantized values to a digital bit steam. Notice how the samples are
“quantized” to one of 16 levels.
351. Decimal to Binary Conversion
Connect points G and H with a 4-wire (4) in project #347. Press the
press switch (61) for a while and you will hear music in soft volume.
This is because the 100W resistor (41) limits the current through the
speaker (93). Release the press switch (61) and wait for a while. You
will eventually hear the music start breaking up and fading out. The
sample levels in project #350 can be converted to bit sequences of 0s
and 1s through decimal to binary conversion.
Binary numbers only use 1s and 0s, and thus the numbers 0 through
7 can be represented in binary as shown in the table shown on the left.
Further, the leftmost digit in a binary sequence is also commonly used
to show the sign (positive of negative) of the number with a 0 meaning
positive and a 1 meaning negative.
Decimal Binary
7 111
6 110
5 101
4 100
3 011
2 010
1 001
0 000
Decimal Binary
-1 1001
-2 1010
-3 1011
-4 1100
-5 1101
-6 1110
-7 1111
-8 1000
[ 350 - 351 ]