Recent Changes - Search:
<^< New Output | Course index | Converting Numbers >^>

Introduction to Microcontroller Programming * Course Index * Introduction * About the Author * About this Course * Feedback * Course Navigation * Quick Course Navigation * How to use this Course * Acronyms Used and Course Conventions

About PICmicro Chips * What is a PICmicro? * Microcontrollers * Digital versus Analogue * Inputs and Outputs * Memory * Programming * 16F1937 Architecture

Clocking Your PICmicro Devices * Introduction * The Clock Circuit * Clock Settings * Clock Confusion

E-Blocks * Introduction to E-blocks * Using E-blocks * E-blocks Boards

Flowcode Step By Step * Introduction to Flowcode * Basic Flowcode Functions * Digital Outputs ## Set up the Equipment ## Set up the Flowchart ## Adding LED's ## High Speed Simulation ## Slowing it Down ## New Output ##

Binary Numbers ## Converting Numbers ## Outputting Numbers ## A Short Test ## Working in Hex ## Downloading the Program * Digital Inputs * Basic Loops * The LCD Display * Binary Numbers * Decisions * Goto (Connection Point) * 7-Segment Displays * Software Macro * Strings and Memory * A Simple Hi-Fi

PICmicro Projects * Introduction to PICmicro Projects * Construction Methods * Choosing a Power Source * Adding Inputs * Input Conditioning * Adding Outputs * Adding Drivers

Labs * Introduction and Lesson Plan * 1. Output * 2. Delay * 3. Connection Point * 4. Calculations * 5. Loop * 6. Input * 7. Decision * 8. LCD * 9. Keypad * 10. Analogue + EEPROM * 11. Software Macro * 12. External Interrupt * 13. Timer Interrupt

(:Summary:Contains the 'action' links (like Browse, Edit, History, etc.), placed at the top of the page, see site page actions:) (:comment This page can be somewhat complex to figure out the first time you see it. Its contents are documented at PmWiki.SitePageActions if you need help. :) * Print (:comment (:if group Site,SiteAdmin,Cookbook,Profiles,PmWiki*:) (:comment delete if and ifend to enable backlinks:) * %item rel=nofollow class=backlinks accesskey='$[ak_backlinks]'% [[{*$Name}?action=search&q=link={*$FullName} | $[Backlinks] ]] (:ifend:) :) * Login

Binary Numbers

<^< New Output | Course Index | Converting Numbers >^>(:nl:)

It's time to take a look at the binary number system!

Digital electronic devices like the PICmicro microcontroller chip can't cope with the decimal number system (0, 1, 2, ..9 etc.). Instead, they use the binary system. This uses only two numbers 0 and 1. For the PICmicro chip, a number 1 could be a high voltage signal (such as 5V,) while a number 0 could be a low voltage, like 0V.

The table shows how the two systems compare.

Decimal numberSame number in binary
00
11
210
311
4100
5101
6110
7111
81000
91001
101010

With the decimal system, there are ten number figures - 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9. When we get to the last of these figures - 9 - we start again with 0, but we add another number in front of it, e.g. 8, 9, 10 and 18, 19, 20 and so on. When we reach 99, we turn both of these numbers back to 0's and add a 1 in front of them, to make 100.

In binary, the same thing happens, but a lot more often, because there are only two number figures - 0 and 1. <<? Counting up, we start with 0, then 1, then we go back to 0 and add a '1' in front to make 10 (but this isn't ten - it's two) next comes 11 (three) and then we have to go back and start again with 0's and add a '1' in front, to give 100 (four) and so on. (:nl:)(:table style="clear:both":)

(:Summary: Website page footer:)

Print - (:comment (:if group Site,SiteAdmin,Cookbook,Profiles,PmWiki*:) (:comment delete if and ifend to enable backlinks:) %item rel=nofollow class=backlinks accesskey='$[ak_backlinks]'% [[{*$Name}?action=search&q=link={*$FullName} | $[Backlinks] ]] (:ifend:) :) Search - Login

Page last modified on May 03, 2013, at 07:36 AM