28128 Parallax Inc, 28128 Datasheet - Page 38

no-image

28128

Manufacturer Part Number
28128
Description
KIT BASIC ANALOG/DIGI PARTS ONLY
Manufacturer
Parallax Inc
Datasheet

Specifications of 28128

Accessory Type
ADC, DAC
Product
Microcontroller Accessories
For Use With/related Products
BASIC Stamp® 2 and Board of Education
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Here's something new. The modifier
variable
LOOP
Counting in Binary
Table 2-1 shows how to count from 0 to 3 using 2-bit binary numbers and how to count
from 0 to 7 using 3-bit binary numbers.
Note that four numbers (decimal 0 through 3) can be represented with a 2-bit binary
number. Eight numbers (0 through 7) can be represented with a 3-bit binary number. 4-
bits can describe 16 different numbers, 5-bits can describe 32 different numbers and so
on.
You can always determine how many counting numbers (combinations of 0s and 1s) can
come from a given number of bits by using this formula:
This means the number of combinations equals two raised to the power of the number of
bits. For 2-bits, the number of combinations is 2
combinations is 2
command.
LOOP
d.
DEBUG "Decimal equivalent: ", DEC1 d, CR
Decimal number
Because this is the last instruction we want to repeat, it’s followed by the
combinations = 2
3
Table 2-1:Measured voltages during charge cycle
= 8, and so on.
0
1
2
3
4
5
6
7
2-bit binary
representation
bits
DEC
00
01
10
11
was used to print the decimal value of the
3-bit binary
representation
2
= 4. For 3-bits, the number of
000
001
010
011
100
101
110
111

Related parts for 28128