| C instruction set |
| |
| Arithmetic Instructions |
| |
| These types of instructions are used to perform arithmetic operations between constants and variables. |
| |
| Some of the arithmetic operators are: +, -, * and /. |
| |
| Example: |
| |
| int a; |
| float b, deta, alpha, gamma, beta; |
| a=500; |
| b=0.0056; |
| deta=alpha*beta/gamma+0.5*2/5; |
| |
| There are three types of arithmetic statements: |
| |
| 1. Integer mode arithmetic statement: |
| |
| In this type of arithmetic statement all operands are either integer variable or integer constant. |
| |
| 2. Real mode arithmetic statement: |
| |
| In this type of arithmetic statement all operands are either real constant or real variables. |
| |
| 3. Mixed mode arithmetic statement: |
| |
| In this type of arithmetic statement some of the operands are integer and some of them are real. |
| |
| |
|
| |
| |