Hi Olin. X = 0x00, result: Cy=1,X=0xFF X = 0x80, result: Cy=0,X=0xFF X = 0xFF, result: Cy=1,X=0xFD rlf x,F Cy=0,X=0x00/0x01 ;Cy Cy=1,X=0x00/0x01 ;Cy Cy=1,X=0xFE/0xFF bcf x,0 Cy=0,X=0x00 Cy=1,X=0x00 Cy=1,X=0xFE decf x,F Cy=0,X=0xFF Cy=1,X=0xFF Cy=1,X=0xFD WBR Dmitry. Olin Lathrop wrote: > > > So now what about _tinest_code_ for 2*X - 1 ? > > (X is byte, the same) > > The obvious brute force technique that comes to mind is just an extension of > the previous challange: > > rlf x ;X*2, garbage in low bit > bcf x, 0 ;X*2, low bit correct > decf x ;X*2 - 1 -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics