Sunday, February 22, 2015

How Computers Work - Turing Machine


 In the beginning, there was only a concept that eventually became the seed that started the modern area of computer science.  Alan Turing's hypothetical computer model is amazingly simple and elegant at the same time.  

This idea can be explained in simple terms of picking fruit in an orchard.  Your initial state ( Si ) is the entry point of your program where you start to make decisions.  You see a tree and decide to pick fruit from it, so you need to transition to state one ( S1 ) where you climb up on the tree to pick its fruit.  That is like starting a process and the fruit represents the commands in the process that you need to accomplish.  When you get to the end of the statements in that process, then you need to transition to another state to decide what to do next.  You have picked all the ripened fruit from the tree and any statement that you have processed, you changed its "flag" to show that it was picked and some you have not.  In any case, you climb off the tree and see if there are more trees to process ( S2), so you return to your initial state ( Si ) in order to start processing the next tree ( S1 ).  So, you climb on the next tree ( S1 ), you process it, and then you climb off ( S2 ).  You go back to the initial state ( Si ) and find out that there is no more tree to process, so you transition to the halt ( Sh ) state.  You are done with the work, so you can stop now instead of continuing aimlessly looking for trees to process.  You not allow for an infinite looping, but you realize when you are done.  That is the premise of computer science, the reliable problem solving in a finite amount of time.  It is like moving from the old testament to  the new testament;  moving from computing the result of an arithmetic operation to solving problems that humans are not capable of on paper. 


The hypothetical machine triggered a simple plan of designing a computer that stored things and did things with the stored information.  Te result of an operation could be stored back onto the computer to do something else with the results.  John Von Neumann started this "journey" with a simple sentence like this:

That simple idea later became the computer we know today.  You might be puzzled how computers can evaluate a complex arithmetic calculation, but when you analyze it, it is just a simple matter of pushing and popping values on and off a stack.  You can use the DC utility ( http://sourceforge.net/projects/unxutils/ ) to practice this type of simple calculations in a Windows environment. 


Your innovation starts by looking back to those who carved the path in front of you.  Don't ever underestimate the value of learning about history.  Deeper your understanding of technology, better your chance to innovate or improve and become a producer not just a consumer.

You can watch a video where I explain these concepts.
http://youtu.be/gUeyM28AZQQ


Also, take a look at the Fetch, Decode, Execute, Writeback cycle to learn even more about how computers are organize data as John Von Neumann designed it based on Alan Turing concept.





No comments:

Post a Comment