Najemy, Daniel wrote: > > I have a byte (let's call it TEMP), and I'm trying to logically 'OR' > together 3 of the bits within the byte. > > ie. RESULT = (TEMP,3) or (TEMP,4) or (TEMP,5) > > Any ideas on how to implement this? bcf nResultByte, bResultBit ; assume result bit is zero movf nTemp,W andlw (1<<3 + 1<<4 + 1<< 5) ; w := 00xyz0000 btfss STATUS,Z bsf nResultByte, bResultBit ; sets result bit I think this should do it. If all the bits 3, 4 and 5 are zero, W := z, the zero flag is set and the result bit is not