I wasn't aware that DOS has an in-built calculator in it till yesterday morning. Ok based on my understaning I have written the following ... hope this info would be of some help to you!!
DOS Shell has a built in mini calculator to perform mathematical calculation.
How?
Syntax for SET command: Set /a Your_Expression_Comes_here
As you would be knowing, type set /? to display the complete help of that command. Btw, this supports "SHIFT" operators (both left <<>>).
Try it yourself:
Step1: Open the command prompt (Start >> Run >> cmd)
Step 2: Find below the screenshot which shows few examples I have tried myself.
DOS Shell has a built in mini calculator to perform mathematical calculation.
How?
Syntax for SET command: Set /a Your_Expression_Comes_here
As you would be knowing, type set /? to display the complete help of that command. Btw, this supports "SHIFT" operators (both left <<>>).
Try it yourself:
Step1: Open the command prompt (Start >> Run >> cmd)
Step 2: Find below the screenshot which shows few examples I have tried myself.
FYI,
i) 10<<2 means 10 x ( 2 to the power of 2)
i.e., 10 x 4 = 40
ii) 40>>2 means, 40 / ( 2 to the power of 2)
i.e., 40 / 4 = 10
Hope this helps!
Comments
http://www.kotiposti.net/jjhalme/index.htm