According to one embodiment, an information processing apparatus includes
a display unit pivotally installed on a housing and including a magnet
unit, a magnetic sensor unit incorporated in the housing to detect a
movement of the magnet unit, a conversion unit which converts a magnetic
force detected by the magnetic sensor unit into a pulse signal having a
pulse width, a detection unit which detects an angle made by the display
unit and the housing based on the pulse signal converted by the
conversion unit and having the pulse width, a storage unit which stores
table information storing an operation corresponding to a predetermined
angle, and an operation unit which performs the predetermined operation
based on the table information when the detected angle has increased to
the predetermined angle, and performs the predetermined operation based
on the table information when the detected angle has decreased to the
predetermined angle.