src/machine_arithmetic.cpp
void Computer::executeMUL(const InstructionWord& instruction) {
    int32_t valueA = rA.value();
    ComputerWord word;
    int address = getIndexedAddress(instruction, true);
    copyToRegister5(instruction, memory[address], &word);
    int32_t valueM = word.value();
    int64_t result = static_cast<int64_t>(valueA) * static_cast<int64_t>(valueM);
    rA.set(result / (1 << 30));
    rX.set(result % (1 << 30));
}
/** Multiply the values of rA and the word in the memory into rA and rX.
 * 
 * Note that overflow will never be triggered.
 */
Multiply the values of rA and the word in the memory into rA and rX.

Note that overflow will never be triggered.
Multiply the values of rA and the word in the memory into rA and rX . Note that overflow will never be triggered .
void Computer::executeMUL(const InstructionWord& instruction) {
    int32_t valueA = rA.value();
    ComputerWord word;
    int address = getIndexedAddress(instruction, true);
    copyToRegister5(instruction, memory[address], &word);
    int32_t valueM = word.value();
    int64_t result = static_cast<int64_t>(valueA) * static_cast<int64_t>(valueM);
    rA.set(result / (1 << 30));
    rX.set(result % (1 << 30));
}
void Computer :: executeMUL ( const InstructionWord & instruction ) { int32_t valueA = rA . value ( ) ; ComputerWord word ; int address = getIndexedAddress ( instruction , true ) ; copyToRegister5 ( instruction , memory [ address ] , & word ) ; int32_t valueM = word . value ( ) ; int64_t result = static_cast < int64_t > ( valueA ) * static_cast < int64_t > ( valueM ) ; rA . set ( result / ( 1 << 30 ) ) ; rX . set ( result % ( 1 << 30 ) ) ; }
Multiply the values of rA and the word in the memory into rA and rX.
Multiply the values of rA and the word in the memory into rA and rX .