Chapter 4-6: Machine Language and Assembly Language Flashcards

This will be a mix up of 5 cards from week 6 and information from week 7 which is for Assembly language

1
Q

The Hack language consists of two generic instructions: an “ “ instruction, also called A-instruction, and a “ “
instruction, also called C -instruction.
Hint: What two things does the computer need to know in order to process the commands? How would a postman know where to send a letter?

A

Address and compute instructions.

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

Every operation involving a memory location requires two Hack commands: What are they?

A

One for selecting the address on which we want to operate, and one for specifying the desired operation.

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

The instruction @ 5, which is equivalent to 0000000000000101, causes the computer to do?

A

To store the binary representation of 5 in the A register.

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

The instruction code is a specification that answers what three questions?

A

(a) what to compute
(b) where to store the computed value
(c) what to do next?

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

What are the three sources of symbols in a Hack computer?
Hint: It’s Not psuedo code

A
  1. Predefined symbols
  2. Label symbols
  3. Variable symbols
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

These commands like JMP beginWhile specify only the address of the target location.

A

Unconditional jump

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

These types of commands must also specify a Boolean condition, expressed in some way. Hint: two words

A

Conditional jump

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

Every machine language features the means to jump to selected locations in the program, both conditionally and unconditionally. This is called what?

A

Flow of Control

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

What kind of addressing is this?
In this addressing mode the address of the required memory location is not hard coded into the instruction; instead, the instruction specifies a memory location that holds the required address.

A

Indirect Addressing

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

What kind of addressing is this?
This form of addressing is used to load constants—namely, load values that appear in the instruction code.

A

Immediate Addressing

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

What kind of addressing is this?
The most common way to address the memory is to express a specific address or use a symbol that refers to a specific address.

A

Direct Addressing

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

What two categories do Memory Access commands fall into?

A
  1. Arithmetic and logical commands
  2. Load and store commands
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Since binary codes are rather cryptic, machine languages are normally specified using both “ “ and “ “.

A

Binary codes and symbolic mnemonics

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

Located in the processor’s immediate proximity, the “ “ serve as a highspeed local memory, allowing the processor to manipulate data and instructions quickly.

A

registers

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

The “ “ is a device capable of performing a fixed set of elementary operations. These typically include arithmetic and logic operations, memory access operations, and control (also called branching) operations.

A

Processor, normally called CPU

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

This term refers loosely to the collection of hardware devices that store data and instructions in a computer. What is it?

A

Memory

17
Q

A “ “ can be viewed as an agreed-upon formalism, designed to manipulate a memory using a processor and a set of registers.

A

machine language

18
Q

The goal of machine language’s design is “ “ in, and total control of, a given hardware platform.

A

direct execution

19
Q

Define machine language

A

Machine language is an agreed-upon formalism, designed to code low-level programs as series of machine instructions.

20
Q
A