[Csci1301] Re: Questions from 1301's M lecture
John Howland
jhowland at ariel.cs.trinity.edu
Wed Sep 15 12:04:33 CDT 2004
On Wed, 15 Sep 2004, John Howland wrote:
> On Wed, 15 Sep 2004, Emma Hersh wrote:
>
> > Hi Dr. Howland,
> >
> > I have spent a great deal of time going over the Lecture 2 since class and I have a few questions for you.
> >
> > On page 4 and page 5 of the lecture (in 2.2 and 2.3), the locations don't match up. In 2.2 the locations are listed as 7 8 9 and in 2.3 they are listed as 04 05 06. Instead, the addresses are 07 08 09. I was confused about this and hoping that you could explain.
>
> Emma, these are vary good questions (I'm taking the liberty of responding to the class list
> as well because others may have the same questions).
>
> Remember that Von Neuman's great idea was to design a machine which would allow
> instructions (algorithm steps) to be stored in the same memory as data. This allowed
> the machine to be reprogrammed by changing the memory contents rather than requiring
> that the machine be rewired when we want to solve another problem.
>
> Locations 7 8 9 are the locations used to hold the data values a, b and c respectively,
> while location 4 5 6 are used to hold the instructions load a, add b, store c respectively.
> Both are in memory right next to each other (but that was an arbitrary choice, being
> next to each other that is).
>
> >
> > Next, I'm a bit confused about the definitions int he memory model (2.5.1). It says noun =: 0 and script =: 0 and trace =: 0. I was a bit confused as to how this type of situation occurs and how one might identify what a 0 is meant to translate into.
>
> In computer science we almost always encode different ideas numerically. This is because
> eventually we want to use these ideas (abstractions) in the memory of a computer and
> computers only deal with and store numbers. The question you ask involves 3 different
> contexts:
>
> a) parts of speech; noun =: 0, verb =:3 , monad =:3 , dyad =:4
> b) details of specifying a program; script =: 0
> c) details of how the machine simulator I wrote works; trace =: 1
>
> Since the contexts are different, it doesn't matter that different abstractions
> (noun, script, trace) are encoded with the same values.
>
> Much of what we do with natural language is context sensitive. It is natural
> that the idea of linguistic context would also be applied to computer science.
> MIT's famous professor, Noam Chomsky, was the first linguist to discover the
http://web.mit.edu/linguistics/www/biography/noambio.html
> mathematical basis on context in linguistics and is work is important in the
> design of computer languages.
>
> >
> > Also in 2.5.1, I'm a bit confused about the following and what it means:
> > access =:. monad define 'y. from mem'
> > store =:. monad define 'mem =: (1 from y.) (0 from y.) amend mem'
>
> These are the J definitions of the two memory operations (access and store)
> in my J model of the memory portion of a simple computer.
>
> Leda-CS-Trinity-Edu:/users/jhowland/j.code.1301 jhowland$ j
> load'computer.js'
> mem
> 0 0 0 0 307 108 409 22 3 0
> access 9
> 0
> store 9 100
> 0 0 0 0 307 108 409 22 3 100
> access 9
> 100
>
> After loading the computer model, we display memory and see its contents.
> Then we access cell 9 (really the 10th) and see its value is 0.
> Then we store 100 in cell 9.
> Finally, when we access cell 9 again we see its value has changed to 100.
> These operations are used in the model for our computer, called proc.
>
> >
> > Finally, for 2.6 Exercises, I tried them out and was wondering whether you could tell me whether I was on track with the first one (I was unable to do the second...):
> >
> > d =: (a+b) - (a-b)
> > load a. sub b. store c.
> > load a. add b. store e.
> > load e. sub c. store d.
>
> This looks pretty good. However, would
>
> load b
> add b
> store d
>
> give the same result? Why?
>
>
> >
> >
> > Prior to this email I did consult a few of my computer science friends who are seniors but they suggested that I speak with you since they were unable to answer my questions. Thank you for your time!
>
> This is really discouraging?
>
> Great questions, Emma!
>
> >
> >
> > Emma Hersh
> >
>
>
--
_______________________________________________________________
John E. Howland url: http://www.cs.trinity.edu/~jhowland/
Computer Science email: jhowland at ariel.cs.trinity.edu
Trinity University voice: (210) 999-7364
One Trinity Place fax: (210) 999-7477
San Antonio, Texas 78212-7200
More information about the CSCI1301
mailing list