August 25, 2011

This Is Not a Difficult Concept: Part 1

This article will be about some Computer Science concepts that I will attempt to discuss in very basic terms to demonstrate why I was irritated that these students could not understand this very simple concept.

That's the only warning I am going to give about this being a Computer Science related article.

In order to show you how utterly retarded the students in my class were, I'm going to state the concept, and then I'm going to go through what it actually means.  By the end of this article, you will be smarter than the majority of students in my Computer Organization and Assembly Language Programming class.

The Concept: Addresses point to data.  In order to load data from memory, you must load it via its address.

For anyone not familiar with computers, there are a lot of words in there that might not make sense in this context, such as address, data, load, and memory.  Therefor I will explain this concept in as simple terms as possible.

In order for most programs to work, data (i.e. numerical values, text, etc) is stored in registers

While it is not exactly important that you know what registers are, you can imagine that registers are things that hold data that need to be easily accessed.  Registers are sort of like your brain in that it holds information that you can easily remember.  If we continue with this analogy, we see very quickly that you can't remember a lot of information, thus, anything not important that you need to remember and act upon must be stored somewhere.  

Thus, we will stretch this analogy as far as it will go and say that sticky notes will be the memory. Since each sticky note contains a small bit of information, you can easily access information you need when you need it.

Thus, remembering which sticky note the information is in is like knowing the address of the data you need to access in a computer.

Let's drop the really stupid analogy now and actually talk about your computer.  In assembly level programming, data is stored in registers.  Accessing and manipulating variables is quick, easy, and pretty straightforward; however, registers are not unlimited.  When there is too much data and not enough registers, some data needs to be written to memory in order for it to be used later.  Thus, data is written to an address in memory. 

Let me repeat that: data is written to an address in memory. 

What does that mean?  Well, some numerical value is given a little place in memory designated by an address (think of that "little place in memory" as a house with an home address).  Note that there is a distinction between the address and the data.  

If you can understand that distinction, congratulations, you are more informed than half of my class.


Post a Comment