Base arithmetics