Question 63
The following program is stored in the memory unit of the basic computer. Give the content of accumulator register in hexadecimal after the execution of the program.
Location | Instruction |
010 | CLA |
011 | ADD 016 |
012 | BUN 014 |
013 | HLT |
014 | AND 017 |
015 | BUN 013 |
016 | C1A5 |
017 | 9306 |
Answer 4
Previous | Next |
UGC NET CS December 2019 - Question 62 | UGC NET CS December 2019 - Question 64 |
Step 1 of 1
ReplyDeleteThe contents of AC, PC and IR, after the implementation of given program in memory unit of the basic computer, are as follows:
• At location 010, the instruction set CLA is used to clear the accumulator AC. Therefore, the content of AC, PC and IR are 0000, 011 and 7800 respectively.
Location
Instruction Set
Accumulator (AC)
Program Counter (PC)
Instruction Register (IR)
010
CLA
0000
011
7800
• At location 011, the instruction set ADD is used to add C1A5 to accumulator AC. Therefore, the content of AC, PC and IR are C1A5, 012 and 1016 respectively.
Location
Instruction Set
Accumulator (AC)
Program Counter (PC)
Instruction Register (IR)
011
ADD 016
C1A5
012
1016
• At location 012, the instruction set BUN is used for branch unconditionally to AND 9306. Therefore, the content of AC, PC and IR are C1A5, 014 and 4014 respectively.
Location
Instruction Set
Accumulator (AC)
Program Counter (PC)
Instruction Register (IR)
012
BUN 014
C1A5
014
4014
• At location 013, the instruction set HLT is used for halt the computer. Therefore, the content of AC, PC and IR are 8184, 014 and 7001 respectively.
Location
Instruction Set
Accumulator (AC)
Program Counter (PC)
Instruction Register (IR)
013
HLT
8184
014
7001
• At location 014, the instruction set AND 017 is used for AND 9306 to AC. Therefore, the content of AC, PC and IR are 8184, 015 and 0017 respectively.
Location
Instruction Set
Accumulator (AC)
Program Counter (PC)
Instruction Register (IR)
014
AND 017
8184
015
0017
• At location 015, the instruction set BUN 013 is used for branch unconditionally to halt computer. Therefore, the content of AC, PC and IR are 8184, 013 and 4013 respectively.
Location
Instruction Set
Accumulator (AC)
Program Counter (PC)
Instruction Register (IR)
015
BUN 013
8184
013
4013
• At location 016 and 017, the instruction set C1A5 and 9306 is used. The accumulator AC is listed below:
Location
Instruction Set
Accumulator (AC)
Program Counter (PC)
Instruction Register (IR)
016
C1A5
Listed below
017
9306
Listed below
AND
=
Where, CLA = Clear AC
ADD = Addition
BUN = Branch Unconditionally
HLT = Halt
Thanks for your help and support. Keep Posting ...
Deletebrilliant
ReplyDelete