Understanding Logic Locking