Computer System Architecture - Central Processing Unit

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
JZ X ; Jump to X if 0 flag is set
SUB C, # 1 ; C ⇽ C – 1
RRC A, # 1 ; Rotate right A through carry by one bit
JC Y ; Jump to Y if any carry flag is set
JMP Z ; Jump to Z
Y : ADD B, # 1 ; B ⇽ B + 1
JMP Z ; Jump to Z
X

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

  • Option : B
  • Explanation : The value of B after execution of the program is number of 1 bits in A0 because Jump is occur only when carry flag is set to 1.
Cancel reply
Cancel reply

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
JZ X ; Jump to X if 0 flag is set
SUB C, # 1 ; C ⇽ C – 1
RRC A, # 1 ; Rotate right A through carry by one bit
JC Y ; Jump to Y if any carry flag is set
JMP Z ; Jump to Z
Y : ADD B, # 1 ; B ⇽ B + 1
JMP Z ; Jump to Z
X

  • Central Processing Unit Questions can be used to give quizzes by any candidate who is preparing for UGC NET Computer Science
  • This Central Processing Unit Questions section will help you test your analytical skills in a tricky method, thereby giving you an edge over other students
  • Any student who wants to prepare for DOEACC A Level, DOEACC B Level, and DOEACC C level can also use these Objective Type Questions Answer.
  • All candidates who have to appear for the Kendriya Vidyalaya Entrance exam can also refer to this mcq section.
  • You can also get access to the Central Processing Unit MCQ ebook.
  • Central Processing Unit Questions can be used in the preparation of JRF, CSIR, and various other exams.
  • You can also download pdf for these Central Processing Unit multiple-choice questions Answers.
  • This Computer System Architecture Central Processing Unit Multiple Choice Questions Answers section can also be used for the preparation of various competitive exams like UGC NET, GATE, PSU, IES, and many more.
  • Central Processing Unit Questions can be used to gain a credit score in various undergraduate and postgraduate courses like BSc, MSc and MCA
  • Computer System Architecture Central Processing Unit Questions for UGC NET Computer Science

    Central Processing Unit MCQ

    Central Processing Unit Multiple choice questions