Search Header Logo

Machine Instructions

Authored by Brijesh Shukla

Computers

University

Used 4+ times

Machine Instructions
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following instructions correctly tests if the value stored in M[100] is zero and jumps to label END if it is?

@100

D=M

D;JEQ

@END

0;JMP

@100

D=M

@END

D;JEQ

@END

@100

D=M

D;JEQ

@100

D=M

@END

M;JEQ

Answer explanation

@100 loads address 100 into A.
D=M loads value at RAM[100] into D.
@END loads END's address into A.

D;JEQ jumps to END if ALU output (here D) == 0.

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following correctly describes the Hack registers?

  • A: Arithmetic register only

  • D: Data register only

  • M: Memory location at RAM[0]

  • A: Address/Data register

  • D: Data register

  • M: Memory value at address stored in A

  • A: Program counter register

  • D: Destination register

  • M: Memory value at D

  • A: Address register only
    D: Data register only

M: Memory value at address stored in D

Answer explanation

  • A register: Can hold either a value or an address.

  • D register: General-purpose data register.

  • M: Not a physical register; it represents RAM[A]

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

@10

D=A


What will be stored in D?

10

Value at RAM[10]

Address of instruction

Contents of D unchanged

Answer explanation

@10 loads 10 into A.
D=A copies the value of A (which is 10) into D.

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

If the code is:

@7

D=M

and RAM[7] = 15, what will D contain?

7

15

Address of next instruction

0

Answer explanation

  • @7 sets A = 7.

  • D=M copies RAM[A] (i.e., RAM[7]) → D.

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which statement is FALSE about A, D, and M registers?

D cannot be used to address memory directly.

M is not a physical register.

A can hold either an address or a constant.

M can directly store an address to another memory location.

Answer explanation

  • M refers only to RAM[A]. It does not store an address; it stores a value.

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?

Discover more resources for Computers