This wiki has no edits or logs made within the last 45 days, therefore it is marked as inactive. If you would like to prevent this wiki from being closed, please start showing signs of activity here. If there are no signs of this wiki being used within the next 15 days, this wiki may be closed per the Dormancy Policy. This wiki will then be eligible for adoption by another user. If not adopted and still inactive 135 days from now, this wiki will become eligible for deletion. Please be sure to familiarize yourself with Miraheze's Dormancy Policy. If you are a bureaucrat, you can go to Special:ManageWiki and uncheck "inactive" yourself. If you have any other questions or concerns, please don't hesitate to ask at Stewards' noticeboard.

Define Logical AND Operation on Macro

From Mikrodev Documentation
Jump to navigation Jump to search
Download Project Files

What You Need to Know Before Design

Diagram Algorithm

  • Eight binary register values are controlled by the macro with the logical "And" operation.
  • Macro block will only work when trig is active.

Diagram Solition

and_operation_makro_1.png

Macro Commands:

  • [v0=$0&$1] // Evaluate the registers $0 and $1 in the "and(&)" operation and assign the result to variable v0,
  • [v1=v0&$2] // Evaluate the registers v0 and $2 in the "and" operation and assign the result to variable v1,
  • [v2=v1&$3] // Evaluate the registers v1 and $3 in the "and" operation and assign the result to variable v2,
  • [v3=v2&$4] // Evaluate the registers v2 and $4 in the "and" operation and assign the result to variable v3,
  • [v4=v3&$5] // Evaluate the registers v3 and $5 in the "and" operation and assign the result to variable v4,
  • [v5=v4&$6] // Evaluate the registers v4 and $6 in the "and" operation and assign the result to variable v5,
  • [v6=v5&$7] // Evaluate the registers v5 and $7 in the "and" operation and assign the result to variable v6,
  • [o0=v6+0] // Transfer the value macro block in variable 6 (v6) to the output 0.
  • [E] // Macro end definition operation
  • The result of the operation where the value of the register with block no 7($7) is 0 and the other registers are 1:

and_operation_makro_2.png

  • The result all register values ​​1:

and_operation_makro_3.png