# How does n =17 flow into the CPU?

4 messages
Open this post in threaded view
|

## How does n =17 flow into the CPU?

 I'd like to ask how the command flows let's say in the pseudo-code n = 17 In Hack language, it would be: @17 D = A @n M = D Just confused how the value 17 would go through the registers, into ALU, etc., let alone the rest of the variables?  Thank you.
Open this post in threaded view
|

## Re: How does n =17 flow into the CPU?

 Administrator eVh1955 wrote I'd like to ask how the command flows let's say in the pseudo-code n = 17 In Hack language, it would be: @17 D = A @n M = D Just confused how the value 17 would go through the registers, into ALU, etc., let alone the rest of the variables?  Thank you.   The command @17 loads the instruction into the A register. The instruction is the binary value for 17. The D=A command tells the ALU to execute the instruction 'A', which puts the value in the A register at the output of the ALU. The 'D=' part tells it to store the value of the output of the ALU into the D register. Hopefully you can figure it out from here.