Thursday, December 4, 2014

Basic blocks

8 = 00000000000000000000000000001000
a = 00000000000000000000000001100001
2.4 = 100000000000011001100110011001100110011001100110011001100110011

Who taught you mathematics ?
I don't know, might be a computer had taught me. Because whatever we may throw but computers looks anything like this only.

No matter how modern it is, Computers can read only two basic things, either a bit is on or off. If you are unfamiliar with the term bit, just consider, it only can determine if a light is on or off and it reads nothing other than these two.

Is it really so or you are just trying to be over smart?
No, I really don't wanna be on lime light and its really true that computers can just read if a bit is on or off and also remember No matter how modern or costly it is, microprocessors (heart of any computer), perform only some very basic and easy operations, may be you did at the age of 8-10.

What ???
Yes, your brain is much much much more advanced than today's most advanced computer and computers and if we think of comparison, the ratio would be more like that of a cell in your body and your whole body.

Then how does this evaluate such complex calculations which human brain can't do???
No, you are wrong, human brain can do more complex things, that a computer can ever perform. But human brains can't do things repetitively.
Computer is idiot box which only follows our instructions over and over without adding anything new to it.

Then why Computers are valued too much in today's world and almost anything these days are done using them ?
Computer system has two parts in it, the hardware or the combination of different physical entities like CPU, RAM, HARD DISK etc. and the Software or the combination of logic.
Software tells Hardware what to do and hardware does it in a super fast way.

You don't need a lot of skills but you need some which you do frequently - some movie
Computers also follow the same rule of thumb. It achieves all its fame by just performing a limited set of skills in a very fast and frequent manner.
Each day these systems (both Hardware and Software) get more and more advanced. Hardware are becoming faster each day while Software are becoming more powerful and more real life oriented each day. So, the whole Computer system is becoming more advanced each day while making lives easier.
So, Computer is valued so much in today's life for making lives easier.

Hmmm...(Girls can read it as 'Awww...') I now get it, human are much more powerful than a computer and a human has to instruct a computer to do something and it will be done in a super fast way. Without existence of a human a computer can do nothing. Am I right ?
Yup, its only that.

So, how do I instruct my computer using Java?
Well, in every program, there are two parts as we've seen earlier also, one is data and another is instruction to what to do with the data. These are the basics of any programming. With the use of these, we instruct our computers.

Data resides on memory and instructions are executed by Processor. In any high level programming language, we have some place holders to store data in memory and on demand to retrieve the data from memory. These place holders are known as Variables.

Variables are places in memory to hold some information. Variables have there names and data types. Data types basically tells the underlying system how much space in memory should be reserved for this variable. Its the responsibility of the compiler or interpreter to keep track of the memory location. The programmer just needs to know the name of the variables and how to use them.
Variables can be of any type like whole number 3,5,7 or decimal number 3.5,4.5,2.83 or a character, 'a', '$', 'l' or a sequence of characters "Palash","loves", "Java" or any other complex type like Human in our earlier examples.

Hey hold on. You just told 'Human', right ?
Yes, Human. Please hold on your queries, we'll be discussing these very soon.

What is the use of having a Telephone Directory if we don't dial a number from it?
Yes, the same thing applies for computer world too. We don't need data if we don't know how to analyze or use it. We instruct computers to work on the data and the sequence of information is known as Methods.
Methods consist of Control Structure and Subroutines. Control structure consists of looping and branching. Subroutines are sequence of instructions packaged as a single unit.

That's all for now. Get yourself a chance to think over this for some time. Next, we'll be looking into variables.


Prev     Next
Palash Kanti Kundu

No comments:

Post a Comment