Difference between revisions of "CSC103: DT's Notes 1"
(→Computer Memory) |
|||
(6 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
__TOC__ | __TOC__ | ||
+ | <br /> | ||
+ | <center>[[CSC103 Notes, Newer Version| '''Newer Version, 2014''']]</center> | ||
+ | <br /> | ||
Line 9: | Line 12: | ||
=CSC103 How Computers Work--Class Notes= | =CSC103 How Computers Work--Class Notes= | ||
+ | <onlysmith> | ||
{| style="width:100%; background:#FFC340" | {| style="width:100%; background:#FFC340" | ||
|- | |- | ||
Line 1,157: | Line 1,161: | ||
</bluebox> | </bluebox> | ||
<br /> | <br /> | ||
− | [[Image:Calculator.png|right| | + | [[Image:Calculator.png|right|thumb|300px|Ilnanny, "Calculator", online image, openclipart.org/image/800px/svg_to_png/170371/1338745223.png, captured Aug. 1st, 2014.]] |
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 '''Instruction 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 hand 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. | 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 '''Instruction 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 hand 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 /> | <br /> | ||
− | [[File:PrintedCircuitBoard.jpg|250px | | + | [[File:PrintedCircuitBoard.jpg|250px|thumb|Barney Livingston, "BBC B - PCB, CPU removed," online image, farm1.staticflickr.com/83/235291503_080d9656a8_o_d.jpg, captured Aug. 1st, 2014.]] |
<br /> | <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 processor? The 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.). | 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 processor? The 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.). | ||
Line 1,182: | Line 1,186: | ||
|- | |- | ||
| | | | ||
+ | |||
===The Cookie Monster Analogy=== | ===The Cookie Monster Analogy=== | ||
|} | |} | ||
− | [[File:CookieMonsterPacMan.png|right|350px]] | + | [[File:CookieMonsterPacMan.png|right|thumb|350px|Cookie Monster, D. Thiebaut, 2014, Released under the Creative Commons Attribution 2.0 Generic license.]] |
The processor is just like the cookie monster. But a cookie monster acting like Pac-Man, a Pac-Man that follows | The processor is just like the cookie monster. But a cookie monster acting like Pac-Man, a Pac-Man that follows | ||
a straight path made of big slabs of cement, where there's a cookie on each slab. Our Cookie-Monster-Pac-Man | a straight path made of big slabs of cement, where there's a cookie on each slab. Our Cookie-Monster-Pac-Man | ||
Line 1,213: | Line 1,218: | ||
|- | |- | ||
| | | | ||
+ | |||
===Instructions and Assembly Language=== | ===Instructions and Assembly Language=== | ||
|} | |} | ||
Line 2,168: | Line 2,174: | ||
<references /> | <references /> | ||
<br /> | <br /> | ||
+ | </onlysmith> | ||
<br /> | <br /> | ||
<br /> | <br /> |
Latest revision as of 15:24, 7 September 2017
--© D. Thiebaut 2012, 2013, 2014
Last revised --D. Thiebaut (talk) 08:05, 9 October 2013 (EDT)