28128 Parallax Inc, 28128 Datasheet - Page 39

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
Converting from binary to decimal takes two steps. The first step is to multiply each bit
by its power of two. Table 2-2 shows the powers of two for up to 8-bits. When you
multiply each bit by its value from Table 2-2, you end up with a series of decimal values.
The second step is to add up all the decimal values.
As an example, let’s convert binary-1011 to decimal. First, multiply each bit by its power
of two from Table 2-2.
Second, add all 4 of the decimal values:
Now we know the binary number 1011 is equal to the decimal number 11.
8 × 1 = 8
4 × 0 = 0
2 × 1 = 2
1 × 1 = 1
8 + 0 + 2 + 1 = 11
Bit multipliers and Powers of Two: Bit-0 is the least significant bit (LSB) and bit-7 is the
most significant bit (MSB). That’s because bit-0 makes the smallest contribution to the
number and bit-7 makes the largest contribution. Thinking about a binary number as starting
on the left with bit-7 and ending on the right with bit-0 is useful because these numbers
indicate the power of 2 for each digit.
Examples:
The multiplier for bit-0 is 1, which equals 2
The multiplier for bit-1 is 2, which equals 2
The multiplier for bit-7 is 128, which equals 2
Note: You can use powers of two to extend Table 2-2 to any number of bits!
Bit
Multiplier
Table 2-2: Bit Multipliers for an 8-bit Binary Number
128
7
64
6
32
5
0
1
.
.
7
.
16
4
3
8
2
4
1
2
0
1

Related parts for 28128