Difference between revisions of "CSC103: DT's Notes 1"

From dftwiki3
Jump to: navigation, search
Line 1,082: Line 1,082:
 
    1000000000  |     45      |
 
    1000000000  |     45      |
 
                +-------------+
 
                +-------------+
               .            .
+
                .            .
               .            .
+
                .            .
               .            .
+
                .            .
               +-------------+
+
                +-------------+
 
            10  |   1103      |
 
            10  |   1103      |
 
                +-------------+
 
                +-------------+
Line 1,109: Line 1,109:
 
                +-------------+
 
                +-------------+
 
   
 
   
 +
It's a long structure made up of words.  Words are numbered, from 0, to a large number, which is actually equal to the size of the memory, in increments of 1.  For example, when you read the sticker for a computer on sale at the local store, it may say that the computer sports 4 Gigabytes of RAM.  What this means is that the memory, the ''Random Access Memory'' (RAM), is comprised of words containing numbers, the first one associated with a label of 0, the last one with a label (almost) equal to 4,000,000,000.  By the way, ''Giga'' means billion, ''Mega'', million, and ''Kilo'', a thousand.
  
It's a long structure made up of words.  Words are numbered, from 0, to a large number, which is actually equal to the size of the memory, in increment of 1.  For example, when you read the sticker for a computer on sale at the local store, it may say that the computer sports 4 gigabytes of RAM.  What this means is that the memory, the ''Random Access Memory'' (RAM), is comprised of words containing numbers, the first one associated with a label of 0, the last one with a label (almost) equal to 4,000,000,000.
+
Before we figure out what kind of number ''code'' the processor can understand, let's talk for an instant about the role of the processor relative to the memory.  The processor is a machine that constantly reads numbers from memory.  It normally starts with the word stored in the cell with label 0 (we'll say the ''memory cell at Address 0''), reads its contents, then moves on to the next word at ''Address 1'', then the next one at ''Address 2'', and so on.  In order to keep track of where to go next, it keeps the address of the cell it is going to access in a special word it keeps internally called '''Program Counter''', or '''PC''' for short.  PC is a special memory word that is '''inside''' the processor.  It doesn't have an address.  We call such memory words when they are inside the processor '''registers'''.   
 
 
Before we figure out what kind of number ''code'' the processor can understand, let's talk for an instant about the role of the processor relative to the memory.  The processor is a machine that constantly reads numbers from memory.  It normally starts with the word stored in the cell with label 0 (we'll say the ''memory cell at Address 0''), reads its contents, then moves on to the next word at ''Address 1'', then the next one at ''Address 2'', and so on.  In order to keep track of where to go next, it keeps the address of the cell it is going to access in a special word it keeps internally called '''Program Counter''', or '''PC''' for short.  PC is a special memory word that is inside the processor.  It doesn't have an address.  We call such memory words when they are inside the processor ''registers''.  The processor has three important registers that allow it to work in this machine like fashion: the '''PC''', the '''Accumulator''' (shortened to '''AC'''), and the '''Insruction Register''' ('''IR''' for short).  The PC is used to "point" to which number in memory is to bring next in the processor, for analysis.  When this number enters the processor, it must be stored somewhere so that the processor can figure out what kind of action to take.  This holding place is the '''IR''' register.  The way the '''AC''' register works is best illustrated by the way we use a regular calculator.  Whenever you enter a number into a calculator, it appears in the display of the calculator, indicating that the calculator actually holds this value somewhere internally.  When you type a new number that you want to add to the first one, the first number disappears from the display, but you know it is kept inside because as soon as you press the = key the sum of the first and of the second number appears in the display.  It means that while the calculator was displaying the second number you had typed, it still had the first number stored somewhere internally.  For the processor there is a similar register used to keep intermediate resultsThat's the '''AC''' register.
 
  
 +
The processor has three important registers that allow it to work in this machine like fashion: the '''PC''', the '''Accumulator''' (shortened to '''AC'''), and the '''Insruction Register''' ('''IR''' for short).  The PC is used to "point" to the address in memory of the next word to bring in.  When this number enters the processor, it must be stored somewhere so that the processor can figure out what kind of action to take.  This holding place is the '''IR''' register.  The way the '''AC''' register works is best illustrated by the way we use a regular calculator.  Whenever you enter a number into a calculator, it appears in the display of the calculator, indicating that the calculator actually holds this value somewhere internally.  When you type a new number that you want to add to the first one, the first number disappears from the display, but you know it is kept inside because as soon as you press the = key the sum of the first and of the second number appears in the display.  It means that while the calculator was displaying the second number you had typed, it still had the first number stored somewhere internally.  For the processor there is a similar register used to keep intermediate results.  That's the '''AC''' register.
 +
<br />
 
[[Image:CSC103MotherBoard.jpg|250px | right]]
 
[[Image:CSC103MotherBoard.jpg|250px | right]]
Back to the processor.  All it gets from these memory cells it reads are numbers. Remember, that's the only thing we can actually create in a computer: groups of bits.  So each memory cell's number is read by the processor.  How does the number gets thereOn metal wires, each wire transferring one bit of the number.  If you have ever taken a computer apart and taken a look at the ''motherboard'', you will have seen such wires.  They are there for bits to travel back and forth between the different parts of the computer, and in particular between the processor and the memory.  The image to the right shows the wires carrying the bits (photo courtesy of [http://www.inkity.com/catalog/product/2/11195/Motherboard-Detail.html www.inkity.com].  Even though it seems that some wires do not go anywhere, they actually connect to tiny holes that go through the motherboard and allow them to continue on the other side, allowing wires to cross without touching.).
+
<br />
 +
All the processor gets from these memory cells it reads are ''numbers''.   Remember, that's the only thing we can actually create in a computer: groups of bits.  So each memory cell's number is read by the processor.  How does the number move from memory to the processorThe answer: on metal wires, each wire transferring one bit of the number.  If you have ever taken a computer apart and taken a look at its ''motherboard'', you will have seen such wires.  They are there for bits to travel back and forth between the different parts of the computer, and in particular between the processor and the memory.  The image to the right shows the wires carrying the bits (photo courtesy of [http://www.inkity.com/catalog/product/2/11195/Motherboard-Detail.html www.inkity.com].  Even though it seems that some wires do not go anywhere, they actually connect to tiny holes that go through the motherboard and allow them to continue on the other side, allowing wires to cross each other without touching.).
  
 
In summary, the processor is designed to quickly access all the memory words in series, and absorbs the numbers that they contain.  And it does this very fast and automatically.  But what does it do with the numbers, and what do the numbers mean to the processor?
 
In summary, the processor is designed to quickly access all the memory words in series, and absorbs the numbers that they contain.  And it does this very fast and automatically.  But what does it do with the numbers, and what do the numbers mean to the processor?

Revision as of 09:58, 22 September 2013

--© D. Thiebaut 08:10, 30 January 2012 (EST)



This section is only visible to computers located at Smith College













.