The bookshelf acts as a keypad, with the number of books in each compartment being the number. 1 2 3 4 5 6 7 8