thanks for all your help guys. ppc386 especially. this bit of code does work on its own but if i am to insert it into a program, where exactly do i put everything. for instance, this is my first dealing with a 'function' and also with 'boolean' i do know all the boolean gates and what they do...