Login  Register

Operation code and address in one instruction

Posted by scout on Jul 14, 2014; 8:15pm
URL: http://nand2tetris-questions-and-answers-forum.52.s1.nabble.com/Operation-code-and-address-in-one-instruction-tp4028247.html

Hello everyone,

I would like to ask you a question about chapter 4, more specifically about this sentence:
"Since Hack instructions are 16-bit wide, and since addresses are specified using 15 bits, it is impossible to pack both an operation code and an address in one instruction."

My question is, if our CPU only allowed two operations, say AND and ADD, wouldn't it be possible to actually store a 15 bit address and an operation in one instruction?

I'm not trying to be funny or pedantic, I just want to make sure that I got the essentials right. Of course my hypothetical CPU wouldn't be very helpful or "powerful" but it would be possible, right?