I might not have been clear in my first question... What I need to do is xor the lsb together ie;; Take the 4 least significant bits as individual bits. and xor together b3 xor b2 xor b1 xor b0 == if result = 1 then do "branch" branch elsewhere if result is zero Is this what the example from Tony Nixon does or does it xor the bits with some other value.? Paul B. Webster VK2BZC wrote: > Steve Kasm wrote: > > > myreg == 00010111 > > > what I would like to do is take the 4 least significant bits ie: bits > > 0-3 and do an xor on them. I then need to store the result in another > > register to allow for a conditional branch afterwards. > > > My problem is : How do I perform the xor on only the first 4 bits. How > > to store result.? > > Tony Nixon's reply is noted. If however your question is that you > want an XOR on the LSN with the MSN unchanged, rather than zeroed, then > you need to mask the data with which you will XOR, first. But I'm > sure you can figure that out from Tony's post. > -- > Cheers, > Paul B.