Question: In the Hack computer platform, there are essentially two types of machine language instructions... The A instruction: And the C instruction: ALL Hack computer programs
In the Hack computer platform, there are essentially two types of machine language instructions...
The A instruction:

And the C instruction:

ALL Hack computer programs can be developed using these two instructions. The C instruction allows the programmer to interact with the CPU (and in particular the ALU) to perform computations against the values in the registers. Below is the ALU for the Hack computer:

Each of the instructions that the Hack ALU is capable of running can be specified to the ALU through a set of control bits. These control bits (or the C bits in the instruction) and their associated functions are listed below:

Using the information above, hand compile the following two assembly language programs into machine language that can be loaded into an executed on the Hack computer:
//Program 1 to convert to machine language // Computes R0 = 2 + 3 @2 D=A @3 D=D+A @0 M=D
// Program 2 to convert to machine language // Symbol-less version of the Max.asm program.
@0 D=M @1 D=D-M @10 D;JGT @1 D=M @12 0;JMP @0 D=M @2 M=D @14 0;JMP
The A-instruction is used to set the A register to a 15-bit value: A-instruction: @value /Where value is either a non-negative decimal number // or a symbol referring to such number. value (v = 0 or 1) Binary 0 V V V V v v V V V V V V V v v The A-instruction is used to set the A register to a 15-bit value: A-instruction: @value /Where value is either a non-negative decimal number // or a symbol referring to such number. value (v = 0 or 1) Binary 0 V V V V v v V V V V V V V v v
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
