fixed inefficient code for compiling complimented bit.