SECTION V-2: Data Format Representation Binary Numbers

There is only on way to represent  binary numbers in a PIC assembler. It is as follows.

MOVLW B'10011001 ;WREG = 10011001 or 99 in Hex

 

 

The lowercase b will also work. ' is the single quote key, which is on the same key as the double quotes ". This is different from other assemblers such as the 8051 and x86.

MOVLW B'00100101 ;WREG = 25H
ADDLW B'00010001 ;WREG = 25H + 11H = 36H

 

 

 

 

More From Iamtechnical.com

Advertisement:

SiteLock