ALU_Worksheet functions and Opcodes

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

ALU_Worksheet functions and Opcodes

linuxford
Greetings,
The alu_worksheet was extremely useful and I am going through these by hand. The mystery is lifting as I am slowly understanding more and giving rise to "Aha!" - Thanks!

I was thinking about the 2^6 and the 64 possible functions (operations?). I then took the bit pattern of each of the 18 functions and noticed they are of course a different pattern and therefore represent 18 of the 64 possible different binary values (vary from 000000 .. 111111).

Are these bit patterns (binary pattern of the 6 bits) called the "Opcodes" for the Hack computer? What would they be called in a real computer system?

Thank you very much
Reply | Threaded
Open this post in threaded view
|

Re: ALU_Worksheet functions and Opcodes

cadet1620
Administrator
linuxford wrote
Are these bit patterns (binary pattern of the 6 bits) called the "Opcodes" for the Hack computer? What would they be called in a real computer system?
"Opcode" usually means the part of an instruction that defines the overall operation of that instruction. I think I would also include the 'a' bit of the c-instructions in their opcode. Take a look at section 6.2.2 to see the Hack computer instruction format.

For example, here's what the modern Intel processor instructions look like:

Intel instruction format

--Mark