What is the binary value of the instruction MD=A-1;JGE ?

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

What is the binary value of the instruction MD=A-1;JGE ?

OppaErich
Hi,

is there some guide for mere mortals like me ? The table given does not teach me how to solve this. I had two ideas but both were marked wrong.



I guess the first 3 ones are fixed. What is a then ? c for comp ? Then there is A-1 and M-1...

I do not understand this.

Stephan
Reply | Threaded
Open this post in threaded view
|

Re: What is the binary value of the instruction MD=A-1;JGE ?

cadet1620
Administrator


This table would be more readable if "a=0" and "a=1" were column headers rather than footers. a means use M instead of A for the ALU's y argument.

comp commands that are in the left column all have a set to 0; those in the right column have a set to 1.

"MD=A-1;JGE" has:
  a = 0  because A-1 is in the left column.
  c1..6 = 110010
  dest = 011
  j1..3 = 011
The binary for the instruction is:
  111 0 110010 011 011

--Mark
Reply | Threaded
Open this post in threaded view
|

Re: What is the binary value of the instruction MD=A-1;JGE ?

OppaErich
Hi,

I'm getting too old for this world. Just a little bit of stress to the brain and I'm getting blind. I did not see the footer.

Thanks,
Stephan