FUNDAMENTALS OF COMPUTER

COMPUTER PROGRAMMING FUNDAMENTALS

WHAT IS PROGRAMMING

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
LOAD r1, LOAD r2, ADD r1, DIV r1, #2
A
Machine Code
B
High Level
C
Assembly Language
D
None of the above
Explanation: 

Detailed explanation-1: -ADD: This instruction adds 2 values (from 2 registers or from a register and an immediate value) and puts them into a register. Similar format is used for SUB, MULT, DIV, MOD. For eg. “ADD R1 R2 R3; ” will move the value R2+R3 into R1. “ADD R1 R2 #3; ” will move the value R2 + 3 into R1.

Detailed explanation-2: -Index addressing mode: In this, effective address of operand is generated by adding a constant value to the contents of a register. Ex. MOV 20(R1), R2.

Detailed explanation-3: -Three-address instruction is a type that is a machine-specific instruction. It is a single opcode with three fields for address. The address field serves to indicate destination, and two address fields for the source. Example: X = (A + B)

Detailed explanation-4: -The 32-bit instruction has six fields: cond, op, funct, Rn, Rd, and Src2. The operation the instruction performs is encoded in the fields highlighted in blue: op (also called the opcode or operation code) and funct or function code; the cond field encodes conditional execution based on flags described in Section 6.3.

There is 1 question to complete.