Question: 2. Consider the hypothetical machine: Instruction Format: 16 bits (bits 0 to 3 for the opcode; 4 to 15 for the address) (a) Integer Format:

2. Consider the hypothetical machine: Instruction Format: 16 bits (bits 0 to 3 for the opcode; 4 to 15 for the address) (a) Integer Format: sign magnitude (bit 0 for the sign; 1 to 15 for the magnitude) (b) Integer Format 2's complement PC: IR: AC: Program Counter Instruction Register 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 to AC from memory address 0111 Load register R1 from memory 0110 Load AC from I/O 1000 Store AC into I/O 1001 Move R1 to AC Write a program that: (1) loads data from memory into accumulator; (2) loads data from memory into R1; (3) adds data from accumulator and register 1, and (4) store the result from accumulator into the memory. The code starts at address (2B4)H and data at address (572)H. Solve the problem in two situations considering that your data is (a) 4 and (-4) in decimal represented in sign magnitude and (b) 10 and (-10) in decimal represented in 2's complement. Trace the execution
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
