Base functionality of calculator component.