1 / 17

ECT 464

ECT 464. Lecture 12 Advanced Math Instructions. Today’s Quote: It’s the little things in life that determine the big things.

Download Presentation

ECT 464

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ECT 464 Lecture 12 Advanced Math Instructions

  2. Today’s Quote: It’s the little things in life that determine the big things. His master replied, 'Well done, good and faithful servant! You have been faithful with a few things; I will put you in charge of many things. Come and share your master's happiness!' Matthew 25:21

  3. Scale Data (SCL) • The SCL instruction is used to produce a scaled output value that has a linear relationship. • Source and Destination must be addresses. • Rate is divided by 10000. • Offset can be an address or constant • Changes Carry, Overflow, Zero, and Sign bits

  4. Scale with Parameters (SCP) • The SCP instruction is used to produce a scaled output value that has a linear relationship between the input and scaled values. • Input and Output Values must be addresses. • Input Min and Max can be addresses or constants. • Scaled Min and Max can be addresses or constants. • Changes Carry, Overflow, Zero, and Sign bits

  5. Scale with Parameters (SCP)

  6. Absolute (ABS) • The ABS instruction takes the absolute value of the Source and places it in the Destination. • Source and Destination must be addresses. • Changes Carry, Overflow, Zero, and Sign bits

  7. Compute (CPT) • The CPT instruction performs copy, arithmetic, logical, and conversion operations. You define the operation in the expression and the result is written in the destination. • Destination must be addresses. • Changes Carry, Overflow, Zero, and Sign bits • Example Expression: SQR((N7:1 ** 2) + (N7:2 ** 2)) ** means ^

  8. Swap (SWP) • Use the SWP instruction to swap the low and high bytes of a specified number of words in a bit, integer, or string file. The SWP instruction has 2 operands: • Source is the word address containing the words to be swapped. • Length is the number of words to be swapped, regardless of the file type.

  9. Sine (SIN) • Use the SIN instruction to take the sine of a number and store the result in the destination. • Source must be between -205887 and 205887. • Changes Carry, Overflow, Zero, and Sign bits

  10. Arc Sine (ASN) • Use the ASN instruction to take the arc sine of a number and store the result in the destination. • Source must be between -1 and 1. • Changes Carry, Overflow, Zero, and Sign bits

  11. Cosine (COS) • Use the COS instruction to take the cosine of a number and store the result in the destination. • Source must be between -205887 and 205887. • Changes Carry, Overflow, Zero, and Sign bits

  12. Arc Cosine (ACS) • Use the ACS instruction to take the arc cosine of a number and store the result in the destination. • Source must be between -1 and 1. • Changes Carry, Overflow, Zero, and Sign bits

  13. Tangent (TAN) • Use the TAN instruction to take the tangent of a number and store the result in the destination. • Source must be between -205887 and 205887. • Changes Carry, Overflow, Zero, and Sign bits

  14. Arc Tangent (ATN) • Use the ATN instruction to take the arc tangent of a number and store the result in the destination. • Source must be between -1 and 1. • Changes Carry, Overflow, Zero, and Sign bits

  15. Natural Log (LN) • Use the LN instruction to take the natural log of a number and store the result in the destination. • Source must be between -87 and 88. • Changes Carry, Overflow, Zero, and Sign bits

  16. Log to the Base 10 (LOG) • Use the LOG instruction to take the log base 10 of a number and store the result in the destination. • Source must be between -38 and 38. • Changes Carry, Overflow, Zero, and Sign bits

  17. X to the Power of Y (XPY) • Use the XPY instruction to raise a value (Source A) to a power (Source B) and store the result in the destination. • Changes Carry, Overflow, Zero, and Sign bits • The XPY instruction uses the following algorithm: XPY = 2 ** (Y log2(X))

More Related