Back to marketplace

Chapter 4 (Section 2) Final Revision #1

No description yet. This curated deck is ready for daily study.

Total cards: 24•Content version: v4•Public deck•Updated: 8/1/2026

Card preview (24)

#1
Front (Question)

Machine Code and Programming Languages

Back (Answer)

#2
Front (Question)

Why is machine code the only language a CPU can directly use?

Back (Answer)

Because the hardware is built from transistors and logic gates that can only process 0s and 1s, so the CPU is designed to interpret binary directly. Any other language must be translated into machine code before the CPU can execute it.

#3
Front (Question)

Is machine code machine dependent?

Back (Answer)

Yes — every different type of computer/processor has its own set of machine code instructions.

#4
Front (Question)

How does the length of an assembly program compare to a high-level language program?

Back (Answer)

An assembly language program requires many more instructions than a high-level language program to perform the same task.

#5
Front (Question)

What is source code?

Back (Answer)

A computer program written in a programming language before it has been translated into machine code.

#6
Front (Question)

Instructions, Opcodes, and Operands

Back (Answer)

#7
Front (Question)

What is an instruction?

Back (Answer)

A single operation performed by the CPU.

#8
Front (Question)

What is an opcode?

Back (Answer)

Short for “operation code”. The part of a machine code instruction that identifies what action the CPU will perform.

#9
Front (Question)

What is an operand?

Back (Answer)

The part of a machine code instruction that identifies the data (or address of the data) to be used by the CPU.

#10
Front (Question)

What is a mnemonic in the context of assembly language?

Back (Answer)

A short, abbreviated name (e.g. LDD, STO) used in assembly language to represent a specific machine code opcode.

#11
Front (Question)

Groups of Assembly Language Instructions

Back (Answer)

#12
Front (Question)

What are the main groups of assembly language instructions?

Back (Answer)

• Data movement: load and store data between memory and registers. • Input and output of data: take input from the user / output the character of a binary number. • Arithmetic operations: perform addition, subtraction, increment, decrement. • Unconditional and conditional jump instructions: move to another instruction (identified by a label). • Compare instructions: compare a value to another value (typically used before a jump).

#13
Front (Question)

Assemblers — Types and Purpose

Back (Answer)

#14
Front (Question)

What is an assembler?

Back (Answer)

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

#15
Front (Question)

What are the two types of assembler?

Back (Answer)

One-pass and two-pass assemblers.

#16
Front (Question)

What does a one-pass (single-pass) assembler do?

Back (Answer)

It puts the machine code instructions straight into computer memory to be executed, in a single pass through the source code.

#17
Front (Question)

What is the role of a loader?

Back (Answer)

A program required to load an object program (the machine code produced by a two-pass assembler) into memory so it can be executed.

#18
Front (Question)

Two-Pass Assembler — Pass 1

Back (Answer)

#19
Front (Question)

What does Pass 1 of a two-pass assembler do regarding code formatting and validation?

Back (Answer)

It checks the syntax, removes all comments, and checks that each opcode is in the instruction set.

#20
Front (Question)

What happens in Pass 1 when the assembler encounters a symbolic address for the first time?

Back (Answer)

It checks the symbol table; if the label is not there, it adds it to the “symbolic address” column with a corresponding “unknown” entry in the address column.

#21
Front (Question)

What is a literal table, and when is it created?

Back (Answer)

A table created during Pass 1 if the programmer has used constants (literals) in the program.

#22
Front (Question)

What happens to directives during Pass 1?

Back (Answer)

They are acted upon (e.g. memory is reserved or origin points are set), but they do not generate any machine code.

#23
Front (Question)

What is macro expansion, and when does it occur?

Back (Answer)

During Pass 1, the assembler replaces each macro call with the actual group of instructions defined in the macro.

#24
Front (Question)

Two-Pass Assembler — Pass 2

Back (Answer)