On Thu, 30 Apr 1998 16:29:33 +0100 Michael Hearn writes: >Dear all, > >I need to NOT a number for a control project my school is doing. >However, >the instruction set for the PIC chip does not have a NOT. Yes it does; the instruction is 'comf' (Complement F). It inverts all bits in a byte. It is very similar to 'clrf' and 'movf' in that the result can be sent to W or back to RAM. Of course you can also complement using xor. Xoring with 0xff inverts all bits. This is useful to complement ('NOT') W without needing to copy to RAM first. Just use xorlw h'ff' (Hexadecimal FF is binary 11111111). (W= 01011100 before) xorlw h'ff' (Now W = 10100011) _____________________________________________________________________ You don't need to buy Internet access to use free Internet e-mail. Get completely free e-mail from Juno at http://www.juno.com Or call Juno at (800) 654-JUNO [654-5866]