1. clinton

    Thread Starter New Member

    Nov 22, 2008
    1
    0
    Hi i'm kinda new to microcontrollers. In my text book I frequently see the following hex codes: #$01, #$02, #$04, #$08, #$10, #$20, #$40, #$80. What is the significance of these numbers?
     
  2. bertus

    Administrator

    Apr 5, 2008
    15,647
    2,346
    Hello,

    I think they are pointing out the bits in a byte.

    HEX => binairy
    #$01 => 00000001
    #$02 => 00000010
    #$04 => 00000100
    #$08 => 00001000
    #$10 => 00010000
    #$20 => 00100000
    #$40 => 01000000
    #$80 => 10000000

    Greetings,
    Bertus
     
  3. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    The pound sign (#) indicates that it is to be interpreted as a numeric value, the dollar sign ($) indicates the value is in hexidecimal.
     
Loading...