Thursday, October 21, 2010

How does VB and other programming languges work?Is there a core/pure computer language?

Where does VB send it's commands to?How does VB and other programming languges work?Is there a core/pure computer language?
There is a ';core'; computer language. It consists of the commands that your CPU can accept and execute. Depending upon the Processor Chip that your computer uses there are about 100 commands and they are all in 1's and 0's which most people don't speak. Then you have Assembly language ( a low level language that gets translated into 1's and 0's for the Processor to understand) which gets ';assembled'; to run. The next level up is high level programming language like VB, C++, C#, Cobol, Fortran, Pascal, etc. which get ';compiled'; into something like assembly language and which is then ';linked'; into 1's and 0's for the Processor to run.



In non-visual languages, to send something like ';Hello World'; to the screen takes a couple lines of programming.



In Visual Languages, it takes about 10 or 12 lines of code to send ';Hello World'; to the screen.



In Assembly language it takes about 44 lines of code to send ';Hello World'; to the screen.



I'm not sure if you can actually do machine language anymore (I used to use it on DEC 100 mainframes a long time ago)



Assembly language gives you maximum control but minimum support.

Non-Visual languages give you less control (C++ gives some low level support like Assembly has) but provide easier/faster programming (typically 1/10 to 1/100 the time it takes to write an Assembly program.)



Visual languages take away a lot of your control but provide a lot of services in an easy to use format such as network access, graphics, display handling, etc. (which require substantial work to do in other languages)How does VB and other programming languges work?Is there a core/pure computer language?
By core computer language i am guessing you mean what happens when you compile VB or any other code. Basically it goes like this, for most standard languages like c++ the compiler compiles the c++ code into assembly, then assembly is converted into binary by a linker, now your computer when you run the program, understands the binary. Java however uses a Virtual Machine and the VM interrupts the java code then communicates with your computer to tell it what to do.

No comments:

Post a Comment