4.6 Hardware and Software Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q
  1. High-level languages​
  2. Machine codes​
  3. Assembly languages​
  4. Binary codes​

What is the correct arrangement of programming languages in the order of understandability by humans?​

A

1, 3, 2, 4

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Machine codes are written in what form?

A

Binary or hexadecimal

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which type of programming language uses codes such as ADD, MOV and DEL?​

A

Assembly language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Consider the instruction: ADD AX, 08h. What represents the opcode?

A

ADD

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which of the following is NOT a register?
Accumulator​

Program counter​

MAR​

Mnemonic​

A

Mnemonic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Which of the following register performs the calculations and stores the result?​

A

Accumulator

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

In which of the following instruction operands are not specified?

A

INP

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Where is the input from the user stored first when the instruction INP is used?

A

Accumulator

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the function of instruction DAT?

A

Labels a memory location.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What instruction is used to stop the execution of a program?

A

HLT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Which of the following refers to a branch instruction?

A

BRP

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

After execution of this instruction: MOV A, 05H; the ACC contains value 05H. What type of addressing is followed in this instruction?

A

Immediate addressing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the 3 types of translators

A

Assemblers
Compilers
Interpreters

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

what is a translator

A

A utility program that translates the program written by programmers and codes in an assembly language into binary form.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

what does an interpreter do

A

A computer program that reads a statement from a program written in high-level language, performs the action specified by the statement and then proceeds to the next statement and so on.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is an interpreter used mainly for

A

error checking

17
Q

what does a compiler do

A

A computer program that translates a program written in high-level language into machine code all at once and then executes it

18
Q

what is a compiler mainly used for

A

putting a finished product onto systems

19
Q

what does an assembler do

A

A computer program that translates a program written in an assembly language into machine code.

20
Q

what is assembly language

A

A type of low-level programming language that uses instructions specific to hardware.

21
Q

what is assembly language

A

A type of low-level programming language that uses instructions specific to hardware.

22
Q

advantages of compilers

A

Object code executes faster

Executable code can be saved and doesn’t need to be compiled.

Compiled code is difficult to work with and harder to copy.

23
Q

disadvantages of compilers

A

Error doesn’t get flagged until the end of the process. If an error is discovered, the entire program may need to be recompiled.

Risk compiler might not generate all the required machine language, causing bugs.

Executable code produced is specific to the machine.