MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

COMPILER DESIGN

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Different CPUs require different assemblers .
A
True
B
False
C
Either A or B
D
None of the above
Explanation: 

Detailed explanation-1: -You can have two different/incompatible assembly languages for the same processor/family. Of course the CPU itself will determine what concepts are needed in the assembly language-e.g. 16 registers or 8, of different sizes, etc.

Detailed explanation-2: -Because assembly depends on the machine code instructions, each assembly language is specific to a particular computer architecture. Sometimes there is more than one assembler for the same architecture, and sometimes an assembler is specific to an operating system or to particular operating systems.

Detailed explanation-3: -Every CPU architecture has its own machine language. And every new version of the same CPU architecture potentially adds more instructions to the language. A CPU architecture tends to evolve over time.

Detailed explanation-4: -compilers/assemblers are themselves software, and reside wherever they were installed on the computer. that also implies that you can have as many/few of each as you want. no, it doesn’t. e.g. you can trivially compile/assemble code for an ARM cpu running Android while working away on an Intel x86 cpu running Windows.

There is 1 question to complete.