A more common compiler requirement is do this kind of operation with out changing register C unless it is needed. ie pre-setting C has lots of problems if C is volitile. I think that will take 6 instructions. (can it be done in less?) btfsc A btfss B goto clear bsf C goto done clear bcf C done Walter Banks http://www.bytecraft.com > > Scott Dattalo wrote: > > > How fast can you logically AND two bits? > > > > Given: > > bit_a of register A > > bit_b of register B > > bit_c of register C > > > > The goal in C parlance is: > > > > C.bit_c = A.bit_a & B.bit_b; > > John Payson wrote: > > > > > > bsf C > > btfsc A > > btfss B > > bcf C