Machine Instruction: GATE CS Previous Year Questions

Machine Instruction · Computer Organization and Architecture

36 questions · asked in 19 of 27 years (2000–2026)

MCQ 27 · MSQ 1 · NAT 81-mark 22 · 2-mark 14

2000Questions per year2026

Questions 31–35 of 36

Q31GATE 20031 markMCQ−0.33 if wrong
Consider the following assembly language program for a hypothetical processor. A, B, and C are 8 bit registers. The meanings of various instructions are shown as comments.
      MOV B, # 0    ; B ← 0
      MOV C, # 8    ; C ← 8
Z :   CMP C, # 0    ; compare C with 0
      JZX           ; jump to X if zero flag is set
      SUB C, # 1    ; C ← C - 1
      RRC A, # 1    ; right rotate A through carry by one bit. Thus:
                    ; if the initial values of A and the carry flag are a7...a0 and
                    ; c0 respectively, their values after the execution of this
                    ; instruction will be c0a7...a1 and a0 respectively.
      JC Y          ; jump to Y if carry flag is set
      JMP Z         ; jump to Z
Y :   ADD B, # 1    ; B ← B + 1
      JMP Z         ; jump to Z
X :

Which of the following instructions when inserted at location X will ensure that the value of register A after program execution is the same as its initial value?

Q32GATE 20031 markMCQ−0.33 if wrong
Consider the following assembly language program for a hypothetical processor. A, B, and C are 8 bit registers. The meanings of various instructions are shown as comments.
      MOV B, # 0    ; B ← 0
      MOV C, # 8    ; C ← 8
Z :   CMP C, # 0    ; compare C with 0
      JZX           ; jump to X if zero flag is set
      SUB C, # 1    ; C ← C - 1
      RRC A, # 1    ; right rotate A through carry by one bit. Thus:
                    ; if the initial values of A and the carry flag are a7...a0 and
                    ; c0 respectively, their values after the execution of this
                    ; instruction will be c0a7...a1 and a0 respectively.
      JC Y          ; jump to Y if carry flag is set
      JMP Z         ; jump to Z
Y :   ADD B, # 1    ; B ← B + 1
      JMP Z         ; jump to Z
X :

If the initial value of register A is A0 the value of register B after the program execution will be

Q33GATE 20021 markMCQ−0.33 if wrong
What are the states of the Auxiliary Carry (AC) and Carry Flag (CY) after executing the following 8085 program ?

MVI H, 5DH
MVI L, 6BH
MOV A, H
ADD L

Q34GATE 20021 markMCQ−0.33 if wrong
In 8085 which of the following modifies the program counter ?

Q35GATE 20011 markMCQ−0.33 if wrong
Suppose a processor does not have any stack pointer register. Which of the following statements is true ?

Keep practising

Topics in Computer Organization and Architecture

All CS topics ›