Showing posts with label lectures. Show all posts
Showing posts with label lectures. Show all posts

Wednesday, 15 August 2012

Introduction to Computer Memory

 Got an interesting link set to me from a friend concerning Computer Memory, apparently this text is THE text for understanding computer memory physically and theoretically. Obviously with memory being one of the most integral parts to programming I feel this has to be jumped to the top of my reading list.






 As I am currently following the lecture series at the moment I will start updating what I am picking up from this text, from the first few pages I read already, just 'flicking through' I know it is definitely worth my while and will give me a great advantage in the future when I begin to practice assembly language and any other low-levels tinkering I may have planned.

:)

First On-line Lecture. (9,996.5)

Managed to get on my discipline a bit more today and watched the first lecture in the series I promised I would watch daily. If you don't know what I am talking about (click here).


 Okay so firstly the lecture are a little bit dated but have a very cool old-school feel to them, that makes you feel as if you were there near to the beginning of the birth of the modern-modern computer (I'm talking post windows 95). The first lecture concentrates on introducing you to Lisp, not in a traditional 'declarative' way (picked that word up from the lectures, Gates watch out..) whereby the lecturer basically runs through the various commands and how you link them up, rather, in this lecture the theme is understanding what's inside the each process that each operator calls.

 The lectures are filled with useful quotes that help to put computing into perspective for the programmer. For instance the lecturer makes very clear at the beginning that computing shouldn't be considered a science or even considered computing as it takes away from the processes involved and focuses heavily on the tools you are using. I feel this quote does have some weight to it as he elaborate on it throughout the duration of the lecture and basically leaves you understanding that computing is not really about the fancy programs you get to play with right now for instance, computing for the computer scientist is about engineering an art form. Making something that is already magical and beautiful and making it even more so.

 Anyway enough about the lecturers philosophical input about what he feels computing to be, what is there to learn from the first lecture in this series. Well, enough to realise that if I stick with this and complete this series I will understand computing and programming in a seriously deep way. From all the dabbling I have done before in programming I understood more about what was actually going on from this hour long introductory lecture than I have done in a whole year of faffing around.



 The main concept the Lecture introduced was this idea of  'abstraction' in that the way you can express something in programming has to be understood fully by you for you to be able to do it efficiently. The lecturer went on to explain what he meant by this by creating a squaring function from scratch using Lisp. The details of how to do this are not important as he shows you many methods of producing the same result and even a mini program that was designed to 'guess' the square root of any number.

 The key points that needed to be taken away is the basic structure of code.
 He gives this example and then elaborates on it as I will giving a running commentary.

(+  3  17.4  5).
Lisp uses a system known as prefix notation which means the operator is written to the left of the operands.
 A simple mathematical operation in lisp. The plus sign (+) is the operator the numbers to be added are the operands (3, 17.4 & 5) and the parentheses/brackets including the process inside is known as a combination.

He then explains the method of developing your own code or in this case a squaring function.

(DEFINE SQUARE (LAMBDA x (* x x)))

Now I'm not 100% on the definition of LAMBDA but I have made a note to re-edit this section for clarity, until then I will just explain the point the lecturer was making by showing us this operation.

The intial call 'DEFINE' requires us to create a symbol we want defining, in this case as we are squaring numbers the symbol was 'SQUARE'. The next stage of this definition required us to call a procedure that allowed us to define using an 'argument' what we wanted  our definition to stand for. This is where the term 'LAMBDA' comes in and not knowing this did stump me a little bit on what was going on but it is not impossible to understand the essence of what is going on which was the purpose of this lecture. So, with a procedure called with an argument named 'x' ( what this essentially means is that a value known as x will be entered and when it is entered something must happen to this value due to the call SQUARE being used), a result has to be 'returned' to give purpose to the new definition. The final section of the code '(* x x)' required x to be multiplied by itself (or squared as it is known) to complete the process.


:)


 Again as with all articles I will touch them up for you to make them perfect as possible when my understanding of the concepts matures. Thanks again for your paitence. Also if you can help clarify any of the information I am trying to re-teach people please leave me a comment and I will be more than happy to fix the areas where I have gone wrong, its the reason I'm here. Also I did about 1.5 hours of actual constructive work today hence why I have moved from 9,998 to 9,996.5. It seems this process is going to balance on my fight with my discipline as in my mind its filled all the time with the want to learn computing but there is a huge part of me that hides away from tackling it, who knows for what reason, probably fear of not understanding something and being a failure unto myself and shattering the image I hold of myself being able to tackle anything with enough effort, which truth being told would be a devastating blow, it is however my sincerest intention to reach my goal of hitting a Phd in 10 years. I'm just off to a slow start. Again thank you for your patience.



