Friday, July 31, 2009

How is math used in computer programming?

it is used to calculate the distance between objects for example...





it's used a lot in 3d games programming.





But also in a lot of applications with some algorythms..

How is math used in computer programming?
a lot it's like integral to computer programming....
Reply:to do binary math, such as





2^3=8


2^2=4


2^1=2


2^0=1


8|4|2|1


1|0|0|1


8|0|0|1


8+0+0+1=9


1001 binary is 9 in our denary/decimal system that we use.





See, every thing you put on a computer has something to do with math.


For a computer to do math it has to sovle it step by step for example:


8+8*2


8+16


24


see the steps, it even follows the order of operations,


and the computer can process millions of similar operation in secondes. You need to know this when you learn c++.
Reply:believe it or not you need it.
Reply:You could write a book and still not finish answering this question.





The turth is all computer programming is, is using language to describe the mathmatical calculations a computer needs to do to make the program function.





If i were going to focus on one area that math is used is the concept of a variable.
Reply:computers only understand numbers, in particular they only understand binary numbers. Therefore EVERYTHING that a computer does is translated into binary numbers. Text is translated into something called ASCII code. Spell checking is a big xss mathematical formula of doing compares. Music is done via digital conversion (i.e. math).








Programming languages may appear to use text, but the language is just a user friendly "front end" to machine code - which is all numbers. The "best" programs are written in assembly language - which is just the straight binary code.
Reply:It's how everything is done really. Remember a computer is nothing but a very complex calculator when you get right down to it.





For us web designers, it's how we do everything. Basic algebra is required for basic layout and if you start doing advanced things stuff like the Mandelbrot Set can create really interesting results.





Look at guys like Joshua Davis, a lot of his work is based around the idea of writing complex functions to generate layouts and just seeing what happens.





For anyone who uses flash basic to medium algebra is kinda required. However, 99.9% of what you do can be solved with basic algebra. Things like Trig and Calculus only come in when you do highly advanced work.


No comments:

Post a Comment