lock bit setting circuit & code