Difference between revisions of "CSC103: DT's Notes 1"
Line 30: | Line 30: | ||
One can argue that if von Neumann hadn't written this report, we may have followed somebody else's brilliant idea for putting together a machine working with electricity, where information is stored and operated on in binary form. Our laptop today could be using a different architecture, and programming them might be a totally different type of problem solving. | One can argue that if von Neumann hadn't written this report, we may have followed somebody else's brilliant idea for putting together a machine working with electricity, where information is stored and operated on in binary form. Our laptop today could be using a different architecture, and programming them might be a totally different type of problem solving. | ||
− | [[Image:Antikythera.jpg|right| | + | [[Image:Antikythera.jpg|right|400px]]For computers were not always electrical machines. Initially they were mechanical machines. The abacus, which appeared several millennia B.C. was a counting machine made of wood. The [http://en.wikipedia.org/wiki/Antikythera_mechanism Antikythera] mechanism, is currently regarded as the first mechanical machine for computing astronomical calculations. Mechanical as well, the important machine in the history of computers is '''[http://en.wikipedia.org/wiki/Difference_engine Babbage's Difference Engine]'''. This one was made of gears and shafts, with a crank at the top, and was a ''general purpose'' machine. Interestingly, this machine has given us an expression we still use with modern electronic computers: we still hear programmers refer to "cranking out" the results, even though the crank is long gone. |
The same is true of '''silicon transistors''' powered by electricity. Silicon is the material of choice for electronic microprocessor circuits as well as semiconductor circuits we find in today's computers. Its appeal lies in its property of being able to either conduct and not conduct electricity, depending on a signal it receives which is also electrical. Silicon allows us to create electrical switches that are very fast, very small, and consume very little power. But because we are very good at creating semiconductor | The same is true of '''silicon transistors''' powered by electricity. Silicon is the material of choice for electronic microprocessor circuits as well as semiconductor circuits we find in today's computers. Its appeal lies in its property of being able to either conduct and not conduct electricity, depending on a signal it receives which is also electrical. Silicon allows us to create electrical switches that are very fast, very small, and consume very little power. But because we are very good at creating semiconductor | ||
Line 524: | Line 524: | ||
</tanbox> | </tanbox> | ||
<br /> | <br /> | ||
− | [[File:IceCreamCup3Balls.png|right| | + | [[File:IceCreamCup3Balls.png|right|400px]] |
We can devise three boolean variables that can be true of false depending on three properties of a container of ice cream: ''choc'', ''fruit'', and ''HG''. ''choc'' is true if the ice cream contains some chocolate. ''fruit'' is true if the ice cream contains fruits, and ''HG'' is true if the ice cream is from Haagen Dazs. A boolean function, or expression, we're going to call it ''isgood'', containing ''choc'', ''fruit'', and ''HG'' that turns true whenever the ice cream is one our friend will like would be this: | We can devise three boolean variables that can be true of false depending on three properties of a container of ice cream: ''choc'', ''fruit'', and ''HG''. ''choc'' is true if the ice cream contains some chocolate. ''fruit'' is true if the ice cream contains fruits, and ''HG'' is true if the ice cream is from Haagen Dazs. A boolean function, or expression, we're going to call it ''isgood'', containing ''choc'', ''fruit'', and ''HG'' that turns true whenever the ice cream is one our friend will like would be this: | ||
Line 959: | Line 959: | ||
Let's assume that we want to play a very simple game based on ''coding''. The game is quite easy to get: we want two people to have a conversation where each word or sentence that they can say is limited to a small set of preselected sentence, and each one is associated with a number. When the two people talk to each other, they must pick the number corresponding to the sentence, question, or answer they want to say. | Let's assume that we want to play a very simple game based on ''coding''. The game is quite easy to get: we want two people to have a conversation where each word or sentence that they can say is limited to a small set of preselected sentence, and each one is associated with a number. When the two people talk to each other, they must pick the number corresponding to the sentence, question, or answer they want to say. | ||
− | [[File:Conversation.jpg| | + | [[File:Conversation.jpg|500px|right]] |
Here's a list of numbers and their associated sentences: | Here's a list of numbers and their associated sentences: | ||
Line 1,138: | Line 1,138: | ||
</bluebox> | </bluebox> | ||
<br /> | <br /> | ||
− | [[Image:Calculator.png|right| | + | [[Image:Calculator.png|right|250px]] |
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 /> |
Revision as of 22:38, 1 August 2014
--© D. Thiebaut 08:10, 30 January 2012 (EST)
Last revised --D. Thiebaut (talk) 08:05, 9 October 2013 (EDT)