Recent Changes - Search:

Introduction to Microcontroller Programming

About PICmicro Chips

Clocking Your PICmicro Devices

E-Blocks

Flowcode Step By Step

PICmicro Projects

Labs

Converting Numbers

<^< Binary Numbers | Course Index | Outputting Numbers >^>

Let's pull some results out of the table given earlier:

Decimal numberSame number in binary
11
210
4100
81000

Each time the binary '1' moves one place to the left, it doubles in value in decimal. We can use this idea to convert from one system to the other.

Binary number Decimal value
16 8 4 2 1
1 1
1 0 2
1 0 0 4
1 0 0 0 8
so
1 1 1 7
1 0 0 1 9
1 0 1 0 0 20
1 1 1 1 1 31

Did you spot the method?

In any binary number, the bit at the left-hand end has the highest value. This is known as the Most Significant Bit, (MSB). The one at the right-hand end is worth least, and is the Least Significant Bit, (LSB). For example:

MSB LSB
1 0 0 1 0 1 1 1

<^< Binary Numbers | Course index | Outputting Numbers >^>

Print - Search - Login

Page last modified on August 22, 2011, at 02:24 PM