"""
Calculation for Computer Science
Q=9/10
"""

class CalculationComputerScience:
    def __init__(self):
        self.pi = 3.141592653589793
        self.e = 2.718281828459045

    @staticmethod
    def gcd(a, b):
        while b:
            a, b = b, a % b
        return a

    @staticmethod
    def lcm(a, b):
        return abs(a * b) // CalculationComputerScience.gcd(a, b)

    @classmethod
    def factorial(cls, n):
        if n < 0:
            raise ValueError("Factorial is not defined for negative numbers")
        result = 1
        for i in range(2, n + 1):
            result *= i
        return result

    def convert_to_binary(self, decimal_number: int) -> str:
        return bin(decimal_number).replace("0b", "")

    def convert_from_binary(self, binary_str: str) -> int:
        return int(binary_str, 2)

    def xor_bits(self, a: int, b: int) -> int:
        return a ^ b

    def and_bits(self, a: int, b: int) -> int:
        return a & b

    def or_bits(self, a: int, b: int) -> int:
        return a | b

    @