Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Consider the hypothetical machine: Instruction Format: 16 bits (bits 0 to 3 for the opcode; 4 to 15 for the address) Integer Format: sign magnitude
- Consider the hypothetical machine:
Instruction Format: 16 bits (bits 0 to 3 for the opcode; 4 to 15 for the address)
- Integer Format: sign magnitude (bit 0 for the sign; 1 to 15 for the magnitude)
- Integer Format 2s 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.
-
- 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.
-
- Solve the problem in two situations considering that your data is (a) 64 and (-20) in decimal represented in sign magnitude and (b) in 2s complement.
- Trace the execution.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started