The Von Neumann Model


The man you see before you is  John von Neumann, an early computing pioneer. From what I've read so far I can establish that this guy is a pretty big cheese and is credited with the general model that computers are constructed by today. I plan to do a outline history of computing soon with all the major players and their contributions so if you were expecting an interesting article on all of von Neumann's contributions you will have to wait till I write that as this article is actually just an introduction to his 'model'.


John von Neumann

As far as writing about Neumann's life goes my knowledge of him is pretty slim at this moment in time, I will however, in the future plan to do an in-depth piece on him, for now however I am more concerned about his contribution to computer science and what that contribution means to me and you.

 Essentially von Neumann established a model that computers should follow that was logical and effective in its design. This 5 part model describes the form your computer takes underneath all of its hardware and shiny cases.

 Neumann states;

 There are Five major components within the computer system:

 The first is an Input Device
              - This element sends data and information to the system. This information and data is then stored in the next component.

 The Memory Unit
              - The instructions and data are then processed by the next component.

The Aritmetic Logic Unit (ALU)
             - The operation carried out within the ALU are carefully guided by the next component.

The Control Unit
             - To which the results of the ALU and Control Unit's work is sent to the final component.

The Output Unit.
             -Which would be your monitor or your printer.


 This simplified breakdown of what a computer is made up of makes its a bit easier to grasp harder concepts in computer architecture as it allows you to picture in your heads the basic outline of the computers structure. This however is an unfinished model and if we were to add a bit of extra detail to make it a little more complete and a little bit more accurate to today's computing systems we would have to mention the System Bus Model.

  As mentioned previously in another article (here) a bus is basically a method to quickly transport data from one component to another. The system bus model essentially partitions a computer into three sub-units:
 CPU / MEMORY / I/O
These three sub units are the five units established in the von Neumann model only grouped by their purpose.  This refinement of the von Neumann model combines the ALU and Control Unit into one functional unit - CPU. This model also combines the Input and Output units into a single I/O unit.

 The system bus links all these components on a shared pathway made up of:
The Data Bus - Carries the information being transmitted
The Address Bus - Identifies where the information is being sent
The Control Bus - Describes aspects of how information is being send and in what manner

:)


-As I have mentioned previously I will update older articles as my understanding of the concepts within develops so if you find this a rather breif introduction to von Neumann and the basic form of the computer, do not worry I am learning all the time and will update when I have found anything considerable to add. If you have anything else you believe to be worthwhile drop us a comment and I'll add it in. Thanks.

Tuesday, 14 August 2012

Time to tick off those hours

I've decided that trying to tackle all of computer science in one go with no real structure for someone like me is incredibly futile so I am going to structure my learning around completing a series of online lectures. Obviously biting off more than I can chew left me escaping my responsibilities in a bubble of gaming and procrastination, so I am going to ease myself into a good cycle by forcing myself to watch just one lecture a day from a selected series. As I get more confident with myself I am going to up the pace, but for now I can manage just one video a day.

 As I have stated previously I am going to be starting with computer architecture and pad out the theoretical learning with practical experience in Assembly language. I have a layman's understanding of computer architecture but I would still consider myself a complete newbie to this topic area. With everything being essentially new I am going to take this slow and do one lecture then make sure I fully get it, summarise what I know into an interesting post, then tackle the next lecture.


 The Lecture series I am going to follow is an old one from 1996 but is recommended as a great introduction to computer architecture. It follows the book 'Structure and Interpretation of Computer Programs' - (The full book can be found here, for free). The sites description of the lectures is as follows;
- 'These twenty video lectures by Hal Abelson and Gerald Jay Sussman are a complete presentation of the course, given in July 1986 for Hewlett-Packard employees, and professionally produced by Hewlett-Packard Television. '





http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-001-structure-and-interpretation-of-computer-programs-spring-2005/video-lectures/