Home / Answered Questions / Other / consider-the-hypothetical-machine-instruction-format-16-bits-bits-0-to-3-for-the-opcode-4-to-15-for--aw665

# (Solved): Consider The Hypothetical Machine: Instruction Format: 16 Bits (bits 0 To 3 For The Opcode; 4 To 15...

1. Consider the hypothetical machine:

Instruction Format: 16 bits (bits 0 to 3 for the opcode; 4 to 15 for the address)

1. Integer Format: sign magnitude (bit 0 for the sign; 1 to 15 for the magnitude)
2. Integer Format 2â€™s complement

PC: Program Counter IR:Instruction Register AC: Accumulator

Partial list of opcodes:

0001     Load AC from memory

0010     Store AC into memory

0100      Add AC and R1, result will be in AC

0101     Add AC with the content at memory address, result will be in AC

0111     Load register R1 from memory

0110     Load AC from I/O buffer

1000     Store AC into I/O buffer

1001     Move R1 to AC

1010     Move AC to R1

The code starts at address (AE0)H and data at address (B72)H.

1. Write a program that: (1) loads data from memory into accumulator; (2) adds the content of accumulator with the content at the variable at the memory address (B72) H, (3) moves the content of accumulator to R1, (4) loads the content of the accumulator from address (B73) H, (5) adds data from accumulator and register 1, and (6) store the result from accumulator into the I/O buffer.
2. Solve the problem in two situations considering that your data is (a) 64 and (-20) in decimal represented in sign magnitude and (b) in 2â€™s complement.
3. Trace the execution.

We have an Answer from Expert